mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
A few more cases of missing masking in ComputeMaskedBits; found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -723,17 +723,17 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask,
|
||||
// If this call is undefined for 0, the result will be less than 2^n.
|
||||
if (II->getArgOperand(1) == ConstantInt::getTrue(II->getContext()))
|
||||
LowBits -= 1;
|
||||
KnownZero = APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
|
||||
KnownZero = Mask & APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
|
||||
break;
|
||||
}
|
||||
case Intrinsic::ctpop: {
|
||||
unsigned LowBits = Log2_32(BitWidth)+1;
|
||||
KnownZero = APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
|
||||
KnownZero = Mask & APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
|
||||
break;
|
||||
}
|
||||
case Intrinsic::x86_sse42_crc32_64_8:
|
||||
case Intrinsic::x86_sse42_crc32_64_64:
|
||||
KnownZero = APInt::getHighBitsSet(64, 32);
|
||||
KnownZero = Mask & APInt::getHighBitsSet(64, 32);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user