[llvm] [AArch64] Use SVE rev for full reverse shuffles with SVE128 (PR #224589)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 07:03:13 PDT 2026


================
@@ -16195,11 +16195,23 @@ SDValue AArch64TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op,
                     DAG.getNode(AArch64ISD::NVCAST, DL, BSVT, V1)));
   }
 
-  if (((NumElts == 8 && EltSize == 16) || (NumElts == 16 && EltSize == 8)) &&
+  if (((NumElts == 8 && EltSize == 16) || (NumElts == 16 && EltSize == 8) ||
+       (NumElts == 4 && EltSize == 32)) &&
----------------
david-arm wrote:

I just thought - we can also do use SVE reverse for 64-bit elements too, such as <2 x double>, right? I'm not sure what's faster though - a couple of lanes (presumably) vs a single rev instruction.

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


More information about the llvm-commits mailing list