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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Hongyu Wang <[email protected]>:

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

commit r17-5243-gfb0ef8d42a46561e8ec8cb2fa49eebfb56c60a27
Author: Sun, Qin <[email protected]>
Date:   Thu Oct 15 13:54:39 2026 +0800

    i386: Fold MINP*/MAXP* builtins only if flag_trapping_math is unset

    ix86_gimple_fold_builtin folds all-ones-mask MINP*/MAXP* builtins
    to `a < b ? a : b` when optimizing, which drops {SAE}.
    Since x86 sets DE for denormal operands, {SAE} should be preserved, so
    we should enable the folding only if flag_trapping_math is unset.

            PR target/127648

    gcc/ChangeLog:

            * config/i386/i386.cc (ix86_gimple_fold_builtin): Disable the
            folding on flag_trapping_math.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr127648.c: New test.

Reply via email to