[Bug middle-end/56363] over aggressive division folding ignores sign conversion

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Oct 4 08:26:00 GMT 2019


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue mentioned is fixed there, the code now reads correctly

      if ((code == CEIL_DIV_EXPR || code == FLOOR_DIV_EXPR)
          && multiple_of_p (type, arg0, arg1))
        return fold_build2_loc (loc, EXACT_DIV_EXPR, type,
                                fold_convert (type, arg0),
                                fold_convert (type, arg1));


More information about the Gcc-bugs mailing list