public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/102498] [9/10 Regression] Long double constant and non-default rounding mode on x86
Date: Wed, 11 May 2022 06:22:32 +0000	[thread overview]
Message-ID: <bug-102498-4-1ri9wPCwKB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102498-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:8837138d292eb4221a5d5a985d25e487a127539d

commit r9-10102-g8837138d292eb4221a5d5a985d25e487a127539d
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Sep 28 13:02:51 2021 +0200

    i386: Don't emit fldpi etc. if -frounding-math [PR102498]

    i387 has instructions to store some transcedental numbers into the top of
    stack.  The problem is that what exact bit in the last place one gets for
    those depends on the current rounding mode, the CPU knows the number with
    slightly higher precision.  The compiler assumes rounding to nearest when
    comparing them against constants in the IL, but at runtime the rounding
    can be different and so some of these depending on rounding mode and the
    constant could be 1 ulp higher or smaller than expected.
    We only support changing the rounding mode at runtime if the non-default
    -frounding-mode option is used, so the following patch just disables
    using those constants if that flag is on.

    2021-09-28  Jakub Jelinek  <jakub@redhat.com>

            PR target/102498
            * config/i386/i386.c (standard_80387_constant_p): Don't recognize
            special 80387 instruction XFmode constants if flag_rounding_math.

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

    (cherry picked from commit 3b7041e8345c2f1030e58620f28e22d64b2c196b)

  parent reply	other threads:[~2022-05-11  6:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 14:27 [Bug c/102498] New: wrong output of printf with long double constant and non-default rounding mode zimmerma+gcc at loria dot fr
2021-09-27 15:00 ` [Bug c/102498] wrong output of printf with long double constant (pi) " vincent-gcc at vinc17 dot net
2021-09-27 15:11 ` [Bug target/102498] " jakub at gcc dot gnu.org
2021-09-27 15:20 ` jakub at gcc dot gnu.org
2021-09-27 16:50 ` vincent-gcc at vinc17 dot net
2021-09-27 22:35 ` [Bug target/102498] [9/10/11/12 Regression] Long double constant and non-default rounding mode on x86 pinskia at gcc dot gnu.org
2021-09-28  0:57 ` vincent-gcc at vinc17 dot net
2021-09-28  1:14 ` pinskia at gcc dot gnu.org
2021-09-28  8:17 ` vincent-gcc at vinc17 dot net
2021-09-28 11:03 ` cvs-commit at gcc dot gnu.org
2021-09-28 11:07 ` cvs-commit at gcc dot gnu.org
2021-09-28 11:10 ` [Bug target/102498] [9/10 " jakub at gcc dot gnu.org
2022-05-10  8:20 ` cvs-commit at gcc dot gnu.org
2022-05-10  8:46 ` zimmerma+gcc at loria dot fr
2022-05-10 11:57 ` vincent-gcc at vinc17 dot net
2022-05-10 12:00 ` vincent-gcc at vinc17 dot net
2022-05-11  6:22 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-11  6:36 ` jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102498-4-1ri9wPCwKB@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).