This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/80929] [6/7/8 Regression] Division with constant no more optimized to mult highpart
- From: "gjl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 30 Jul 2017 12:51:38 +0000
- Subject: [Bug middle-end/80929] [6/7/8 Regression] Division with constant no more optimized to mult highpart
- Auto-submitted: auto-generated
- References: <bug-80929-4@http.gcc.gnu.org/bugzilla/>
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.