This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Fix bug in store of vector 0 DAGCombine.
ClosedPublic

Authored by gberry on Sep 21 2017, 10:49 AM.

Details

Summary

Avoid using XZR/WZR directly as operands to split stores of zero
vectors. Doing so can lead to the XZR/WZR being used by an instruction
that doesn't allow it (e.g. add).

Fixes bug 34674.

Diff Detail

Repository
rL LLVM

Event Timeline

gberry created this revision.Sep 21 2017, 10:49 AM
efriedma accepted this revision.Sep 21 2017, 11:33 AM
efriedma added inline comments.
lib/Target/AArch64/AArch64ISelLowering.cpp
9463 ↗(On Diff #116223)

I think you can use the entry node as the chain operand, rather than the store's chain?

test/CodeGen/AArch64/fastcc.ll
28 ↗(On Diff #116223)

This is... interesting. But looks correct.

This revision is now accepted and ready to land.Sep 21 2017, 11:33 AM

Thanks Eli.

lib/Target/AArch64/AArch64ISelLowering.cpp
9463 ↗(On Diff #116223)

Right, I was thinking of it as the chain for the split stores, but the copy from xzr can happen whenever.

This revision was automatically updated to reflect the committed changes.