More tests
authorChris Lattner <sabre@nondot.org>
Mon, 6 May 2002 16:44:53 +0000 (16:44 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 May 2002 16:44:53 +0000 (16:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2489 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/add.ll

index a8793a78bb08f05454a44f726997ab8e1ae237e9..f7461d212961fa28139abdc803149195eb624334 100644 (file)
@@ -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
+}
+