projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert a few more opt | llvm-dis to opt -S.
[oota-llvm.git]
/
test
/
Feature
/
testswitch.ll
diff --git
a/test/Feature/testswitch.ll
b/test/Feature/testswitch.ll
index e5190d058502d7f3d994587bd3f706eb20060cab..417f56b58d0b15d93056b7be9643cab491ffc43a 100644
(file)
--- a/
test/Feature/testswitch.ll
+++ b/
test/Feature/testswitch.ll
@@
-1,21
+1,26
@@
- %int = type int
+; RUN: llvm-as < %s | llvm-dis > %t1.ll
+; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
+; RUN: diff %t1.ll %t2.ll
-implementation
+ %int = type i32
-int "squared"(%int %i0)
-begin
- switch int %i0, label %Default [
- int 1, label %Case1
- int 2, label %Case2
-
int 4, label %Case4
]
+define i32 @squared(i32 %i0) {
+ switch i32 %i0, label %Default [
+ i32 1, label %Case1
+ i32 2, label %Case2
+ i32 4, label %Case4
+ ]
-Default:
- ret int -1 ; Unrecognized input value
+Default: ; preds = %0
+ ret i32 -1
+
+Case1: ; preds = %0
+ ret i32 1
+
+Case2: ; preds = %0
+ ret i32 4
+
+Case4: ; preds = %0
+ ret i32 16
+}
-Case1:
- ret int 1
-Case2:
- ret int 4
-Case4:
- ret int 16
-end