[llvm] [AArch64] Avoid using NEON BSL for streaming[-compatible] functions (PR #95803)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 03:27:54 PDT 2024


================
@@ -18147,9 +18147,12 @@ static SDValue tryCombineToBSL(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
   if (!VT.isVector())
     return SDValue();
 
-  // The combining code works for NEON, SVE2 and SME.
-  if (TLI.useSVEForFixedLengthVectorVT(VT, !Subtarget.isNeonAvailable()) ||
-      (VT.isScalableVector() && !Subtarget.hasSVE2()))
+  if (VT.isScalableVector() && !Subtarget.hasSVE2())
+    return SDValue();
+
+  if (VT.isFixedLengthVector() &&
+      (!Subtarget.isNeonAvailable() ||
+       TLI.useSVEForFixedLengthVectorVT(VT, !Subtarget.isNeonAvailable())))
----------------
sdesmalen-arm wrote:

Good catch, done!

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


More information about the llvm-commits mailing list