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

--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #6)
> Or would you prefer:
> --- gcc/config/i386/i386.c.jj 2019-04-16 10:40:15.077091789 +0200
> +++ gcc/config/i386/i386.c    2019-04-23 11:55:59.397227347 +0200
> @@ -23712,7 +23712,10 @@ ix86_expand_sse_fp_minmax (rtx dest, enu
>    else
>      {
>        code = is_min ? SMIN : SMAX;
> -      tmp = gen_rtx_fmt_ee (code, mode, if_true, if_false);
> +      rtx operands[3] = { dest, if_true, if_false };
> +      ix86_fixup_binary_operands_no_copy (code, mode, operands);
> +      tmp = gen_rtx_fmt_ee (code, mode, operands[1], operands[2]);
> +      dest = operands[0];
>      }
>  
>    emit_insn (gen_rtx_SET (dest, tmp));
> instead?  I think a switch on mode to handle all the possible modes in there
> and assign the different gen_{smin,smax}* in those cases would be too large.

No, the proposed patch that forces if_true operand to a register should be
enough. It doesn't make much difference calling ix86_fixup_binary_operands_*
without memory output operand.

Reply via email to