diff options
author | Manman Ren <mren@apple.com> | 2012-05-02 15:24:32 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2012-05-02 15:24:32 +0000 |
commit | e2849851b29c0ac02d4428cd006163966dbf1bbf (patch) | |
tree | e156ee33cfcafd10f9b194e41fe65728bebf663e /lib | |
parent | 37cb9acac54fdebdb833dc7e2f312d8e3bb33002 (diff) | |
download | external_llvm-e2849851b29c0ac02d4428cd006163966dbf1bbf.zip external_llvm-e2849851b29c0ac02d4428cd006163966dbf1bbf.tar.gz external_llvm-e2849851b29c0ac02d4428cd006163966dbf1bbf.tar.bz2 |
Revert r155853
The commit is intended to fix rdar://10961709.
But it is the root cause of PR12720.
Revert it for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 7ab4b26..bbe2808 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -8651,22 +8651,6 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const { SDValue Y = isAllOnes(Op2) ? Op1 : Op2; SDValue CmpOp0 = Cmp.getOperand(0); - // further optimization for special cases - // (select (x != 0), -1, 0) -> neg & sbb - // (select (x == 0), 0, -1) -> neg & sbb - if (ConstantSDNode *YC = dyn_cast<ConstantSDNode>(Y)) - if (YC->isNullValue() && - (isAllOnes(Op1) == (CondCode == X86::COND_NE))) { - SDVTList VTs = DAG.getVTList(CmpOp0.getValueType(), MVT::i32); - SDValue Neg = DAG.getNode(ISD::SUB, DL, VTs, - DAG.getConstant(0, CmpOp0.getValueType()), - CmpOp0); - SDValue Res = DAG.getNode(X86ISD::SETCC_CARRY, DL, Op.getValueType(), - DAG.getConstant(X86::COND_B, MVT::i8), - SDValue(Neg.getNode(), 1)); - return Res; - } - Cmp = DAG.getNode(X86ISD::CMP, DL, MVT::i32, CmpOp0, DAG.getConstant(1, CmpOp0.getValueType())); Cmp = ConvertCmpIfNecessary(Cmp, DAG); |