mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Fix a bug Nate noticed, where we miscompiled a simple testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17157 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
514b4b0a1f
commit
9b9918246c
@ -1285,7 +1285,7 @@ Instruction *InstCombiner::OptAndOp(Instruction *Op,
|
||||
Constant *AllOne = ConstantIntegral::getAllOnesValue(AndRHS->getType());
|
||||
Constant *ShrMask = ConstantExpr::getUShr(AllOne, OpRHS);
|
||||
Constant *CI = ConstantExpr::getAnd(AndRHS, ShrMask);
|
||||
if (CI == ShrMask) { // Masking out bits shifted in.
|
||||
if (CI == AndRHS) { // Masking out bits shifted in.
|
||||
// Make the argument unsigned.
|
||||
Value *ShVal = Op->getOperand(0);
|
||||
ShVal = InsertCastBefore(ShVal,
|
||||
|
Loading…
Reference in New Issue
Block a user