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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuho...@gcc.gnu.org>:

https://gcc.gnu.org/g:d41a57c46df6f8f7dae0c0a8b349e734806a837b

commit r14-2403-gd41a57c46df6f8f7dae0c0a8b349e734806a837b
Author: liuhongt <hongtao....@intel.com>
Date:   Mon Jul 3 18:19:19 2023 +0800

    Add pre_reload splitter to detect fp min/max pattern.

    We have ix86_expand_sse_fp_minmax to detect min/max sematics, but
    it requires rtx_equal_p for cmp_op0/cmp_op1 and if_true/if_false, for
    the testcase in the PR, there's an extra move from cmp_op0 to if_true,
    and it failed ix86_expand_sse_fp_minmax.

    This patch adds pre_reload splitter to detect the min/max pattern.

    Operands order in MINSS matters for signed zero and NANs, since the
    instruction always returns second operand when any operand is NAN or
    both operands are zero.

    gcc/ChangeLog:

            PR target/110170
            * config/i386/i386.md (*ieee_max<mode>3_1): New pre_reload
            splitter to detect fp max pattern.
            (*ieee_min<mode>3_1): Ditto, but for fp min pattern.

    gcc/testsuite/ChangeLog:

            * g++.target/i386/pr110170.C: New test.
            * gcc.target/i386/pr110170.c: New test.

Reply via email to