mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-25 00:35:30 +00:00
Fix a bug in function ComputeMaskedBits().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35027 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
032953d747
commit
a47f60bfaf
@ -677,7 +677,7 @@ static void ComputeMaskedBits(Value *V, APInt Mask, APInt& KnownZero,
|
||||
const IntegerType *SrcTy = cast<IntegerType>(I->getOperand(0)->getType());
|
||||
APInt NewBits(APInt::getAllOnesValue(BitWidth).shl(SrcTy->getBitWidth()));
|
||||
|
||||
Mask &= SrcTy->getMask().zext(BitWidth);
|
||||
Mask &= SrcTy->getMask().zextOrTrunc(BitWidth);
|
||||
ComputeMaskedBits(I->getOperand(0), Mask, KnownZero, KnownOne, Depth+1);
|
||||
assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?");
|
||||
// The top bits are known to be zero.
|
||||
@ -689,7 +689,7 @@ static void ComputeMaskedBits(Value *V, APInt Mask, APInt& KnownZero,
|
||||
const IntegerType *SrcTy = cast<IntegerType>(I->getOperand(0)->getType());
|
||||
APInt NewBits(APInt::getAllOnesValue(BitWidth).shl(SrcTy->getBitWidth()));
|
||||
|
||||
Mask &= SrcTy->getMask().zext(BitWidth);
|
||||
Mask &= SrcTy->getMask().zextOrTrunc(BitWidth);
|
||||
ComputeMaskedBits(I->getOperand(0), Mask, KnownZero, KnownOne, Depth+1);
|
||||
assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user