[llvm] [AArch64] Fold zero-interleave shuffle into vector shift left (PR #210793)

Deepak Shirke via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 06:59:32 PDT 2026


================
@@ -15955,7 +15963,13 @@ SDValue AArch64TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
     bool IsRightShift;
     if (SDValue DataVec = isSlideWithZerosMask(ShuffleMask, VT, V1, V2,
                                                ShiftAmount, IsRightShift)) {
-      MVT ShiftVT = VT.getSizeInBits() == 64 ? MVT::v1i64 : MVT::v2i64;
+      MVT ShiftVT;
+      if (ShiftAmount >= 32)
+        ShiftVT = VT.getSizeInBits() == 64 ? MVT::v1i64 : MVT::v2i64;
+      else if (ShiftAmount >= 16)
+        ShiftVT = VT.getSizeInBits() == 64 ? MVT::v2i32 : MVT::v4i32;
+      else
+        ShiftVT = VT.getSizeInBits() == 64 ? MVT::v4i16 : MVT::v8i16;
----------------
deepakshirkem wrote:

Done. Could you please do another review cycle? Also, I still don't understand why the Build Test is failing. Could you help me figure it out? I also tried rebasing on the latest upstream/main, but it's still failing.

https://github.com/llvm/llvm-project/pull/210793


More information about the llvm-commits mailing list