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

--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #7)

> I think the issue is that we pad out the compare RTXen with zeros but
> not the RHS when they are equal to the compare operands.  We then later
> are not able to combine to maxps.
> 
> Something like
> 
> diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
> index 9a8d6030d8b..8b846306fd6 100644
> --- a/gcc/config/i386/mmx.md
> +++ b/gcc/config/i386/mmx.md
> @@ -1184,6 +1184,14 @@
>  
>    emit_insn (gen_movq_v2sf_to_sse (ops[5], operands[5]));
>    emit_insn (gen_movq_v2sf_to_sse (ops[4], operands[4]));
> +  if (rtx_equal_p (operands[5], operands[2]))
> +    ops[2] = ops[5];
> +  else if (rtx_equal_p (operands[5], operands[1]))
> +    ops[1] = ops[5];
> +  if (rtx_equal_p (operands[4], operands[1]))
> +    ops[1] = ops[4];
> +  else if (rtx_equal_p (operands[4], operands[2]))
> +    ops[2] = ops[4];
>  
>    bool ok = ix86_expand_fp_vcond (ops);
>    gcc_assert (ok);

This is with gcc-14? Because current mainline doesn't have vcond expander
anymore.

Reply via email to