mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-11 21:56:15 +00:00
Fix PR1499.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37472 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
96dd9a8b1b
commit
d0499af703
@ -1346,6 +1346,10 @@ bool InstCombiner::SimplifyDemandedBits(Value *V, APInt DemandedMask,
|
||||
|
||||
// Signed shift right.
|
||||
APInt DemandedMaskIn(DemandedMask.shl(ShiftAmt));
|
||||
// If any of the "high bits" are demanded, we should set the sign bit as
|
||||
// demanded.
|
||||
if (DemandedMask.countLeadingZeros() <= ShiftAmt)
|
||||
DemandedMaskIn.set(BitWidth-1);
|
||||
if (SimplifyDemandedBits(I->getOperand(0),
|
||||
DemandedMaskIn,
|
||||
RHSKnownZero, RHSKnownOne, Depth+1))
|
||||
|
Loading…
Reference in New Issue
Block a user