This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Introduce MVEEXT ISel lowering
ClosedPublic

Authored by dmgreen on Jun 29 2021, 2:09 AM.

Details

Summary

Similar to D91921 (and D104515) this introduces two MVESEXT and MVEZEXT nodes that larger-than-legal sext and zext are lowered to. These either get optimized away or end up becoming a series of stack loads/store, in order to perform the extending whilst keeping the order of the lanes correct. They are generated from v8i16->v8i32, v16i8->v16i16 and v16i8->v16i32 extends, potentially with a intermediate extend for the larger v16i8->v16i32 extend. A number of combines have been added for obvious cases that come up in tests, notably MVEEXT of shuffles. More may be needed in the future, but this seems to cover most of the cases that come up in the tests.

Diff Detail

Event Timeline

dmgreen created this revision.Jun 29 2021, 2:09 AM
dmgreen requested review of this revision.Jun 29 2021, 2:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2021, 2:09 AM
samtebbs added inline comments.Jul 2 2021, 7:02 AM
llvm/lib/Target/ARM/ARMISelLowering.cpp
9040

I think it would be useful to add a comment here explaining the intermediate extension.

17436

I think this could do with a comment at the beginning detailing what it's doing.

17438–17441

Is it possible to merge the opcode check and the cast to a dyn_cast and checking LD in the second if statement?

17501

This function could also do with an explanatory comment.

dmgreen updated this revision to Diff 356620.Jul 6 2021, 12:33 AM

Updates and extra comments.

dmgreen added inline comments.Jul 6 2021, 12:34 AM
llvm/lib/Target/ARM/ARMISelLowering.cpp
9040

I added a quick comment pointing to the larger comment above in LowerTruncate, as that one already covers both extending and truncating.

samtebbs accepted this revision.Jul 8 2021, 1:59 AM

Nice

This revision is now accepted and ready to land.Jul 8 2021, 1:59 AM
This revision was landed with ongoing or failed builds.Jul 12 2021, 11:21 PM
This revision was automatically updated to reflect the committed changes.