Skip to content

Commit 3f6bf27

Browse files
committed
use getScalarSizeInBits
1 parent 1195b05 commit 3f6bf27

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,9 +1637,8 @@ SDValue SelectionDAG::getBoolConstant(bool V, const SDLoc &DL, EVT VT,
16371637

16381638
SDValue SelectionDAG::getConstant(uint64_t Val, const SDLoc &DL, EVT VT,
16391639
bool isT, bool isO) {
1640-
EVT EltVT = VT.getScalarType();
1641-
return getConstant(APInt(EltVT.getSizeInBits(), Val, /*isSigned=*/false), DL,
1642-
VT, isT, isO);
1640+
return getConstant(APInt(VT.getScalarSizeInBits(), Val, /*isSigned=*/false),
1641+
DL, VT, isT, isO);
16431642
}
16441643

16451644
SDValue SelectionDAG::getConstant(const APInt &Val, const SDLoc &DL, EVT VT,

0 commit comments

Comments
 (0)