1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-02 00:42:52 +01:00
llvm-mirror/test/Feature/testswitch.ll

27 lines
537 B
LLVM
Raw Normal View History

; RUN: llvm-as < %s | llvm-dis > %t1.ll
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
%int = type i32
2001-06-06 22:29:01 +02:00
define i32 @squared(i32 %i0) {
switch i32 %i0, label %Default [
i32 1, label %Case1
i32 2, label %Case2
i32 4, label %Case4
]
2001-06-06 22:29:01 +02:00
Default: ; preds = %0
ret i32 -1
2001-06-06 22:29:01 +02:00
Case1: ; preds = %0
ret i32 1
Case2: ; preds = %0
ret i32 4
Case4: ; preds = %0
ret i32 16
}
2001-06-06 22:29:01 +02:00