From: Duncan Sands Date: Wed, 9 Jul 2008 08:07:41 +0000 (+0000) Subject: Make the role of MVT::i32 clearer here, and add a X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=ddc7aa3417fbd9719dd021a9fff383addfc49eb3;p=oota-llvm.git Make the role of MVT::i32 clearer here, and add a 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 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp b/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp index 520924d14e7..9b3f723a08e 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp @@ -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);