Avoids all the unnecessary extra bitrange creation/shift stages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296879
91177308-0d34-0410-b5e6-
96231b3b80d8
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.