On Fri, 6 May 2016, Marc Glisse wrote:
2016-05-06 Marc Glisse <marc.gli...@inria.fr>
gcc/
* fold-const.c (fold_binary_loc) [(X ^ Y) & Y]: Remove and merge with...
* match.pd ((X & Y) ^ Y): ... this.
((X & Y) & Y, (X | Y) | Y, (X ^ Y) ^ Y, (X & Y) & (X & Z), (X | Y)
| (X | Z), (X ^ Y) ^ (X ^ Z)): New transformations.
gcc/testsuite/
* gcc.dg/tree-ssa/bit-assoc.c: New testcase.
* gcc.dg/tree-ssa/pr69270.c: Adjust.
* gcc.dg/tree-ssa/vrp59.c: Disable forwprop.
Oups, I forgot about convert1/convert2 in match.pd, which may be relevant
especially if @0 is a constant in the last transforms. Please ignore the
patch for now, I'll resend after checking it.
--
Marc Glisse