mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 18:42:36 +00:00
Fix Regression/Transforms/Reassociate/2005-08-24-Crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa48be79ae
commit
ac83b0301e
@ -496,9 +496,15 @@ void Reassociate::OptimizeExpression(unsigned Opcode,
|
||||
++NumAnnihil;
|
||||
} else {
|
||||
assert(Opcode == Instruction::Xor);
|
||||
if (e == 2) {
|
||||
Ops[0].Op = Constant::getNullValue(Ops[0].Op->getType());
|
||||
Ops.erase(Ops.begin()+1, Ops.end());
|
||||
++NumAnnihil;
|
||||
return;
|
||||
}
|
||||
// ... X^X -> ...
|
||||
Ops.erase(Ops.begin()+i, Ops.begin()+i+2);
|
||||
i -= 2; e -= 2;
|
||||
i -= 1; e -= 2;
|
||||
IterateOptimization = true;
|
||||
++NumAnnihil;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user