mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 20:04:03 +00:00
Fix a bug in function ComputeMaskedBits().
llvm-svn: 35027
This commit is contained in:
parent
7d528d089c
commit
acc59870f7
@ -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…
Reference in New Issue
Block a user