aboutsummaryrefslogtreecommitdiff
path: root/tests/cases/switch64_ta2.ll
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-11 18:07:31 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-11 18:07:31 -0800
commit0bb7d8093a98b8bd41b9eeeaf8bde671f0b9894e (patch)
tree19e7dab1a54605a2ac8294f93aba2590fd5a4617 /tests/cases/switch64_ta2.ll
parent9f74e557418e58ecdac3c9fc9c82c733bab1f308 (diff)
more i64 switch tests
Diffstat (limited to 'tests/cases/switch64_ta2.ll')
-rw-r--r--tests/cases/switch64_ta2.ll44
1 files changed, 20 insertions, 24 deletions
diff --git a/tests/cases/switch64_ta2.ll b/tests/cases/switch64_ta2.ll
index 4d5c6273..1a6d52f3 100644
--- a/tests/cases/switch64_ta2.ll
+++ b/tests/cases/switch64_ta2.ll
@@ -1,12 +1,14 @@
target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
target triple = "le32-unknown-nacl"
-@.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1]
+@.str = private constant [18 x i8] c"hello, world: %d\0A\00", align 1
+
+declare i32 @printf(i8*, ...)
define linkonce_odr i32 @main() align 2 {
- %a333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
- %a444 = zext i32 %a333 to i64
- %a199 = trunc i8 1 to i1 ; [#uses=1]
+ %a333 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 5)
+ %a400 = zext i32 %a333 to i64
+ %a444 = udiv i64 %a400, 3
switch i64 %a444, label %label999 [
i64 1000, label %label9950
i64 1001, label %label9951
@@ -18,41 +20,35 @@ define linkonce_odr i32 @main() align 2 {
i64 1007, label %label9957
i64 1008, label %label9958
i64 1009, label %label9959
- ] ; switch should ignore all code after it in the block
- ; No predecessors!
- %a472 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
- cleanup
- %a473 = extractvalue { i8*, i32 } %a472, 0
- %a474 = extractvalue { i8*, i32 } %a472, 1
- br label %label999
+ ]
label9950:
- %a333b = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ %waka = phi i32 [1000, %0], [0, %label9951], [1, %label9952], [2, %label9953], [3, %label9954], [4, %label9955], [5, %label9956], [6, %label9957], [7, %label9958], [8, %label9959]
+ %a333b = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 %waka)
br label %label999
label9951:
- br label %label999
+ br label %label9950
label9952:
- br label %label999
+ br label %label9950
label9953:
- br label %label999
+ br label %label9950
label9954:
- br label %label999
+ br label %label9950
label9955:
- br label %label999
+ br label %label9950
label9956:
- br label %label999
+ br label %label9950
label9957:
- br label %label999
+ br label %label9950
label9958:
- br label %label999
+ br label %label9950
label9959:
- br label %label999
+ br label %label9950
label999: ; preds = %555
+ %last = phi i32 [1, %0], [2, %label9950]
+ %a333c = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([18 x i8]* @.str, i32 0, i32 0), i32 %last)
ret i32 0
}
-declare i32 @printf(i8*)
-declare i32 @__gxx_personality_v0(...)
-