https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70873
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Bernd Schmidt from comment #10)
> Looks to me like epilogue_completed would be a good predicate. I'll put the
> following in a bootstrap, let me know if you're OK with this patch.
>
> Index: i386.md
> ===================================================================
> --- i386.md (revision 235808)
> +++ i386.md (working copy)
> @@ -5196,12 +5196,13 @@ (define_split
>
> ;; Break partial reg stall for cvtsd2ss.
>
> -(define_peephole2
> +(define_split
> [(set (match_operand:SF 0 "register_operand")
> (float_truncate:SF
> (match_operand:DF 1 "nonimmediate_operand")))]
> "TARGET_SSE2 && TARGET_SSE_MATH
> && TARGET_SSE_PARTIAL_REG_DEPENDENCY
> + && epilogue_completed
> && optimize_function_for_speed_p (cfun)
> && SSE_REG_P (operands[0])
> && (!SSE_REG_P (operands[1])
> @@ -5223,13 +5224,14 @@ (define_peephole2
>
> ;; Break partial reg stall for cvtss2sd.
>
> -(define_peephole2
> +(define_split
> [(set (match_operand:DF 0 "register_operand")
> (float_extend:DF
> (match_operand:SF 1 "nonimmediate_operand")))]
> "TARGET_SSE2 && TARGET_SSE_MATH
> && TARGET_SSE_PARTIAL_REG_DEPENDENCY
> + && epilogue_completed
> && optimize_function_for_speed_p (cfun)
> && SSE_REG_P (operands[0])
> && (!SSE_REG_P (operands[1])
> || REGNO (operands[0]) != REGNO (operands[1]))
I still see:
vcvtss2sd (%ecx,%eax,4), %xmm5, %xmm5
without vxorpd.