mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
InstCombine: Fix a thinko where transform an icmp under the assumption that it's a zero comparison when it's not.
Fixes PR9454. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -503,9 +503,8 @@ static Value *foldSelectICmpAnd(const SelectInst &SI, ConstantInt *TrueVal,
|
||||
if (!IC || !IC->isEquality())
|
||||
return 0;
|
||||
|
||||
if (ConstantInt *C = dyn_cast<ConstantInt>(IC->getOperand(1)))
|
||||
if (!C->isZero())
|
||||
return 0;
|
||||
if (!match(IC->getOperand(1), m_Zero()))
|
||||
return 0;
|
||||
|
||||
ConstantInt *AndRHS;
|
||||
Value *LHS = IC->getOperand(0);
|
||||
|
||||
Reference in New Issue
Block a user