[Bug c/70742] Support div as a builtin

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 20 22:02:00 GMT 2016


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-04-20
            Summary|Add a builtin for obtaining |Support div as a builtin
                   |a quotient and remainder of |
                   |an integer division         |
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Let me reword the summary.  what you want is div and ldiv and imaxdiv to be
supported as a builtin, in that it expands correctly to do the div/mod inlined.

>The goal is that std::div and cstdlib's div can be reimplemented as calling this builtin.

Or rather they stay the way they are and GCC rewrites it to be correct.  AKA no
reimplementing at all.


More information about the Gcc-bugs mailing list