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
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 2b53723..512a62d 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -482,7 +482,7 @@
   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 @@
     // 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 @@
         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: