Skip to content

Commit 24317cf

Browse files
Out of SSA bugfix
1 parent 4ec727b commit 24317cf

File tree

1 file changed

+1
-2
lines changed
  • optvm/src/main/java/com/compilerprogramming/ezlang/compiler

1 file changed

+1
-2
lines changed

optvm/src/main/java/com/compilerprogramming/ezlang/compiler/ExitSSA.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,9 @@ private void insertAfterPhi(BasicBlock bb, Register phiDef, Instruction newInst)
150150
assert bb.instructions.size() > 0;
151151
int pos = 0;
152152
while (pos < bb.instructions.size()) {
153-
Instruction i = bb.instructions.get(pos);
153+
Instruction i = bb.instructions.get(pos++);
154154
if (i instanceof Instruction.Phi phi &&
155155
phi.def().id == phiDef.id) {
156-
pos += 1;
157156
break;
158157
}
159158
}

0 commit comments

Comments
 (0)