public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/106574] gcc 12 with O3 leads to failures in glibc's y1f128 tests
Date: Thu, 11 Aug 2022 20:34:16 +0000	[thread overview]
Message-ID: <bug-106574-4-GV5os829Ew@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106574-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Wed, 10 Aug 2022, michael.hudson at canonical dot com via Gcc-bugs wrote:

> I just changed
> 
>       z = xx * xx;
> 
> to
> 
>       z = math_opt_barrier(xx * xx);
> 
> which perhaps isn't sufficient.

That wouldn't prevent the multiplication being moved before 
SET_RESTORE_ROUNDL, though it should suffice for the later computations as 
they all depend on z.

> But my reading of the assembly is that the issue is that some of the math code
> is being moved _after_ the restore of the fpu state implied by
> SET_RESTORE_ROUNDL (FE_TONEAREST).

To avoid code being moved after the restore, "math_force_eval (p);" just 
before the return would be appropriate.

  parent reply	other threads:[~2022-08-11 20:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 22:54 [Bug c/106574] New: " michael.hudson at canonical dot com
2022-08-09 23:12 ` [Bug target/106574] " michael.hudson at canonical dot com
2022-08-09 23:15 ` pinskia at gcc dot gnu.org
2022-08-09 23:18 ` michael.hudson at canonical dot com
2022-08-10  7:25 ` rguenth at gcc dot gnu.org
2022-08-10 14:58 ` joseph at codesourcery dot com
2022-08-10 21:26 ` michael.hudson at canonical dot com
2022-08-10 22:25 ` joseph at codesourcery dot com
2022-08-10 22:49 ` michael.hudson at canonical dot com
2022-08-10 22:54 ` michael.hudson at canonical dot com
2022-08-10 23:27 ` michael.hudson at canonical dot com
2022-08-11 20:34 ` joseph at codesourcery dot com [this message]
2022-08-11 21:36 ` michael.hudson at canonical dot com
2022-09-06 22:07 ` michael.hudson at canonical dot com
2022-09-06 22:14 ` pinskia 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-106574-4-GV5os829Ew@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).