summaryrefslogtreecommitdiff
path: root/src/test/java/com/seaofnodes/simple/Chapter07Test.java
diff options
context:
space:
mode:
authorDibyendu Majumdar <mobile@majumdar.org.uk>2023-12-03 23:23:04 +0000
committerDibyendu Majumdar <mobile@majumdar.org.uk>2024-10-23 17:51:09 -0700
commit425f05826799e9da06a630187d2ad05c656266a1 (patch)
tree8cc55ff877b61d144e7b668505a84cb1a7cca624 /src/test/java/com/seaofnodes/simple/Chapter07Test.java
parent48ce51174de5636232ad642d1080c8872d245f93 (diff)
downloadSimple-linear-chapter08.tar.gz
Simple-linear-chapter08.zip
Chapter 8: Lazy Phis, Break, Continue, and Evaluatorlinear-chapter08
Co-authored-by: Cliff Click <cliffc@acm.org> Co-authored-by: XmiliaH <45106915+XmiliaH@users.noreply.github.com> Co-authored-by: Thalia Archibald <thalia@archibald.dev> Co-authored-by: Robert Obkircher <robert.obkircher@gmail.com> 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.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/java/com/seaofnodes/simple/Chapter07Test.java b/src/test/java/com/seaofnodes/simple/Chapter07Test.java
index 189fcf66..d691672e 100644
--- a/src/test/java/com/seaofnodes/simple/Chapter07Test.java
+++ b/src/test/java/com/seaofnodes/simple/Chapter07Test.java
@@ -37,7 +37,7 @@ if(arg){}else{
return a;
""");
StopNode stop = parser.parse();
- assertEquals("return Phi(Region23,1,Phi(Loop11,1,(Phi_a+1)));", stop.toString());
+ assertEquals("return Phi(Region22,1,Phi(Loop11,1,(Phi_a+1)));", stop.toString());
}
@Test
@@ -57,7 +57,7 @@ while(i < arg) {
return sum;
""");
StopNode stop = parser.parse();
- assertEquals("return Phi(Loop8,0,Phi(Loop21,Phi_sum,(Phi(Loop,0,(Phi_j+1))+Phi_sum)));", stop.toString());
+ assertEquals("return Phi(Loop8,0,Phi(Loop20,Phi_sum,(Phi_sum+Phi(Loop,0,(Phi_j+1)))));", stop.toString());
}
@Test
@@ -74,7 +74,7 @@ return b;
""");
Node._disablePeephole = true;
StopNode stop = parser.parse();
- assertEquals("return Phi(Loop8,2,Phi(Region27,Phi_b,4));", stop.toString());
+ assertEquals("return Phi(Loop8,2,Phi(Region26,Phi_b,4));", stop.toString());
assertTrue(stop.ret().ctrl() instanceof ProjNode);
Node._disablePeephole = false;
}
@@ -94,7 +94,7 @@ while(a < 10) {
return b;
""");
StopNode stop = parser.parse();
- assertEquals("return Phi(Loop8,2,(Phi(Region27,Phi_b,4)+1));", stop.toString());
+ assertEquals("return Phi(Loop8,2,(Phi(Region26,Phi_b,4)+1));", 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();
+ StopNode stop = parser.parse(false);
assertEquals("return Phi(Loop7,1,2);", stop.toString());
assertTrue(stop.ret().ctrl() instanceof ProjNode);
}