Add two new patterns that instcombine should or does handle
authorChris Lattner <sabre@nondot.org>
Wed, 8 May 2002 23:15:01 +0000 (23:15 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 8 May 2002 23:15:01 +0000 (23:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2563 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/sub.ll

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