+2015-05-22 Marc Glisse <marc.glisse@inria.fr>
+
+ * match.pd ((x | y) & ~x -> y & ~x, (x & y) | ~x -> y | ~x): New
+ simplifications.
+
2015-05-22 Jeff Law <law@redhat.com>
* config/pa/pa.md (integer_indexed_store splitters): Use
/* x & ~(x & y) -> x & ~y */
/* x | ~(x | y) -> x | ~y */
(for bitop (bit_and bit_ior)
- (simplify
- (bitop:c @0 (bit_not (bitop:c@2 @0 @1)))
- (if (TREE_CODE (@2) != SSA_NAME || has_single_use (@2))
- (bitop @0 (bit_not @1)))))
+ (simplify
+ (bitop:c @0 (bit_not (bitop:c@2 @0 @1)))
+ (if (TREE_CODE (@2) != SSA_NAME || has_single_use (@2))
+ (bitop @0 (bit_not @1)))))
+
+/* (x | y) & ~x -> y & ~x */
+/* (x & y) | ~x -> y | ~x */
+(for bitop (bit_and bit_ior)
+ rbitop (bit_ior bit_and)
+ (simplify
+ (bitop:c (rbitop:c @0 @1) (bit_not@2 @0))
+ (bitop @1 @2)))
(simplify
(abs (negate @0))
+2015-05-22 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/nand.c: New testcase.
+
2015-05-22 Sandra Loosemore <sandra@codesourcery.com>
* gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp:
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-original" } */
+
+unsigned f(unsigned x, unsigned y){
+ return (x | y) & ~x;
+}
+unsigned g(unsigned x, unsigned y){
+ return ~x & (y | x);
+}
+
+/* { dg-final { scan-tree-dump-times "return ~x & y;" 2 "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */