Skip to content

Commit 112793a

Browse files
committed
[DAG] expandUINT_TO_FP - use getShiftAmountConstant helper. NFC.
Don't bother with separate getShiftAmountTy/getConstant calls.
1 parent 7a07d8e commit 112793a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8435,7 +8435,6 @@ bool TargetLowering::expandUINT_TO_FP(SDNode *Node, SDValue &Result,
84358435
return false;
84368436

84378437
SDLoc dl(SDValue(Node, 0));
8438-
EVT ShiftVT = getShiftAmountTy(SrcVT, DAG.getDataLayout());
84398438

84408439
// Implementation of unsigned i64 to f64 following the algorithm in
84418440
// __floatundidf in compiler_rt. This implementation performs rounding
@@ -8448,7 +8447,7 @@ bool TargetLowering::expandUINT_TO_FP(SDNode *Node, SDValue &Result,
84488447
llvm::bit_cast<double>(UINT64_C(0x4530000000100000)), dl, DstVT);
84498448
SDValue TwoP84 = DAG.getConstant(UINT64_C(0x4530000000000000), dl, SrcVT);
84508449
SDValue LoMask = DAG.getConstant(UINT64_C(0x00000000FFFFFFFF), dl, SrcVT);
8451-
SDValue HiShift = DAG.getConstant(32, dl, ShiftVT);
8450+
SDValue HiShift = DAG.getShiftAmountConstant(32, SrcVT, dl);
84528451

84538452
SDValue Lo = DAG.getNode(ISD::AND, dl, SrcVT, Src, LoMask);
84548453
SDValue Hi = DAG.getNode(ISD::SRL, dl, SrcVT, Src, HiShift);

0 commit comments

Comments
 (0)