summaryrefslogtreecommitdiff
path: root/test/Feature/testswitch.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-06-06 20:29:01 +0000
committerChris Lattner <sabre@nondot.org>2001-06-06 20:29:01 +0000
commit009505452b713ed2e3a8e99c5545a6e721c65495 (patch)
tree136a71c5b87bdf534d1f20a67558b49226b5a4d6 /test/Feature/testswitch.ll
parent8d0afd3d32d1d67f9aa5df250a1d6955aa8f1ac9 (diff)
downloadllvm-009505452b713ed2e3a8e99c5545a6e721c65495.tar.gz
llvm-009505452b713ed2e3a8e99c5545a6e721c65495.tar.bz2
llvm-009505452b713ed2e3a8e99c5545a6e721c65495.tar.xz
Initial revision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Feature/testswitch.ll')
-rw-r--r--test/Feature/testswitch.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Feature/testswitch.ll b/test/Feature/testswitch.ll
new file mode 100644
index 0000000000..e5190d0585
--- /dev/null
+++ b/test/Feature/testswitch.ll
@@ -0,0 +1,21 @@
+ %int = type int
+
+implementation
+
+int "squared"(%int %i0)
+begin
+ switch int %i0, label %Default [
+ int 1, label %Case1
+ int 2, label %Case2
+ int 4, label %Case4 ]
+
+Default:
+ ret int -1 ; Unrecognized input value
+
+Case1:
+ ret int 1
+Case2:
+ ret int 4
+Case4:
+ ret int 16
+end