Add some new tests
authorChris Lattner <sabre@nondot.org>
Wed, 19 Jan 2005 21:48:31 +0000 (21:48 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 19 Jan 2005 21:48:31 +0000 (21:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19705 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/add.ll

index 8868929ff646d8793f90f9d584a3c9f5b394ec35..c9715635ea4cc86c7d2155e87684adb859625bd6 100644 (file)
@@ -177,3 +177,17 @@ long %test25(long %Y) {
         ret long %tmp.8
 }
 
+int %test26(int %A, int %B) {
+       %C = add int %A, %B
+       %D = sub int %C, %B
+       ret int %D
+}
+
+int %test27(bool %C, int %X, int %Y) {
+        %A = add int %X, %Y
+        %B = add int %Y, 123
+        %C = select bool %C, int %A, int %B  ;; Fold add through select.
+        %D = sub int %C, %Y
+        ret int %D
+}
+