================
@@ -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()))
----------------
huntergr-arm wrote:

I agree with Paul that we can remove the opcode check; I have a vague memory of 
looking for a helper function to determine whether the mask was all-true (or 
better, whether the ptest was redundant), not finding one, and just sticking a 
check for PTRUE in to get my tests up and running. Sadly I didn't revisit that 
before committing.

https://github.com/llvm/llvm-project/pull/139236
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to