mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Fix PR9331. Simplified version of a patch by Jakub Staszak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127243 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -610,6 +610,10 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask,
|
||||
// Otherwise take the unions of the known bit sets of the operands,
|
||||
// taking conservative care to avoid excessive recursion.
|
||||
if (Depth < MaxDepth - 1 && !KnownZero && !KnownOne) {
|
||||
// Skip if every incoming value references to ourself.
|
||||
if (P->hasConstantValue() == P)
|
||||
break;
|
||||
|
||||
KnownZero = APInt::getAllOnesValue(BitWidth);
|
||||
KnownOne = APInt::getAllOnesValue(BitWidth);
|
||||
for (unsigned i = 0, e = P->getNumIncomingValues(); i != e; ++i) {
|
||||
|
Reference in New Issue
Block a user