Skip to content

Commit 6a6911a

Browse files
authored
Merge pull request #412 from InnovativeInventor/ssa-ssu-bug-fix
Disable incorrect SSU enforcement in Brili reference interpreter
2 parents a295fcc + f7964df commit 6a6911a

4 files changed

Lines changed: 17 additions & 7 deletions

File tree

brili.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,6 @@ function evalInstr(instr: bril.Instruction, state: State): Action {
749749
throw error(`get without corresponding set for ${instr.dest}`);
750750
} else {
751751
state.env.set(instr.dest, val);
752-
state.ssaEnv.delete(instr.dest); // Consume the shadow value (enforce SSU).
753752
}
754753

755754
return NEXT;

test/interp-error/ssa-error/double-phi.bril

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@main() {
2+
one: int = const 1;
3+
set shadow one;
4+
main.cond: bool = const true;
5+
set cond main.cond;
6+
.test:
7+
cond: bool = get;
8+
shadow: int = get;
9+
br cond .false .end;
10+
.false:
11+
false.cond: bool = const false;
12+
set cond false.cond;
13+
jmp .test;
14+
.end:
15+
print shadow;
16+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

0 commit comments

Comments
 (0)