[llvm] 156ba62 - [x86] update stale code comment; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 13:46:02 PDT 2021
Author: Sanjay Patel
Date: 2021-07-27T16:45:52-04:00
New Revision: 156ba620b3805f6b0b106b3751ec68a4722e35ff
URL: https://github.com/llvm/llvm-project/commit/156ba620b3805f6b0b106b3751ec68a4722e35ff
DIFF: https://github.com/llvm/llvm-project/commit/156ba620b3805f6b0b106b3751ec68a4722e35ff.diff
LOG: [x86] update stale code comment; NFC
The transform was generalized with:
1ce05ad619a5
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 48c3713d3704..80580456b945 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -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),
More information about the llvm-commits
mailing list