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

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2018-11-28
           Assignee|unassigned at gcc dot gnu.org      |segher at gcc dot 
gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Confirmed.

We start with

insn_cost 12 for      6: r121:TI=[r124:DI]
      REG_DEAD r124:DI
insn_cost 4 for     9: r122:DF=r121:TI#0
insn_cost 4 for    10: r123:DF=r121:TI#8
      REG_DEAD r121:TI

What we really want is a 6+9+10 combination.  But combine does not currently
try to do such a thing (both 9 and 10 link back via the same reg).  It does
try to do 6+9, but that needs to do a 2->2 combine, which it doesn't do because
it started off with a move insn, it needs one in the end as well, and even if
we didn't have such restrictions for 2->2, the insn_costs for the insns you end
up with is bigger than that for what you started with (only when also combining
it with insn 10 it becomes a lot lower).

So, I'll see if I can easily make it try 6+9+10 here.

Reply via email to