mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +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:
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user