Skip to content

Commit 97b7474

Browse files
authored
[SelectionDAG] Remove unneeded assert from SelectionDAG::getSignedConstant. NFC (#114336)
This assert is also present inside the APInt constructor after #114539.
1 parent 22db91c commit 97b7474

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -1773,10 +1773,7 @@ SDValue SelectionDAG::getConstant(const ConstantInt &Val, const SDLoc &DL,
17731773
SDValue SelectionDAG::getSignedConstant(int64_t Val, const SDLoc &DL, EVT VT,
17741774
bool isT, bool isO) {
17751775
unsigned Size = VT.getScalarSizeInBits();
1776-
assert(
1777-
isIntN(Size, Val) &&
1778-
"getSignedConstant with a int64_t value that doesn't fit in the type!");
1779-
return getConstant(APInt(Size, Val, true), DL, VT, isT, isO);
1776+
return getConstant(APInt(Size, Val, /*isSigned=*/true), DL, VT, isT, isO);
17801777
}
17811778

17821779
SDValue SelectionDAG::getAllOnesConstant(const SDLoc &DL, EVT VT, bool IsTarget,

0 commit comments

Comments
 (0)