@@ -1779,18 +1779,17 @@ void VectorLegalizer::ExpandUINT_TO_FLOAT(SDNode *Node,
17791779
17801780 // If STRICT_/FMUL is not supported by the target (in case of f16) replace the
17811781 // UINT_TO_FP with a larger float and round to the smaller type
1782- if ((!IsStrict && TLI.getOperationAction (ISD::FMUL, Node->getValueType (0 )) ==
1783- TargetLowering::Expand) ||
1784- (IsStrict &&
1785- TLI.getOperationAction (ISD::STRICT_FMUL, Node->getValueType (0 )) ==
1786- TargetLowering::Expand)) {
1782+ if ((!IsStrict &&
1783+ TLI.getOperationAction (ISD::FMUL, DstVT) == TargetLowering::Expand) ||
1784+ (IsStrict && TLI.getOperationAction (ISD::STRICT_FMUL, DstVT) ==
1785+ TargetLowering::Expand)) {
17871786 EVT FPVT = BW == 32 ? MVT::f32 : MVT::f64 ;
17881787 SDLoc DL (Node);
17891788 unsigned Round = IsStrict ? ISD::STRICT_FP_ROUND : ISD::FP_ROUND;
17901789 unsigned UIToFP = IsStrict ? ISD::STRICT_UINT_TO_FP : ISD::UINT_TO_FP;
17911790 SDValue Result = DAG.getNode (
1792- Round, DL, Node-> getValueType ( 0 ) ,
1793- DAG.getNode (UIToFP, DL, VT .changeVectorElementType (FPVT), Src),
1791+ Round, DL, DstVT ,
1792+ DAG.getNode (UIToFP, DL, SrcVT .changeVectorElementType (FPVT), Src),
17941793 DAG.getTargetConstant (
17951794 0 , DL,
17961795 DAG.getTargetLoweringInfo ().getPointerTy (DAG.getDataLayout ())));
0 commit comments