https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126328
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- Created attachment 65107 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65107&action=edit patch for combine With this patch for combine the diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index ab04290bf7c..c2f4931a51a 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -22714,6 +22714,15 @@ ix86_insn_cost (rtx_insn *insn, bool speed) : COSTS_N_INSNS (3) + 1; } } + if (INSN_CODE (insn) >= 0 + && (get_attr_type (insn) == TYPE_SSEADD1 + || strcmp (insn_data[INSN_CODE (insn)].name, "*sse3_haddv2df3") == 0)) + { + return insn_cost + ix86_vec_cost (GET_MODE (pat), + (speed ? ix86_tune_cost + : &ix86_size_cost)->addss); + } hack works fine
