mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Re-apply 55137 with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b3990d5e94
commit
c714f13090
@ -509,12 +509,15 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask,
|
|||||||
ComputeMaskedBits(R, Mask2, KnownZero2, KnownOne2, TD, Depth+1);
|
ComputeMaskedBits(R, Mask2, KnownZero2, KnownOne2, TD, Depth+1);
|
||||||
Mask2 = APInt::getLowBitsSet(BitWidth,
|
Mask2 = APInt::getLowBitsSet(BitWidth,
|
||||||
KnownZero2.countTrailingOnes());
|
KnownZero2.countTrailingOnes());
|
||||||
KnownOne2.clear();
|
|
||||||
KnownZero2.clear();
|
// We need to take the minimum number of known bits
|
||||||
ComputeMaskedBits(L, Mask2, KnownZero2, KnownOne2, TD, Depth+1);
|
APInt KnownZero3(KnownZero), KnownOne3(KnownOne);
|
||||||
|
ComputeMaskedBits(L, Mask2, KnownZero3, KnownOne3, TD, Depth+1);
|
||||||
|
|
||||||
KnownZero = Mask &
|
KnownZero = Mask &
|
||||||
APInt::getLowBitsSet(BitWidth,
|
APInt::getLowBitsSet(BitWidth,
|
||||||
KnownZero2.countTrailingOnes());
|
std::min(KnownZero2.countTrailingOnes(),
|
||||||
|
KnownZero3.countTrailingOnes()));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user