[PATCH] Move signed to unsigned x % c == 0 optimization from fold-const to match.pd (PR tree-optimization/87287)
Jeff Law
law@redhat.com
Thu Sep 13 06:45:00 GMT 2018
On 9/12/18 12:31 PM, Jakub Jelinek wrote:
> Hi!
>
> While working on the next PR, I've noticed we only fold this on generic, not
> gimple.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk?
>
> 2018-09-12 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/87287
> * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
> X % C == 0 to X % (unsigned) C == 0 optimization to ...
> * match.pd (X % C == 0): ... here. New optimization.
>
> * gcc.dg/tree-ssa/pr87287.c: New test.
OK.
jeff
More information about the Gcc-patches
mailing list