summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/add.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-03 00:25:31 +0000
committerChris Lattner <sabre@nondot.org>2004-07-03 00:25:31 +0000
commit80fc86a0b2f6f9f0dc9c25f33c52e60b7c1b635a (patch)
tree396cf003c2dd4f22814cdb6dcffa357f1e0aff1e /test/Transforms/InstCombine/add.ll
parentc5f143b6e7d287d0dc3e5c55b3c83a2670ca99f8 (diff)
downloadllvm-80fc86a0b2f6f9f0dc9c25f33c52e60b7c1b635a.tar.gz
llvm-80fc86a0b2f6f9f0dc9c25f33c52e60b7c1b635a.tar.bz2
llvm-80fc86a0b2f6f9f0dc9c25f33c52e60b7c1b635a.tar.xz
Add a new testcase for folding an add into a switch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/add.ll')
-rw-r--r--test/Transforms/InstCombine/add.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/add.ll b/test/Transforms/InstCombine/add.ll
index 8dd4c82fa9..b8bab083b9 100644
--- a/test/Transforms/InstCombine/add.ll
+++ b/test/Transforms/InstCombine/add.ll
@@ -135,3 +135,17 @@ bool %test21(uint %x) {
%y = seteq uint %t, 123
ret bool %y
}
+
+int %test22(uint %V) {
+ %V2 = add uint %V, 10
+ switch uint %V2, label %Default [
+ uint 20, label %Lab1
+ uint 30, label %Lab2
+ ]
+Default:
+ ret int 123
+Lab1:
+ ret int 12312
+Lab2:
+ ret int 1231231
+}