Skip to content

Commit bfdd622

Browse files
committed
[AArch64] Return early rather than asserting when Size of value passed to targetShrinkDemandedConstant is not 32 or 64
1 parent d0a3642 commit bfdd622

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,8 +2373,9 @@ bool AArch64TargetLowering::targetShrinkDemandedConstant(
23732373
return false;
23742374

23752375
unsigned Size = VT.getSizeInBits();
2376-
assert((Size == 32 || Size == 64) &&
2377-
"i32 or i64 is expected after legalization.");
2376+
2377+
if ((Size != 32) || (Size != 64))
2378+
return false;
23782379

23792380
// Exit early if we demand all bits.
23802381
if (DemandedBits.popcount() == Size)

0 commit comments

Comments
 (0)