On Sat, Jun 24, 2017 at 5:34 AM, 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.
You can do the x * C1 == y * C1 optimization for floating point (if -ffast-math). That is recorded as PR 31098. Thanks, Andrew > > 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