summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-12 08:01:35 +0000
committerChris Lattner <sabre@nondot.org>2006-02-12 08:01:35 +0000
commit6261d766f95d2269af4d4e669f614dc67af73f80 (patch)
tree94c4fefcce210fb2683c897faa78cba77e40e274 /test/Transforms/InstCombine
parentbf5d8a82707bb89f22e4c0f26c62111796d5f1c3 (diff)
downloadllvm-6261d766f95d2269af4d4e669f614dc67af73f80.tar.gz
llvm-6261d766f95d2269af4d4e669f614dc67af73f80.tar.bz2
llvm-6261d766f95d2269af4d4e669f614dc67af73f80.tar.xz
tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/bit-tracking.ll3
-rw-r--r--test/Transforms/InstCombine/or.ll8
2 files changed, 10 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/bit-tracking.ll b/test/Transforms/InstCombine/bit-tracking.ll
index aa81da92de..c7806ec40f 100644
--- a/test/Transforms/InstCombine/bit-tracking.ll
+++ b/test/Transforms/InstCombine/bit-tracking.ll
@@ -1,6 +1,7 @@
; This file contains various testcases that require tracking whether bits are
; set or cleared by various instructions.
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep %ELIM
+; RUN: llvm-as < %s | opt -instcombine -instcombine -disable-output &&
+; RUN: llvm-as < %s | opt -instcombine -instcombine | llvm-dis | not grep %ELIM
; Reduce down to a single XOR
int %test3(int %B) {
diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll
index 95f4ed1eb3..849df7c6f8 100644
--- a/test/Transforms/InstCombine/or.ll
+++ b/test/Transforms/InstCombine/or.ll
@@ -141,3 +141,11 @@ uint %test21(uint %tmp.1) {
%tmp.6 = or uint %tmp.5, %tmp.3 ;; add tmp.1, 2
ret uint %tmp.6
}
+
+int %test22(int %B) {
+ %ELIM41 = and int %B, 1 ; <int> [#uses=1]
+ %ELIM7 = and int %B, -2 ; <int> [#uses=1]
+ %ELIM5 = or int %ELIM41, %ELIM7 ; <int> [#uses=1]
+ ret int %ELIM5
+}
+