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

2018-01-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80929

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.3 |7.4

--- Comment #12 from Richard Biener  ---
GCC 7.3 is being released, adjusting target milestone.

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

2017-11-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80929

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4

--- Comment #11 from Jakub Jelinek  ---
On the trunk the backend can deal with this using a hook.  So it is a target
issue if anything else needs solving.

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

2017-11-29 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80929

--- Comment #10 from Jakub Jelinek  ---
Author: jakub
Date: Wed Nov 29 10:31:36 2017
New Revision: 255228

URL: https://gcc.gnu.org/viewcvs?rev=255228=gcc=rev
Log:
PR middle-end/80929
* rtlanal.c (seq_cost): For non-single_set insns try to use insn_cost.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/rtlanal.c

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

2017-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80929

--- Comment #9 from Jakub Jelinek  ---
Created attachment 42729
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42729=edit
gcc8-pr80929.patch

Like this untested patch.

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

2017-11-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80929

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #8 from Jakub Jelinek  ---
The problem is that for non-single set PARALLELs there is just not a good guess
what to do without target's help.  For some targets and such insns, the best
cost estimate could be maximum of the cost of both sets, for others ignoring
one of them and looking only at the other one, for others the sum of both
costs.
E.g. the various compare + arithmetics pattern on many targets really have the
cost of the arithmetics - pattern_cost even has code for that case.
insn_cost (I'm not aware of insn_rtx_cost) has a way for the target to override
it and therefore you could in the backend decide what to do.
seq_cost doesn't, perhaps it could just call insn_cost for non-single_set
insns.

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

2017-08-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80929

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.2 |7.3

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

2017-08-14 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80929

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.2 |7.3

--- Comment #8 from Richard Biener  ---
GCC 7.2 is being released, adjusting target milestone.

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

2017-07-30 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80929

Georg-Johann Lay  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  ---
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.