https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95740
Hongtao.liu <crazylht at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |crazylht at gmail dot com --- Comment #2 from Hongtao.liu <crazylht at gmail dot com> --- Increase constraints preference and reduce sse->integer move cost can't help it. ---- modified gcc/config/i386/i386.md @@ -2294,9 +2294,9 @@ (define_insn "*movsi_internal" [(set (match_operand:SI 0 "nonimmediate_operand" - "=r,m ,*y,*y,?*y,?m,?r,?*y,*v,*v,*v,m ,?r,?*v,*k,*k ,*rm,*k") + "=r,m ,*y,*y,?*y,?m,?r,?*y,*v,*v,*v,r ,m,?*v,*k,*k ,*rm,*k") (match_operand:SI 1 "general_operand" - "g ,re,C ,*y,m ,*y,*y,r ,C ,*v,m ,*v,*v,r ,*r,*km,*k ,CBC"))] + "g ,re,C ,*y,m ,*y,*y,r ,C ,*v,m ,v,*v,r ,*r,*km,*k ,CBC"))] "!(MEM_P (operands[0]) && MEM_P (operands[1]))" { switch (get_attr_type (insn)) modified gcc/config/i386/x86-tune-costs.h @@ -1624,7 +1624,7 @@ struct processor_costs skylake_cost = { in 32,64,128,256 and 512-bit */ {8, 8, 8, 12, 24}, /* cost of storing SSE registers in 32,64,128,256 and 512-bit */ - 6, 6, /* SSE->integer and integer->SSE moves */ + 2, 2, /* SSE->integer and integer->SSE moves */ ------ It seems to me for insn inserted reloaded before 18: r89:SI=r87:SF#0 (insn 18 16 6 2 (set (reg:SI 89) (subreg:SI (reg:SF 87) 0)) LRA prefer to put reg:SI 89 into memory since it would be used later.