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

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 04:38:44 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())))
----------------
paulwalker-arm wrote:

This can be simplified to:
```
(!Subtarget.isNeonAvailable() || TLI.useSVEForFixedLengthVectorVT(VT))
```

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


More information about the llvm-commits mailing list