projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
new testcase for PR472
[oota-llvm.git]
/
test
/
Feature
/
testswitch.ll
1
; RUN: llvm-as %s -o - | 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 int
6
7
implementation
8
9
int "squared"(%int %i0)
10
begin
11
switch int %i0, label %Default [
12
int 1, label %Case1
13
int 2, label %Case2
14
int 4, label %Case4 ]
15
16
Default:
17
ret int -1 ; Unrecognized input value
18
19
Case1:
20
ret int 1
21
Case2:
22
ret int 4
23
Case4:
24
ret int 16
25
end