aboutsummaryrefslogtreecommitdiff
path: root/test/switch.qbe
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-04-16 12:26:18 -0700
committerMichael Forney <mforney@mforney.org>2019-04-16 12:26:18 -0700
commitde004660726acb148bf0022706b7019ca560172d (patch)
treede95581449d1db324c074859615501cf8f0bc5c3 /test/switch.qbe
parent953e1e6f287d8bc00b2ef8d2197a20a549274eb3 (diff)
tests -> test
Diffstat (limited to 'test/switch.qbe')
-rw-r--r--test/switch.qbe62
1 files changed, 62 insertions, 0 deletions
diff --git a/test/switch.qbe b/test/switch.qbe
new file mode 100644
index 0000000..bb69c15
--- /dev/null
+++ b/test/switch.qbe
@@ -0,0 +1,62 @@
+export
+function $f() {
+@start.1
+@body.2
+ jmp @switch_cond.3
+@switch_case.5
+ jmp @switch_join.4
+@switch_case.6
+ jmp @switch_join.4
+@switch_case.7
+ jmp @switch_join.4
+@switch_default.8
+ jmp @switch_join.4
+@switch_case.9
+ jmp @switch_join.4
+@switch_case.10
+ jmp @switch_join.4
+@switch_cond.3
+ %.1 =w ceqw 0, 52
+ jnz %.1, @switch_case.6, @switch_ne.11
+@switch_ne.11
+ %.2 =w cultw 0, 52
+ jnz %.2, @switch_lt.12, @switch_gt.13
+@switch_lt.12
+ %.3 =w ceqw 0, 3
+ jnz %.3, @switch_case.5, @switch_ne.14
+@switch_ne.14
+ %.4 =w cultw 0, 3
+ jnz %.4, @switch_lt.15, @switch_gt.16
+@switch_lt.15
+ %.5 =w ceqw 0, 0
+ jnz %.5, @switch_case.9, @switch_ne.17
+@switch_ne.17
+ %.6 =w cultw 0, 0
+ jnz %.6, @switch_lt.18, @switch_gt.19
+@switch_lt.18
+ jmp @switch_default.8
+@switch_gt.19
+ jmp @switch_default.8
+@switch_gt.16
+ jmp @switch_default.8
+@switch_gt.13
+ %.7 =w ceqw 0, 18446744073709551613
+ jnz %.7, @switch_case.7, @switch_ne.20
+@switch_ne.20
+ %.8 =w cultw 0, 18446744073709551613
+ jnz %.8, @switch_lt.21, @switch_gt.22
+@switch_lt.21
+ %.9 =w ceqw 0, 101
+ jnz %.9, @switch_case.10, @switch_ne.23
+@switch_ne.23
+ %.10 =w cultw 0, 101
+ jnz %.10, @switch_lt.24, @switch_gt.25
+@switch_lt.24
+ jmp @switch_default.8
+@switch_gt.25
+ jmp @switch_default.8
+@switch_gt.22
+ jmp @switch_default.8
+@switch_join.4
+ ret
+}