On Sat, Jun 24, 2017 at 2:34 PM, Marc Glisse <marc.gli...@inria.fr> wrote: > Hello, > > I remember wanting to add this when the undefined-overflow case was > introduced a while ago. > > It turns out the tree where I wrote this wasn't clean. Since the rest is > details, I am including it in this patch, hope it is ok.
Yeah, that's ok. Besides eventually handling FP (not required in this patch initially) I think the mults don't need :c as we should canonicalize the constant to 2nd operand. Ok with removing :c Thanks, Richard. > Bootstrap + testsuite on powerpc64le-unknown-linux-gnu. > > 2017-06-26 Marc Glisse <marc.gli...@inria.fr> > > gcc/ > * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^. > (x * C EQ/NE y * C): New transformation. > > gcc/testsuite/ > * gcc.dg/tree-ssa/addadd.c: Remove test duplicated in addadd-2.c. > * gcc.dg/tree-ssa/mulcmp-1.c: New file. > > -- > Marc Glisse