Simple bitop reassoc in match.pd (was: Canonicalize X u< X to UNORDERED_EXPR)
Marc Glisse
marc.glisse@inria.fr
Sun May 8 20:49:00 GMT 2016
On Fri, 6 May 2016, Marc Glisse wrote:
> 2016-05-06 Marc Glisse <marc.glisse@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
More information about the Gcc-patches
mailing list