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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
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. |
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. |
I think it would be useful to add a comment here explaining the intermediate extension.