diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-09-26 00:45:55 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-09-26 00:45:55 +0000 |
commit | 1a35edba13f35ef251e047e5654f35310239bf76 (patch) | |
tree | a1c08f9459091bb7dfd9e8f90fc5d3ef5ca1c46b | |
parent | 29be8486e3cf719c8173635b5ee734c4e414e0af (diff) | |
download | external_llvm-1a35edba13f35ef251e047e5654f35310239bf76.zip external_llvm-1a35edba13f35ef251e047e5654f35310239bf76.tar.gz external_llvm-1a35edba13f35ef251e047e5654f35310239bf76.tar.bz2 |
translateX86CC updates the last two operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42333 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 1a80896..f4e1cb1 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -3719,6 +3719,7 @@ SDOperand X86TargetLowering::LowerSETCC(SDOperand Op, SelectionDAG &DAG, SDOperand X86TargetLowering::LowerSETCC_New(SDOperand Op, SelectionDAG &DAG) { assert(Op.getValueType() == MVT::i8 && "SetCC type must be 8-bit integer"); + SDOperand Cond; SDOperand Op0 = Op.getOperand(0); SDOperand Op1 = Op.getOperand(1); SDOperand CC = Op.getOperand(2); @@ -3726,14 +3727,16 @@ SDOperand X86TargetLowering::LowerSETCC_New(SDOperand Op, SelectionDAG &DAG) { bool isFP = MVT::isFloatingPoint(Op.getOperand(1).getValueType()); unsigned X86CC; - SDOperand Cond = DAG.getNode(X86ISD::CMP_NEW, MVT::i32, Op0, Op1); if (translateX86CC(cast<CondCodeSDNode>(CC)->get(), isFP, X86CC, - Op0, Op1, DAG)) + Op0, Op1, DAG)) { + Cond = DAG.getNode(X86ISD::CMP_NEW, MVT::i32, Op0, Op1); return DAG.getNode(X86ISD::SETCC_NEW, MVT::i8, DAG.getConstant(X86CC, MVT::i8), Cond); + } assert(isFP && "Illegal integer SetCC!"); + Cond = DAG.getNode(X86ISD::CMP_NEW, MVT::i32, Op0, Op1); switch (SetCCOpcode) { default: assert(false && "Illegal floating point SetCC!"); case ISD::SETOEQ: { // !PF & ZF |