summaryrefslogtreecommitdiffstats
path: root/test/Bitcode/2012-05-07-SwitchInstRangesSupport.ll
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-08-15 19:34:23 +0000
committerdim <dim@FreeBSD.org>2012-08-15 19:34:23 +0000
commit721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (patch)
treeeacfc83d988e4b9d11114387ae7dc41243f2a363 /test/Bitcode/2012-05-07-SwitchInstRangesSupport.ll
parent2b2816e083a455f7a656ae88b0fd059d1688bb36 (diff)
downloadFreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.zip
FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.tar.gz
Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
Diffstat (limited to 'test/Bitcode/2012-05-07-SwitchInstRangesSupport.ll')
-rw-r--r--test/Bitcode/2012-05-07-SwitchInstRangesSupport.ll33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/Bitcode/2012-05-07-SwitchInstRangesSupport.ll b/test/Bitcode/2012-05-07-SwitchInstRangesSupport.ll
new file mode 100644
index 0000000..583b9a8
--- /dev/null
+++ b/test/Bitcode/2012-05-07-SwitchInstRangesSupport.ll
@@ -0,0 +1,33 @@
+; RUN: rm -f %t.bc
+; RUN: rm -f %t.ll
+; RUN: rm -f %t2.bc
+; RUN: rm -f %t2.ll
+; RUN: llvm-as %s -o %t.bc
+; RUN: llvm-dis %t.bc -o - | tail -n +2 > %t.ll
+; RUN: llvm-as %t.ll -o %t2.bc
+; RUN: llvm-dis %t2.bc -o - | tail -n +2 > %t2.ll
+; RUN: llvm-diff %t.ll %t2.ll
+
+define void @test() {
+ %mem = alloca i32
+ store i32 2, i32* %mem
+ %c = load i32* %mem
+ switch i32 %c, label %exit [
+ i32 1, label %exit
+ i32 2, label %exit
+ ]
+exit:
+ ret void
+}
+define void @test_wide() {
+ %mem = alloca i256
+ store i256 2, i256* %mem
+ %c = load i256* %mem
+ switch i256 %c, label %exit [
+ i256 123456789012345678901234567890, label %exit
+ i256 2, label %exit
+ ]
+exit:
+ ret void
+}
+
OpenPOWER on IntegriCloud