@@ -1787,17 +1787,16 @@ void VectorLegalizer::ExpandUINT_TO_FLOAT(SDNode *Node,
17871787 SDValue UIToFP;
17881788 SDValue Result;
17891789 SDValue TargetZero = DAG.getIntPtrConstant (0 , DL, /* isTarget=*/ true );
1790+ EVT FloatVecVT = SrcVT.changeVectorElementType (FPVT);
17901791 if (IsStrict) {
1791- UIToFP = DAG.getNode (ISD::STRICT_UINT_TO_FP, DL,
1792- {SrcVT.changeVectorElementType (FPVT), MVT::Other},
1792+ UIToFP = DAG.getNode (ISD::STRICT_UINT_TO_FP, DL, {FloatVecVT, MVT::Other},
17931793 {Node->getOperand (0 ), Src});
17941794 Result = DAG.getNode (ISD::STRICT_FP_ROUND, DL, {DstVT, MVT::Other},
17951795 {Node->getOperand (0 ), UIToFP, TargetZero});
17961796 Results.push_back (Result);
17971797 Results.push_back (Result.getValue (1 ));
17981798 } else {
1799- UIToFP = DAG.getNode (ISD::UINT_TO_FP, DL,
1800- SrcVT.changeVectorElementType (FPVT), Src);
1799+ UIToFP = DAG.getNode (ISD::UINT_TO_FP, DL, FloatVecVT, Src);
18011800 Result = DAG.getNode (ISD::FP_ROUND, DL, DstVT, UIToFP, TargetZero);
18021801 Results.push_back (Result);
18031802 }
0 commit comments