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

--- Comment #19 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:624d3af025e820ede7ec4334f7a2d5d4731c99a9

commit r15-3728-g624d3af025e820ede7ec4334f7a2d5d4731c99a9
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Sep 20 09:14:29 2024 +0200

    i386: Fix up _mm_min_ss etc. handling of zeros and NaNs [PR116738]

    min/max patterns for intrinsics which on x86 result in the second
    input operand if the two operands are both zeros or one or both of them
    are a NaN shouldn't use SMIN/SMAX RTL, because that is similarly to
    MIN_EXPR/MAX_EXPR undefined what will be the result in those cases.

    The following patch adds an expander which uses either a new pattern with
    UNSPEC_IEEE_M{AX,IN} or use the S{MIN,MAX} representation of the same.

    2024-09-20  Uros Bizjak  <ubiz...@gmail.com>
                Jakub Jelinek  <ja...@redhat.com>

            PR target/116738
            * config/i386/subst.md (mask_scalar_operand_arg34,
            mask_scalar_expand_op3, round_saeonly_scalar_mask_arg3): New
            subst attributes.
            * config/i386/sse.md
           
(<sse>_vm<code><mode>3<mask_scalar_name><round_saeonly_scalar_name>):
            Change from define_insn to define_expand, rename the old
define_insn
            to ...
           
(*<sse>_vm<code><mode>3<mask_scalar_name><round_saeonly_scalar_name>):
            ... this.
           
(<sse>_ieee_vm<ieee_maxmin><mode>3<mask_scalar_name><round_saeonly_scalar_name>):
            New define_insn.

            * gcc.target/i386/sse-pr116738.c: New test.

Reply via email to