aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-19 21:48:31 +0000
committerChris Lattner <sabre@nondot.org>2005-01-19 21:48:31 +0000
commitd4dd775a24acf544ee4181d7b5a2520108b47b5a (patch)
tree58d328aa176bbb3d0e52cd02a78e51b21cd7a30d
parent3ca6a2c72c9ab8c5df00fc473abcc12f526b9f6a (diff)
Add some new tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19705 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/InstCombine/add.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/add.ll b/test/Transforms/InstCombine/add.ll
index 8868929ff6..c9715635ea 100644
--- a/test/Transforms/InstCombine/add.ll
+++ b/test/Transforms/InstCombine/add.ll
@@ -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
+}
+