[llvm] cf20fde - [X86] Remove a couple unnecessary calls to ConvertCmpIfNecessary.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 2 21:37:00 PST 2020
Author: Craig Topper
Date: 2020-02-02T21:36:51-08:00
New Revision: cf20fde1d1d7be900ab88cbcddc88f58f1833e6f
URL: https://github.com/llvm/llvm-project/commit/cf20fde1d1d7be900ab88cbcddc88f58f1833e6f
DIFF: https://github.com/llvm/llvm-project/commit/cf20fde1d1d7be900ab88cbcddc88f58f1833e6f.diff
LOG: [X86] Remove a couple unnecessary calls to ConvertCmpIfNecessary.
We only need to call this on floating point comparisons. In this
case these are known to be integer compares. One of them even
has a SUB opcode instead of CMP.
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 c4b48ca0409f..3d7dd14d8ce3 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -22253,7 +22253,6 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
Cmp = DAG.getNode(X86ISD::CMP, DL, MVT::i32,
CmpOp0, DAG.getConstant(1, DL, CmpOp0.getValueType()));
- Cmp = ConvertCmpIfNecessary(Cmp, DAG);
SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::i32);
SDValue Zero = DAG.getConstant(0, DL, Op.getValueType());
@@ -22368,7 +22367,6 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
// a >= b ? -1 : 0 -> RES = setcc_carry
// a >= b ? 0 : -1 -> RES = ~setcc_carry
if (Cond.getOpcode() == X86ISD::SUB) {
- Cond = ConvertCmpIfNecessary(Cond, DAG);
unsigned CondCode = cast<ConstantSDNode>(CC)->getZExtValue();
if ((CondCode == X86::COND_AE || CondCode == X86::COND_B) &&
More information about the llvm-commits
mailing list