summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/sub.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-08 23:15:01 +0000
committerChris Lattner <sabre@nondot.org>2002-05-08 23:15:01 +0000
commitd086fb20eba0c0da964c4262b5e096cf8dbe9e90 (patch)
tree87b4ebfe844a24d872aae20b2736724d63121e42 /test/Transforms/InstCombine/sub.ll
parent4874680b65ac7accb2c506de263b7ef76e251242 (diff)
downloadllvm-d086fb20eba0c0da964c4262b5e096cf8dbe9e90.tar.gz
llvm-d086fb20eba0c0da964c4262b5e096cf8dbe9e90.tar.bz2
llvm-d086fb20eba0c0da964c4262b5e096cf8dbe9e90.tar.xz
Add two new patterns that instcombine should or does handle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/sub.ll')
-rw-r--r--test/Transforms/InstCombine/sub.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/sub.ll b/test/Transforms/InstCombine/sub.ll
index fbec5e8a38..bbdf0b3787 100644
--- a/test/Transforms/InstCombine/sub.ll
+++ b/test/Transforms/InstCombine/sub.ll
@@ -23,3 +23,15 @@ int "test3"(int %A) {
%C = sub int 0, %B ; C = -B = A
ret int %C
}
+
+int "test4"(int %A, int %x) {
+ %B = sub int 0, %A
+ %C = sub int %x, %B
+ ret int %C
+}
+
+int "test5"(int %A, int %B, int %C) {
+ %D = sub int %B, %C
+ %E = sub int %A, %D
+ ret int %E
+}