On 05/14/2015 10:33 AM, Marc Glisse 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.
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.
OK.
jeff