Fix isDiscardableIfUnused to include available_externally linkage.
[oota-llvm.git] / test / Transforms / InstCombine / apint-or2.ll
index c0a9971ecfe82d178de726fae4f4f273a01ac630..b388aa5dd884cac9d8320815859c81bbe8d948ab 100644 (file)
@@ -1,11 +1,8 @@
 ; This test makes sure that or instructions are properly eliminated.
 ; This test is for Integer BitWidth > 64 && BitWidth <= 1024.
 ;
+; RUN: opt < %s -instcombine -S | not grep " or "
 
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis > /tmp/or2.rel &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep or
-
-implementation
 
 define i777 @test0(i777 %X) {
     %Y = or i777 %X, 0
@@ -36,3 +33,12 @@ define i399 @test3(i399 %V, i399 %M) {
     %R = or i399 %B, %D
     ret i399 %R
 }
+
+define i129 @demorgan(i129 %A, i129 %B) {
+    ;; (~A | ~B) == (~(A & B)) - De Morgan's Law
+    %NotA = xor i129 %A, -1
+    %NotB = xor i129 %B, -1
+    %C1 = or i129 %NotA, %NotB
+    ret i129 %C1
+}
+