mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-14 17:28:53 +00:00
Get the number of bits to set in a mask correct for a shl/lshr transform.
llvm-svn: 35357
This commit is contained in:
parent
c0e64ed143
commit
3fea170ecd
@ -5858,7 +5858,7 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
|
||||
BinaryOperator::createLShr(X, ConstantInt::get(Ty, ShiftDiff));
|
||||
InsertNewInstBefore(Shift, I);
|
||||
|
||||
APInt Mask(APInt::getLowBitsSet(TypeBits, ShiftAmt2));
|
||||
APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt2));
|
||||
return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user