mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
Use APInt::getOneBitSet instead of APInt::getBitsSet for sign bit mask creation
Avoids all the unnecessary extra bitrange creation/shift stages. llvm-svn: 296879
This commit is contained in:
parent
a5bf3341f1
commit
0055010fcf
@ -1099,7 +1099,7 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op,
|
||||
EVT InVT = Op.getOperand(0).getValueType();
|
||||
unsigned InBits = InVT.getScalarSizeInBits();
|
||||
APInt InMask = APInt::getLowBitsSet(BitWidth, InBits);
|
||||
APInt InSignBit = APInt::getBitsSet(BitWidth, InBits - 1, InBits);
|
||||
APInt InSignBit = APInt::getOneBitSet(BitWidth, InBits - 1);
|
||||
APInt NewBits = ~InMask & NewMask;
|
||||
|
||||
// If none of the top bits are demanded, convert this into an any_extend.
|
||||
|
Loading…
Reference in New Issue
Block a user