[x86] update stale code comment; NFC

The transform was generalized with:
1ce05ad619
This commit is contained in:
Sanjay Patel 2021-07-27 16:42:51 -04:00
parent 0b8d30b16e
commit 156ba620b3
1 changed files with 2 additions and 3 deletions

View File

@ -49958,12 +49958,11 @@ static SDValue pushAddIntoCmovOfConsts(SDNode *N, SelectionDAG &DAG) {
if (!isSuitableCmov(Cmov))
return SDValue();
// add (cmov C, 0), OtherOp --> cmov (add OtherOp, C), OtherOp
// add (cmov 0, C), OtherOp --> cmov OtherOp, (add OtherOp, C)
// add (cmov C1, C2), OtherOp --> cmov (add OtherOp, C1), (add OtherOp, C2)
EVT VT = N->getValueType(0);
SDLoc DL(N);
SDValue FalseOp = Cmov.getOperand(0);
SDValue TrueOp = Cmov.getOperand(1);
EVT VT = N->getValueType(0);
FalseOp = DAG.getNode(ISD::ADD, DL, VT, OtherOp, FalseOp);
TrueOp = DAG.getNode(ISD::ADD, DL, VT, OtherOp, TrueOp);
return DAG.getNode(X86ISD::CMOV, DL, VT, FalseOp, TrueOp, Cmov.getOperand(2),