projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
417f56b58d0b15d93056b7be9643cab491ffc43a
[oota-llvm.git]
/
test
/
Feature
/
testswitch.ll
1
; RUN: llvm-as < %s | llvm-dis > %t1.ll
2
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3
; RUN: diff %t1.ll %t2.ll
4
5
%int = type i32
6
7
define i32 @squared(i32 %i0) {
8
switch i32 %i0, label %Default [
9
i32 1, label %Case1
10
i32 2, label %Case2
11
i32 4, label %Case4
12
]
13
14
Default: ; preds = %0
15
ret i32 -1
16
17
Case1: ; preds = %0
18
ret i32 1
19
20
Case2: ; preds = %0
21
ret i32 4
22
23
Case4: ; preds = %0
24
ret i32 16
25
}
26