Skip to content

Commit

Permalink
Add data flow test with argument
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Sep 21, 2020
1 parent 9fe23d2 commit dafc39d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
18 changes: 18 additions & 0 deletions examples/test/df/cond-args.bril
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ARGS: live

@main(cond: bool) {
a: int = const 47;
b: int = const 42;
br cond .left .right;
.left:
b: int = const 1;
c: int = const 5;
jmp .end;
.right:
a: int = const 2;
c: int = const 10;
jmp .end;
.end:
d: int = sub a c;
print d;
}
12 changes: 12 additions & 0 deletions examples/test/df/cond-args.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
b1:
in: cond
out: a
left:
in: a
out: a, c
right:
in: ∅
out: a, c
end:
in: a, c
out: ∅

0 comments on commit dafc39d

Please sign in to comment.