public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Vineet Gupta <vineetg@rivosinc.com>
Cc: gcc@gcc.gnu.org, Aldy Hernandez <aldyh@redhat.com>,
	Jeff Law <jeffreyalaw@gmail.com>,
	 Philipp Tomsich <philipp.tomsich@vrull.eu>,
	gnu-toolchain <gnu-toolchain@rivosinc.com>
Subject: Re: -Ofast/-ffast-math and SPEC 511.pov miscompilation with gcc 13.0
Date: Fri, 3 Feb 2023 08:36:29 +0100	[thread overview]
Message-ID: <CAFiYyc3YF4LUyL=5+TiUDFZTsE9jDJ_eUeDWR22Yfni15ufJTQ@mail.gmail.com> (raw)
In-Reply-To: <78f4bcde-74ac-428f-99fe-a6193c52362e@rivosinc.com>

On Fri, Feb 3, 2023 at 12:39 AM Vineet Gupta <vineetg@rivosinc.com> wrote:
>
> Hi,
>
> I've noticed SPEC 2017, 511.pov failing for RV64 on bleeding edge gcc.
> This is with -Ofast -march=rv64gcv_zba_zbb_zbc_zbs.
> Problem also happens with -O3 -ffast-math (and goes away with fast-math
> removed)
>
> I've bisected it to b7fd7fb50111 ("frange: drop endpoints to min/max
> representable numbers for -ffinite-math-only")
> With that commit evrp is eliding a bunch of if conditions as they
> pertain to inf (in code snippet below, it elides code corresponding to
> lines 1401-1418 with line 1417 being elided causing the failure).
>
> I think I know the answer, but  just wanted to confirm if that is the
> intended behavior given -Ofast / -ffast-math

It's the intended behavior of -ffinite-math-only which is part of
-Ofast / -ffast-math.  There's a CLOSED INVALID bug in bugzilla
about the povray failure as well.

Richard.

> Thx,
> -Vineet
>
>
> |New->Angle = __builtin_huge_val(); ||||switch(New->Type) ||{ ||...
> ||1246: if(Parse_Camera_Mods(New) == false) ||EXIT ||... ||} ||||1401:
> if (New->Up[X] == ||||__builtin_huge_val|()|) { ... } 1417: if
> (New->Angle != |||__builtin_huge_val|()) ||{ ||1419: if ((New->Type ==
> PERSPECTIVE_CAMERA) |||

  parent reply	other threads:[~2023-02-03  7:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 23:38 Vineet Gupta
2023-02-02 23:43 ` Vineet Gupta
2023-02-03  7:36 ` Richard Biener [this message]
2023-02-03 18:47   ` Vineet Gupta
2023-02-03 18:59     ` Richard Biener

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='CAFiYyc3YF4LUyL=5+TiUDFZTsE9jDJ_eUeDWR22Yfni15ufJTQ@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gnu-toolchain@rivosinc.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=vineetg@rivosinc.com \
    /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).