mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-13 07:00:59 +00:00
Re-apply 55137 with fixes.
llvm-svn: 58296
This commit is contained in:
parent
056ef89e68
commit
48e4fdef50
@ -509,12 +509,15 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask,
|
||||
ComputeMaskedBits(R, Mask2, KnownZero2, KnownOne2, TD, Depth+1);
|
||||
Mask2 = APInt::getLowBitsSet(BitWidth,
|
||||
KnownZero2.countTrailingOnes());
|
||||
KnownOne2.clear();
|
||||
KnownZero2.clear();
|
||||
ComputeMaskedBits(L, Mask2, KnownZero2, KnownOne2, TD, Depth+1);
|
||||
|
||||
// We need to take the minimum number of known bits
|
||||
APInt KnownZero3(KnownZero), KnownOne3(KnownOne);
|
||||
ComputeMaskedBits(L, Mask2, KnownZero3, KnownOne3, TD, Depth+1);
|
||||
|
||||
KnownZero = Mask &
|
||||
APInt::getLowBitsSet(BitWidth,
|
||||
KnownZero2.countTrailingOnes());
|
||||
std::min(KnownZero2.countTrailingOnes(),
|
||||
KnownZero3.countTrailingOnes()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user