summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/add.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-06 16:44:53 +0000
committerChris Lattner <sabre@nondot.org>2002-05-06 16:44:53 +0000
commitfa78358a05285e597358e40bb01e489636ddf225 (patch)
treef01697ed369fbc0ba1d76c6c2ccceb7b383226ee /test/Transforms/InstCombine/add.ll
parentc1bfd13c0a080c080bed8d9164925e0706bba239 (diff)
downloadllvm-fa78358a05285e597358e40bb01e489636ddf225.tar.gz
llvm-fa78358a05285e597358e40bb01e489636ddf225.tar.bz2
llvm-fa78358a05285e597358e40bb01e489636ddf225.tar.xz
More tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/add.ll')
-rw-r--r--test/Transforms/InstCombine/add.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/add.ll b/test/Transforms/InstCombine/add.ll
index a8793a78bb..f7461d2129 100644
--- a/test/Transforms/InstCombine/add.ll
+++ b/test/Transforms/InstCombine/add.ll
@@ -30,3 +30,15 @@ begin
ret int %C
end
+int "test4"(int %A, int %B) {
+ %C = sub int 0, %A
+ %D = add int %B, %C ; D = B + -A = B - A
+ ret int %D
+}
+
+int "test5"(int %A, int %B) {
+ %C = sub int 0, %A
+ %D = add int %C, %B ; D = -A + B = B - A
+ ret int %D
+}
+