On Thu, May 14, 2015 at 9:33 AM Marc Glisse <marc.gli...@inria.fr> wrote: > > Hello, > > after this patch I think I'll close the PR. This was regtested on > ppc64le-redhat-linux. > > Apparently I wrote this patch in a file that already had a trivial hunk: > -1-A -> ~A is rejected for complex while -A-1 isn't, there is no reason > for this difference (maybe there was before integer_all_onesp / > integer_minus_onep was introduced), I hope you don't mind.
So this hunk actually was wrong in the end. PR 104675 is opened for the reason why it was wrong. -A-1 should also be rejected for complex types too. I will also notice the gimple verifiers should be catching BIT_* on the complex types as they don't make sense really but currently is not. Though that would be something for GCC 13. Thanks, Andrew Pinski > > I am wondering if we want some helper (like :c for commutative operations) > to avoid duplicating patterns for x<y and y>x. We could also, when a > comparison x<=y doesn't simplify, see if !!(x<=y) simplifies better, but > that's becoming a bit complicated. > > 2015-05-15 Marc Glisse <marc.gli...@inria.fr> > > PR tree-optimization/64454 > gcc/ > * match.pd ((X % Y) % Y, (X % Y) < Y): New patterns. > (-1 - A -> ~A): Remove unnecessary condition. > gcc/testsuite/ > * gcc.dg/modmod.c: New testcase. > > -- > Marc Glisse