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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-06-14
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
So

(simplify
 (trunc_mod (mult @0 INTEGER_CST@1) INTEGER_CST@2)
 (trunc_mod (mult @0 (trunc_mod @1 @2)) @2))

if (trunc_mod @1 @2) is smaller than @1.

I suspect this doesn't hold if the multiplication may overflow?

Reply via email to