summaryrefslogtreecommitdiff
path: root/src/test/java/com/seaofnodes/simple/Chapter07Test.java
diff options
context:
space:
mode:
authorThalia Archibald <thalia@archibald.dev>2024-03-03 17:55:47 +0000
committerThalia Archibald <thalia@archibald.dev>2024-10-23 17:51:09 -0700
commit9ed409df4516e0089afbc7d5ccf9b029d431be04 (patch)
treec0ae90716b9551dc0e58d0ec52f5e4e91bb1152f /src/test/java/com/seaofnodes/simple/Chapter07Test.java
parent425f05826799e9da06a630187d2ad05c656266a1 (diff)
downloadSimple-linear-chapter09.tar.gz
Simple-linear-chapter09.zip
Chapter 9: Global Value Numbering and Iterative Peepholeslinear-chapter09
Co-authored-by: Cliff Click <cliffc@acm.org> Co-authored-by: XmiliaH <45106915+XmiliaH@users.noreply.github.com> Co-authored-by: Robert Obkircher <robert.obkircher@gmail.com> Co-authored-by: Dibyendu Majumdar <mobile@majumdar.org.uk> Co-authored-by: Darrick Wiebe <darrickw@untether.ai>
Diffstat (limited to 'src/test/java/com/seaofnodes/simple/Chapter07Test.java')
-rw-r--r--src/test/java/com/seaofnodes/simple/Chapter07Test.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/java/com/seaofnodes/simple/Chapter07Test.java b/src/test/java/com/seaofnodes/simple/Chapter07Test.java
index d691672e..adf10471 100644
--- a/src/test/java/com/seaofnodes/simple/Chapter07Test.java
+++ b/src/test/java/com/seaofnodes/simple/Chapter07Test.java
@@ -36,7 +36,7 @@ if(arg){}else{
}
return a;
""");
- StopNode stop = parser.parse();
+ StopNode stop = parser.parse().iterate();
assertEquals("return Phi(Region22,1,Phi(Loop11,1,(Phi_a+1)));", stop.toString());
}
@@ -56,7 +56,7 @@ while(i < arg) {
}
return sum;
""");
- StopNode stop = parser.parse();
+ StopNode stop = parser.parse().iterate();
assertEquals("return Phi(Loop8,0,Phi(Loop20,Phi_sum,(Phi_sum+Phi(Loop,0,(Phi_j+1)))));", stop.toString());
}
@@ -93,7 +93,7 @@ while(a < 10) {
}
return b;
""");
- StopNode stop = parser.parse();
+ StopNode stop = parser.parse().iterate();
assertEquals("return Phi(Loop8,2,(Phi(Region26,Phi_b,4)+1));", stop.toString());
assertTrue(stop.ret().ctrl() instanceof ProjNode);
}
@@ -128,7 +128,7 @@ while(a < 10) {
}
return a;
""");
- StopNode stop = parser.parse();
+ StopNode stop = parser.parse().iterate();
assertEquals("return Phi(Loop7,1,(Phi_a+3));", stop.toString());
assertTrue(stop.ret().ctrl() instanceof ProjNode);
}
@@ -156,7 +156,7 @@ int a = 1;
while(arg) a = 2;
return a;
""");
- StopNode stop = parser.parse(false);
+ StopNode stop = parser.parse().iterate();
assertEquals("return Phi(Loop7,1,2);", stop.toString());
assertTrue(stop.ret().ctrl() instanceof ProjNode);
}
@@ -190,7 +190,7 @@ while(a < 10) {
}
return a;
""");
- StopNode stop = parser.parse();
+ StopNode stop = parser.parse().iterate();
assertEquals("return Phi(Loop7,1,(Phi_a+3));", stop.toString());
assertTrue(stop.ret().ctrl() instanceof ProjNode);
}
@@ -226,7 +226,7 @@ while(a < 10) {
}
return a;
""");
- StopNode stop = parser.parse();
+ StopNode stop = parser.parse().iterate();
assertEquals("return Phi(Loop8,1,(Phi_a+3));", stop.toString());
assertTrue(stop.ret().ctrl() instanceof ProjNode);
}