The lowering of a <4 x i16> or <4 x i8> vecreduce.add into an i64 would previously be expanded, due to the i64 not being legal. This patch adjusts our reduction matchers, making it produce a VADDLV(sext A to v4i32) instead.
Details
Diff Detail
Event Timeline
llvm/lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
14968 | I guess it would be better to replace 128 with a TTI call to query the size of vector registers? I forgot which hook that is though. |
Updated to use is128BitVector
llvm/lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
14968 | I don't know if anything here can check TTI, nothing seems to in this file. I have changed it to use is128BitVector, which seems to be more common, and moved the comment closer which explains about non-legal types. I would expect readers to understand the size of a legal vector is 128 bits in MVE. |
llvm/lib/Target/ARM/ARMISelLowering.cpp | ||
---|---|---|
14968 | Ah yeah, forgot about that, but is128BitVector() looks a lot better anyway! LGTM |
I guess it would be better to replace 128 with a TTI call to query the size of vector registers? I forgot which hook that is though.