Skip to content

Commit

Permalink
Beef up Newton test
Browse files Browse the repository at this point in the history
  • Loading branch information
cliffclick committed Feb 16, 2025
1 parent 371c8f7 commit c46cd15
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ public void testJig() {
assertEquals("0", Eval2.eval(code, 2));
}

@Ignore @Test
@Test
public void testBasic1() {
CodeGen code = new CodeGen("return arg | 2;").parse().opto().typeCheck().instSelect("x86_64_v2", "SystemV").GCM().localSched().regAlloc();
assertEquals("return (ori,(mov,arg));", code._stop.toString());
}

@Ignore @Test
@Test
public void testNewton() {
CodeGen code = new CodeGen(
"""
Expand All @@ -37,7 +37,7 @@ public void testNewton() {
}
};
flt farg = arg;
return sqrt(farg);
return sqrt(farg) + sqrt(farg+2.0);
""");
code.parse().opto().typeCheck().instSelect("x86_64_v2", "SystemV").GCM().localSched().regAlloc();
assertEquals("return (mov,Phi(Loop,(mov,(i2f8,arg)),(mulf,(addf,(mov,(divf,i2f8,mov)),mov),0.5f)));", code.print());
Expand Down

0 comments on commit c46cd15

Please sign in to comment.