mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
Avoid to assert on "(KnownZero & KnownOne) == 0".
llvm-svn: 35062
This commit is contained in:
parent
c9c53385b8
commit
c8583ff888
@ -979,7 +979,7 @@ static bool MaskedValueIsZero(Value *V, uint64_t Mask, unsigned Depth = 0) {
|
||||
/// this predicate to simplify operations downstream. Mask is known to be zero
|
||||
/// for bits that V cannot have.
|
||||
static bool MaskedValueIsZero(Value *V, const APInt& Mask, unsigned Depth = 0) {
|
||||
APInt KnownZero(Mask), KnownOne(Mask);
|
||||
APInt KnownZero(Mask.getBitWidth(), 0), KnownOne(Mask.getBitWidth(), 0);
|
||||
ComputeMaskedBits(V, Mask, KnownZero, KnownOne, Depth);
|
||||
assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?");
|
||||
return (KnownZero & Mask) == Mask;
|
||||
|
Loading…
Reference in New Issue
Block a user