Make the role of MVT::i32 clearer here, and add a
authorDuncan Sands <baldrick@free.fr>
Wed, 9 Jul 2008 08:07:41 +0000 (08:07 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 9 Jul 2008 08:07:41 +0000 (08:07 +0000)
note since it is not clear whether it is correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53284 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp

index 520924d14e7839d186cd7bbe5a24f6a7b281b21d..9b3f723a08e9f8180a21f9400f50cb18f7d59a45 100644 (file)
@@ -463,14 +463,15 @@ void DAGTypeLegalizer::SoftenSetCCOperands(SDOperand &NewLHS, SDOperand &NewRHS,
     }
   }
 
+  MVT RetVT = MVT::i32; // FIXME: is this the correct return type?
   SDOperand Ops[2] = { LHSInt, RHSInt };
-  NewLHS = MakeLibCall(LC1, MVT::i32, Ops, 2, false/*sign irrelevant*/);
-  NewRHS = DAG.getConstant(0, MVT::i32);
+  NewLHS = MakeLibCall(LC1, RetVT, Ops, 2, false/*sign irrelevant*/);
+  NewRHS = DAG.getConstant(0, RetVT);
   CCCode = TLI.getCmpLibcallCC(LC1);
   if (LC2 != RTLIB::UNKNOWN_LIBCALL) {
     SDOperand Tmp = DAG.getNode(ISD::SETCC, TLI.getSetCCResultType(NewLHS),
                                 NewLHS, NewRHS, DAG.getCondCode(CCCode));
-    NewLHS = MakeLibCall(LC2, MVT::i32, Ops, 2, false/*sign irrelevant*/);
+    NewLHS = MakeLibCall(LC2, RetVT, Ops, 2, false/*sign irrelevant*/);
     NewLHS = DAG.getNode(ISD::SETCC, TLI.getSetCCResultType(NewLHS), NewLHS,
                          NewRHS, DAG.getCondCode(TLI.getCmpLibcallCC(LC2)));
     NewLHS = DAG.getNode(ISD::OR, Tmp.getValueType(), Tmp, NewLHS);