summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/or.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-26 19:55:30 +0000
committerChris Lattner <sabre@nondot.org>2006-02-26 19:55:30 +0000
commit80e206556521c2e051cd9c8fd09e9b4d6485c361 (patch)
tree0afae40b0277883bc1d7dc470ed8a3f1bf15ed6a /test/Transforms/InstCombine/or.ll
parentc13a72c3293b360d9de025b117be847dfbb5569f (diff)
downloadllvm-80e206556521c2e051cd9c8fd09e9b4d6485c361.tar.gz
llvm-80e206556521c2e051cd9c8fd09e9b4d6485c361.tar.bz2
llvm-80e206556521c2e051cd9c8fd09e9b4d6485c361.tar.xz
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/or.ll')
-rw-r--r--test/Transforms/InstCombine/or.ll9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll
index 849df7c6f8..4b731dfa5c 100644
--- a/test/Transforms/InstCombine/or.ll
+++ b/test/Transforms/InstCombine/or.ll
@@ -1,6 +1,7 @@
; This test makes sure that these instructions are properly eliminated.
;
+; RUN: llvm-as < %s | opt -instcombine -disable-output &&
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v xor | not grep 'or '
implementation
@@ -148,4 +149,10 @@ int %test22(int %B) {
%ELIM5 = or int %ELIM41, %ELIM7 ; <int> [#uses=1]
ret int %ELIM5
}
-
+
+ushort %test23(ushort %A) {
+ %B = shr ushort %A, ubyte 1
+ %C = or ushort %B, 32768 ;; fold or into xor
+ %D = xor ushort %C, 8193
+ ret ushort %D
+}