[Bug middle-end/80929] [6/7/8 Regression] Division with constant no more optimized to mult highpart

gjl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jul 30 12:51:00 GMT 2017


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

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-07-30
            Summary|[7/8 Regression] Division   |[6/7/8 Regression] Division
                   |with constant no more       |with constant no more
                   |optimized to mult highpart  |optimized to mult highpart
     Ever confirmed|0                           |1

--- Comment #7 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
v4.7 generates best code: The 2 div+mod 60 are implemented as 2 mul-highpart.

v6 tries to be overly smart by fusing the two divisions by 60 to one division
by 3600, leaving with 1 slow divmod call *and* 2 mul-higpart for the 2 modulo
60.

v8 also fuses to a slow division by 3600, but also fails to use mul-highpart
for the 2nd mod 60.


More information about the Gcc-bugs mailing list