public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/109004] [10/11/12/13 Regression] wrong code for -O2 (any above -O0) with g++ 11.3 for POWER9 (cross-compiler on x86_64 host)
Date: Thu, 16 Mar 2023 11:49:04 +0000	[thread overview]
Message-ID: <bug-109004-4-OfatxhiwBi@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109004-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The program uses xsmincdp and xsmaxcdp instructions and it feels as if qemu
implements the latter exactly the same as the former.
So, I guess simpler testcase would be compile with -O2 -mcpu=power9 -ffast-math
__attribute__((noipa)) float
mymin (float x, float y)
{
  return __builtin_fminf (x, y);
}

__attribute__((noipa)) float
mymax (float x, float y)
{
  return __builtin_fmaxf (x, y);
}

int
main ()
{
  if (mymin (1.0f, 2.0f) != 1.0f)
    __builtin_abort ();
  if (mymax (1.0f, 2.0f) != 2.0f)
    __builtin_abort ();
}
and see if it aborts under qemu or not.

  parent reply	other threads:[~2023-03-16 11:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03  9:59 [Bug target/109004] New: " bugreporter66 at gmail dot com
2023-03-03 12:32 ` [Bug target/109004] [10/11/12/13 Regression] " rguenth at gcc dot gnu.org
2023-03-04  6:42 ` bugreporter66 at gmail dot com
2023-03-15  8:43 ` jakub at gcc dot gnu.org
2023-03-16 10:40 ` bugreporter66 at gmail dot com
2023-03-16 10:45 ` bugreporter66 at gmail dot com
2023-03-16 11:01 ` bugreporter66 at gmail dot com
2023-03-16 11:12 ` jakub at gcc dot gnu.org
2023-03-16 11:29 ` bugreporter66 at gmail dot com
2023-03-16 11:49 ` jakub at gcc dot gnu.org [this message]
2023-03-16 12:47 ` bugreporter66 at gmail dot com
2023-03-16 12:48 ` bugreporter66 at gmail dot com
2023-03-16 12:51 ` bugreporter66 at gmail dot com

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-109004-4-OfatxhiwBi@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).