mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 12:40:17 +00:00
Avoid unnecessary APInt construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e9a61234ce
commit
34a4b38cbd
@ -734,11 +734,10 @@ static void ComputeMaskedBits(Value *V, const APInt &Mask, APInt& KnownZero,
|
||||
|
||||
// If the sign bit of the input is known set or clear, then we know the
|
||||
// top bits of the result.
|
||||
APInt NewBits(APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth));
|
||||
if (KnownZero[SrcBitWidth-1]) // Input sign bit known zero
|
||||
KnownZero |= NewBits;
|
||||
KnownZero |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth);
|
||||
else if (KnownOne[SrcBitWidth-1]) // Input sign bit known set
|
||||
KnownOne |= NewBits;
|
||||
KnownOne |= APInt::getHighBitsSet(BitWidth, BitWidth - SrcBitWidth);
|
||||
return;
|
||||
}
|
||||
case Instruction::Shl:
|
||||
|
Loading…
Reference in New Issue
Block a user