diff options
author | Chris Lattner <sabre@nondot.org> | 2005-08-09 20:20:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-08-09 20:20:18 +0000 |
commit | 7cf7e3f33f25544d08492d47cc8a1cbba25dc8d7 (patch) | |
tree | ec09113f62baccb467fd76610be42081f21cc00d /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 59b21c25d470c58e0575d5b2f31dd703fa7681ae (diff) |
Eliminate the SetCCSDNode in favor of a CondCodeSDNode class. This pulls the
CC out of the SetCC operation, making SETCC a standard ternary operation and
CC's a standard DAG leaf. This will make it possible for other node to use
CC's as operands in the future...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 2b53723d3d..512a62deff 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -482,7 +482,7 @@ void SelectionDAGLowering::visitSetCC(User &I,ISD::CondCode SignedOpcode, ISD::CondCode Opcode = SignedOpcode; if (I.getOperand(0)->getType()->isUnsigned()) Opcode = UnsignedOpcode; - setValue(&I, DAG.getSetCC(Opcode, MVT::i1, Op1, Op2)); + setValue(&I, DAG.getSetCC(MVT::i1, Op1, Op2, Opcode)); } void SelectionDAGLowering::visitSelect(User &I) { @@ -504,7 +504,7 @@ void SelectionDAGLowering::visitCast(User &I) { // Cast to bool is a comparison against zero, not truncation to zero. SDOperand Zero = isInteger(SrcTy) ? DAG.getConstant(0, N.getValueType()) : DAG.getConstantFP(0.0, N.getValueType()); - setValue(&I, DAG.getSetCC(ISD::SETNE, MVT::i1, N, Zero)); + setValue(&I, DAG.getSetCC(MVT::i1, N, Zero, ISD::SETNE)); } else if (isInteger(SrcTy)) { if (isInteger(DestTy)) { // Int -> Int cast if (DestTy < SrcTy) // Truncating cast? @@ -738,8 +738,8 @@ void SelectionDAGLowering::visitCall(CallInst &I) { return; case Intrinsic::isunordered: - setValue(&I, DAG.getSetCC(ISD::SETUO, MVT::i1,getValue(I.getOperand(1)), - getValue(I.getOperand(2)))); + setValue(&I, DAG.getSetCC(MVT::i1,getValue(I.getOperand(1)), + getValue(I.getOperand(2)), ISD::SETUO)); return; case Intrinsic::sqrt: |