[llvm] [AArch64][GlobalISel] Legalize ptr shuffle vector to s64 (PR #116013)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 10:34:52 PST 2024
================
@@ -1077,7 +1079,16 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
.clampNumElements(0, v8s8, v16s8)
.clampNumElements(0, v4s16, v8s16)
.clampNumElements(0, v4s32, v4s32)
- .clampNumElements(0, v2s64, v2s64);
+ .clampNumElements(0, v2s64, v2s64)
+ .bitcastIf(
----------------
davemgreen wrote:
Three are two options we have, both of which should produce the same output assembly. Either we try and keep v2p0 shuffles as legal, which means having to handle them in every shuffle combine that we add and legalized all the various vNp0 types correctly, which are easy to miss. The alternative like this patch does it to convert them to v2s64 and just deal with that single type.
Because of the relative rarity of pointer shuffles it feels fine to convert them to s64 and let that legalizing happen as a s64 operation.
https://github.com/llvm/llvm-project/pull/116013
More information about the llvm-commits
mailing list