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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
   Last reconfirmed|                            |2026-07-21

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
[...]
> That works for the case at hand, but is still quite arbitrary cost,
> but it avoids regressing gcc.target/i386/pr54400.c when we SLP vectorize
> the horizontal reductions.
> 
> @@ -23538,8 +23547,10 @@ ix86_rtx_costs (rtx x, machine_mode mode, int
> outer_code_i, int opno,
>        /* ??? Assume all of these vector manipulation patterns are
>          recognizable.  In which case they all pretty much have the
>          same cost.
> -        ??? We should still recruse when computing cost.  */
> +        ??? We should still recurse when computing cost.  */
>       *total = cost->sse_op;
> +     if (GET_CODE (XEXP (x, 0)) == PLUS || GET_CODE (XEXP (x, 0)) == MINUS)
> +       return false;
>       return true;
>  
>      case VEC_SELECT:

that said, I'll try to cook up a complete match for hadd matching in
the insn_cost hook.

Reply via email to