forked from OSchip/llvm-project
[InstCombine] Remove unnecessary temporary APInt. NFCI
llvm-svn: 309887
This commit is contained in:
parent
ecd901314d
commit
fc9bf50dee
|
@ -527,11 +527,6 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
|
|||
Known.Zero.lshrInPlace(ShiftAmt);
|
||||
Known.One.lshrInPlace(ShiftAmt);
|
||||
|
||||
// Handle the sign bits.
|
||||
APInt SignMask(APInt::getSignMask(BitWidth));
|
||||
// Adjust to where it is now in the mask.
|
||||
SignMask.lshrInPlace(ShiftAmt);
|
||||
|
||||
// If the input sign bit is known to be zero, or if none of the top bits
|
||||
// are demanded, turn this into an unsigned shift right.
|
||||
assert(BitWidth > ShiftAmt && "Shift amount not saturated?");
|
||||
|
@ -541,7 +536,7 @@ Value *InstCombiner::SimplifyDemandedUseBits(Value *V, APInt DemandedMask,
|
|||
I->getOperand(1));
|
||||
LShr->setIsExact(cast<BinaryOperator>(I)->isExact());
|
||||
return InsertNewInstWith(LShr, *I);
|
||||
} else if (Known.One.intersects(SignMask)) { // New bits are known one.
|
||||
} else if (Known.One[BitWidth-ShiftAmt-1]) { // New bits are known one.
|
||||
Known.One |= HighBits;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue