[clang] [llvm] [AArch64][SVE] Refactor getPTrue to return splat(1) when pattern=all. (PR #139236)

Ricardo Jesus via cfe-commits cfe-commits at lists.llvm.org
Fri May 9 02:58:38 PDT 2025


================
@@ -25030,7 +25030,8 @@ static SDValue foldCSELofLASTB(SDNode *Op, SelectionDAG &DAG) {
   if (AnyPred.getOpcode() == AArch64ISD::REINTERPRET_CAST)
     AnyPred = AnyPred.getOperand(0);
 
-  if (TruePred != AnyPred && TruePred.getOpcode() != AArch64ISD::PTRUE)
+  if (TruePred != AnyPred && TruePred.getOpcode() != AArch64ISD::PTRUE &&
+      !ISD::isConstantSplatVectorAllOnes(TruePred.getNode()))
----------------
rj-jesus wrote:

@huntergr-arm: I believe you added this fold in #112738 - does this change look reasonable to you?

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


More information about the cfe-commits mailing list