aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/switch-long-long.c7
-rw-r--r--test/switch-long-long.qbe30
2 files changed, 37 insertions, 0 deletions
diff --git a/test/switch-long-long.c b/test/switch-long-long.c
new file mode 100644
index 0000000..65e022f
--- /dev/null
+++ b/test/switch-long-long.c
@@ -0,0 +1,7 @@
+int main(void) {
+ switch (0x12300000000) {
+ case 0: return 1;
+ case 0x12300000000: return 0;
+ }
+ return 2;
+}
diff --git a/test/switch-long-long.qbe b/test/switch-long-long.qbe
new file mode 100644
index 0000000..a13feab
--- /dev/null
+++ b/test/switch-long-long.qbe
@@ -0,0 +1,30 @@
+export
+function w $main() {
+@start.1
+@body.2
+ jmp @switch_cond.3
+@switch_case.5
+ ret 1
+@switch_case.6
+ ret 0
+@switch_cond.3
+ %.1 =w ceql 1249835483136, 0
+ jnz %.1, @switch_case.5, @switch_ne.7
+@switch_ne.7
+ %.2 =w cultl 1249835483136, 0
+ jnz %.2, @switch_lt.8, @switch_gt.9
+@switch_lt.8
+ jmp @switch_join.4
+@switch_gt.9
+ %.3 =w ceql 1249835483136, 1249835483136
+ jnz %.3, @switch_case.6, @switch_ne.10
+@switch_ne.10
+ %.4 =w cultl 1249835483136, 1249835483136
+ jnz %.4, @switch_lt.11, @switch_gt.12
+@switch_lt.11
+ jmp @switch_join.4
+@switch_gt.12
+ jmp @switch_join.4
+@switch_join.4
+ ret 2
+}