This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Implement lowering of the X constraint on AArch64
ClosedPublic

Authored by sbaranga on May 5 2016, 6:10 AM.

Details

Summary

This implements the lowering of the X constraint on
AArch64.

The default behaviour of the X constraint lowering is to
restrict it to "f". This is a problem because the "f"
constraint is not implemented on AArch64 and would be too
restrictive anyway. Therefore, the AArch64 hook will
lower this to "w" (if the operand is a floating point or
vector) or "r" otherwise.

The implementation is similar with the one added for
ARM (r267411).

This is the AArch64 side of the fix for http://llvm.org/PR26493

Diff Detail

Event Timeline

sbaranga updated this revision to Diff 56275.May 5 2016, 6:10 AM
sbaranga retitled this revision from to [AArch64] Implement lowering of the X constraint on AArch64.
sbaranga updated this object.
sbaranga added a reviewer: rengolin.
sbaranga added subscribers: t.p.northover, llvm-commits.
rengolin accepted this revision.May 5 2016, 12:33 PM
rengolin edited edge metadata.

Some silly comments on the tests, but otherwise, LGTM. Thanks!

Feel free to commit with the necessary changes.

test/CodeGen/AArch64/inlineasm-X-allocation.ll
2

Do you need -neon here? Does that force +fparmv8 even with -fp-armv8?

test/CodeGen/AArch64/inlineasm-X-constraint.ll
31

f*f. :)

Same for all below.

48

is this redundant?

This revision is now accepted and ready to land.May 5 2016, 12:33 PM
sbaranga updated this revision to Diff 56550.May 9 2016, 4:13 AM
sbaranga edited edge metadata.

Fix test comments and remove the redundant -neon attribute from the
allocation test.

sbaranga closed this revision.May 9 2016, 4:16 AM

Thanks! Committed in r268907.

-Silviu

test/CodeGen/AArch64/inlineasm-X-allocation.ll
2

Correct, we don't need it (so I removed it),

test/CodeGen/AArch64/inlineasm-X-constraint.ll
31

Thanks, should be fixed now.

48

Yes, removed.