mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-12 07:40:58 +00:00
For PR1271:
Fix another incorrectly converted shift mask. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d64d3a1d28
commit
68d27cf84e
@ -5887,7 +5887,7 @@ Instruction *InstCombiner::FoldShiftByConstant(Value *Op0, ConstantInt *Op1,
|
|||||||
BinaryOperator::createShl(X, ConstantInt::get(Ty, ShiftDiff));
|
BinaryOperator::createShl(X, ConstantInt::get(Ty, ShiftDiff));
|
||||||
InsertNewInstBefore(Shift, I);
|
InsertNewInstBefore(Shift, I);
|
||||||
|
|
||||||
APInt Mask(APInt::getHighBitsSet(TypeBits, TypeBits - ShiftAmt2));
|
APInt Mask(APInt::getLowBitsSet(TypeBits, TypeBits - ShiftAmt2));
|
||||||
return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask));
|
return BinaryOperator::createAnd(Shift, ConstantInt::get(Mask));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user