mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
fix crash on Transforms/InstCombine/intrinsics.ll introduced by r89970
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
21f83a2f95
commit
998e25a143
@ -9877,12 +9877,15 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
|
||||
const IntegerType *IT = cast<IntegerType>(II->getOperand(1)->getType());
|
||||
uint32_t BitWidth = IT->getBitWidth();
|
||||
APInt Mask = APInt::getSignBit(BitWidth);
|
||||
APInt LHSKnownZero, LHSKnownOne, RHSKnownZero, RHSKnownOne;
|
||||
APInt LHSKnownZero(BitWidth, 0);
|
||||
APInt LHSKnownOne(BitWidth, 0);
|
||||
ComputeMaskedBits(LHS, Mask, LHSKnownZero, LHSKnownOne);
|
||||
bool LHSKnownNegative = LHSKnownOne[BitWidth - 1];
|
||||
bool LHSKnownPositive = LHSKnownZero[BitWidth - 1];
|
||||
|
||||
if (LHSKnownNegative || LHSKnownPositive) {
|
||||
APInt RHSKnownZero(BitWidth, 0);
|
||||
APInt RHSKnownOne(BitWidth, 0);
|
||||
ComputeMaskedBits(RHS, Mask, RHSKnownZero, RHSKnownOne);
|
||||
bool RHSKnownNegative = RHSKnownOne[BitWidth - 1];
|
||||
bool RHSKnownPositive = RHSKnownZero[BitWidth - 1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user