public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vineet Gupta <vineetg@rivosinc.com>
To: gcc@gcc.gnu.org
Cc: 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: Thu, 2 Feb 2023 15:43:18 -0800	[thread overview]
Message-ID: <1e1f1d89-3f9e-8b98-6e82-0c6c43994ad5@rivosinc.com> (raw)
In-Reply-To: <78f4bcde-74ac-428f-99fe-a6193c52362e@rivosinc.com>



On 2/2/23 15:38, Vineet Gupta 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
>
> Thx,
> -Vineet

Apologies, mailer munged the code snippet

     New->Angle = __builtin_huge_val();
...
    switch(New->Type)
    {
...
1246:    if(Parse_Camera_Mods(New) == false)
                       EXIT
...
     }

1401:   if (New->Up != __builtin_huge_val())
             {
...
             }

1417:   if (New->Angle != __builtin_huge_val())
             {
1419:       if ((New->Type == PERSPECTIVE_CAMERA) ||
||

  reply	other threads:[~2023-02-02 23:43 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 [this message]
2023-02-03  7:36 ` Richard Biener
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=1e1f1d89-3f9e-8b98-6e82-0c6c43994ad5@rivosinc.com \
    --to=vineetg@rivosinc.com \
    --cc=aldyh@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gnu-toolchain@rivosinc.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=philipp.tomsich@vrull.eu \
    /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).