https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70527

--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to amker from comment #0)
> Seems "(long int) x * 12 - (long int)(x + 1) * 12" is missed in
> generic-simplify.

Interestingly, we manage just fine if 12 is replaced with a variable. The issue
seems to be that we replace a-y*12 by a+y*-12 before we detect the common
factor, so it might be as simple as moving code around. Although recognizing
constant factors that differ only by their sign seems useful as well.

Reply via email to