Page MenuHomePhabricator

[AArch64][SVE] Lower fixed length EXTRACT_VECTOR_ELT
ClosedPublic

Authored by joechrisellis on Mar 15 2021, 4:21 AM.

Diff Detail

Event Timeline

joechrisellis created this revision.Mar 15 2021, 4:21 AM
joechrisellis requested review of this revision.Mar 15 2021, 4:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 15 2021, 4:21 AM
paulwalker-arm added inline comments.Mar 22 2021, 4:47 AM
llvm/test/CodeGen/AArch64/sve-fixed-length-extract-vector-elt.ll
29

The tests that take 64/128 bit vectors should pass the vector parameter directly rather than by reference.

56

Can the tests use a variable index instead? I ask because for all these tests 2 fits within the NEON range and thus when some future work lands none of these tests will emit SVE instructions.

FYI: This is also generally true as in future I'd even the variable index variants to just emit a scalar load, but this will change once all the tests are updated to use pass by value. This is not something you need to worry about though so updating them to use a variable index is sufficient.

joechrisellis marked 2 inline comments as done.

Address review comments.

  • @paulwalker-arm:
    • tests that take 64/128 bit vectors now pass the vector parameter directly rather than by reference.
    • as discussed offline, use a higher index for tests.
paulwalker-arm added inline comments.Mar 25 2021, 6:04 AM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
10002

Are there any uses of this? If not then you may as well preserve the original EVT VT = Op.getOperand(0).getValueType();

llvm/test/CodeGen/AArch64/sve-fixed-length-extract-vector-elt.ll
94

This falls under my previous "The tests that take 64/128 bit vectors should pass the vector parameter directly rather than by reference." comment.

There should also be a <2 x float> test.

151

You're missing tests for <1 x double> and <2 x double>.

joechrisellis marked 3 inline comments as done.

Address comments.

  • @paulwalker-arm:
    • do not use pass-by-reference for 64-/128-bit tests.
    • add tests for <2 x float>, <1 x double>, and <2 x double>.
paulwalker-arm accepted this revision.Mar 29 2021, 7:08 AM
This revision is now accepted and ready to land.Mar 29 2021, 7:08 AM
This revision was landed with ongoing or failed builds.Mar 30 2021, 2:43 AM
This revision was automatically updated to reflect the committed changes.