Skip to content

Commit c5e1343

Browse files
toppercPhilippRados
authored andcommitted
[SelectionDAG] Remove unneeded assert from SelectionDAG::getSignedConstant. NFC (llvm#114336)
This assert is also present inside the APInt constructor after llvm#114539.
1 parent c2ea2f5 commit c5e1343

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 1 addition & 4 deletions
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)