[llvm] [AArch64] Combine SEXT_INREG(CSET) to CSETM. (PR #156429)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 08:30:46 PDT 2025
================
@@ -26585,6 +26585,26 @@ performSignExtendInRegCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI,
return DAG.getNode(SOpc, DL, N->getValueType(0), Ext);
}
+ // Sign extend of CSET -> CSETM.
+ if (Opc == AArch64ISD::CSEL &&
+ cast<VTSDNode>(N->getOperand(1))->getVT() == MVT::i1) {
+ EVT VT = N->getValueType(0);
+ SDValue TVal = Src.getOperand(0);
+ SDValue FVal = Src.getOperand(1);
+
+ // SIGN_EXTEND_INREG (CSEL 0, 1, cc), i1 --> CSEL 0, -1, cc
----------------
paulwalker-arm wrote:
CSEL has four operands to document?
https://github.com/llvm/llvm-project/pull/156429
More information about the llvm-commits
mailing list