llvm.org GIT mirror llvm / 7a034b1
change of mind :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85258 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
2 changed file(s) with 26 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
+0
-26
test/Feature/switch.ll less more
None ; RUN: llvm-as < %s | llvm-dis > %t1.ll
1 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
2 ; RUN: diff %t1.ll %t2.ll
3
4 %int = type i32
5
6 define i32 @squared(i32 %i0) {
7 switch i32 %i0, label %Default [
8 i32 1, label %Case1
9 i32 2, label %Case2
10 i32 4, label %Case4
11 ]
12
13 Default: ; preds = %0
14 ret i32 -1
15
16 Case1: ; preds = %0
17 ret i32 1
18
19 Case2: ; preds = %0
20 ret i32 4
21
22 Case4: ; preds = %0
23 ret i32 16
24 }
25
0 ; RUN: llvm-as < %s | llvm-dis > %t1.ll
1 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
2 ; RUN: diff %t1.ll %t2.ll
3
4 %int = type i32
5
6 define i32 @squared(i32 %i0) {
7 switch i32 %i0, label %Default [
8 i32 1, label %Case1
9 i32 2, label %Case2
10 i32 4, label %Case4
11 ]
12
13 Default: ; preds = %0
14 ret i32 -1
15
16 Case1: ; preds = %0
17 ret i32 1
18
19 Case2: ; preds = %0
20 ret i32 4
21
22 Case4: ; preds = %0
23 ret i32 16
24 }
25