mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Fix a really subtle off-by-one bug that Duncan noticed with valgrind
on test/CodeGen/Generic/2007-06-06-CriticalEdgeLandingPad. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60739 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e07d3dead1
commit
46a879ebd3
@ -249,7 +249,7 @@ void LoopStrengthReduce::DeleteTriviallyDeadInstructions() {
|
||||
for (unsigned i = 0, e = DeadInsts.size()-1; i < e; ++i) {
|
||||
Instruction *I = DeadInsts[i];
|
||||
if (!I->use_empty()) DeadInsts[i] = 0;
|
||||
while (DeadInsts[i+1] == I && i != e)
|
||||
while (i != e && DeadInsts[i+1] == I)
|
||||
DeadInsts[++i] = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user