public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* -Ofast/-ffast-math and SPEC 511.pov miscompilation with gcc 13.0
@ 2023-02-02 23:38 Vineet Gupta
  2023-02-02 23:43 ` Vineet Gupta
  2023-02-03  7:36 ` Richard Biener
  0 siblings, 2 replies; 5+ messages in thread
From: Vineet Gupta @ 2023-02-02 23:38 UTC (permalink / raw)
  To: gcc; +Cc: Aldy Hernandez, Jeff Law, Philipp Tomsich, gnu-toolchain

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


|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) |||

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-02-03 19:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-02 23:38 -Ofast/-ffast-math and SPEC 511.pov miscompilation with gcc 13.0 Vineet Gupta
2023-02-02 23:43 ` Vineet Gupta
2023-02-03  7:36 ` Richard Biener
2023-02-03 18:47   ` Vineet Gupta
2023-02-03 18:59     ` Richard Biener

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).