aboutsummaryrefslogtreecommitdiff
path: root/test/do-loop.qbe
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-07-03 00:16:16 -0700
committerMichael Forney <mforney@mforney.org>2019-07-03 02:40:53 -0700
commitd875bf74986b87378f80d7be4cd08e8eb8e91c65 (patch)
tree605f5b0b3339a9f9c049d63cb796f2d44f48ef15 /test/do-loop.qbe
parent94ff44d9f3df0ce081bd66c5ebebee660608342b (diff)
Convert controlling expression of loops to bool
Diffstat (limited to 'test/do-loop.qbe')
-rw-r--r--test/do-loop.qbe9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/do-loop.qbe b/test/do-loop.qbe
index 698e310..d31c80c 100644
--- a/test/do-loop.qbe
+++ b/test/do-loop.qbe
@@ -23,9 +23,10 @@ function w $main() {
%.10 =w loadsw %.1
%.11 =w sub %.10, 1
storew %.11, %.1
- jnz %.10, @do_body.3, @do_join.5
+ %.12 =w cnew %.10, 0
+ jnz %.12, @do_body.3, @do_join.5
@do_join.5
- %.12 =w loadsw %.3
- %.13 =w cnew %.12, 2
- ret %.13
+ %.13 =w loadsw %.3
+ %.14 =w cnew %.13, 2
+ ret %.14
}