A neon smull/umull should be preferred over a sve v2i64 mul with two extends. It will be both less instructions and a lower cost multiply instruction.
Details
Diff Detail
Event Timeline
One possible simplification but otherwise looks good.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
4580 | Can this be just hasSVE(). useSVEForFixedLengthVectorVT() is used to detect when bigger than 128-bit vectors are support and then sometime extended to allow NEON sized vectors. In this instance you don't care about that and have done all the type checking yourself and so you only need to check for the presence of SVE. | |
llvm/test/CodeGen/AArch64/sve-mull.ll | ||
4–6 | I guess you've pre-committed these tests but I think it would have been better to add a -mattr=+sve RUN line to aarch64-smull.ll and thus ensure other related patterns are not degraded when SVE is enabled. |
Can this be just hasSVE(). useSVEForFixedLengthVectorVT() is used to detect when bigger than 128-bit vectors are support and then sometime extended to allow NEON sized vectors. In this instance you don't care about that and have done all the type checking yourself and so you only need to check for the presence of SVE.