mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-22 10:24:26 +00:00
Fix PR3874 by restoring a condition I removed, but making it more
precise than it used to be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67662 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -6582,7 +6582,8 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||
// preferable because it allows the C<<Y expression to be hoisted out
|
||||
// of a loop if Y is invariant and X is not.
|
||||
if (Shift && Shift->hasOneUse() && RHSV == 0 &&
|
||||
ICI.isEquality() && !Shift->isArithmeticShift()) {
|
||||
ICI.isEquality() && !Shift->isArithmeticShift() &&
|
||||
!isa<Constant>(Shift->getOperand(0))) {
|
||||
// Compute C << Y.
|
||||
Value *NS;
|
||||
if (Shift->getOpcode() == Instruction::LShr) {
|
||||
|
Reference in New Issue
Block a user