public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Concerns regarding the -ffp-contract=fast default
@ 2023-09-14 16:48 Florian Weimer
  2023-09-14 17:09 ` Alexander Monakov
  0 siblings, 1 reply; 18+ messages in thread
From: Florian Weimer @ 2023-09-14 16:48 UTC (permalink / raw)
  To: gcc

While rebuilding CentOS Stream with -march=x86-64-v3, I rediscovered
several packages had test suite failures because x86-64 suddenly gained
FMA support.  I say “rediscovered” because these issues were already
visible on other architectures with FMA.

So far, our package/architecture maintainers had just disabled test
suites or had built the package with -fp-contract=off because the
failures did not reproduce on x86-64.  I'm not sure if this is the right
course of action.

GCC contraction behavior is rather inconsistent.  It does not contract x
+ x - x without -ffast-math, for example, although I believe it would be
permissible under the rules that enable FMA contraction.  This whole
thing looks suspiciously like a quick hack to get a performance
improvement from FMA instructions (sorry).

I know that GCC 14 has -fp-contract=standard.  Would it make sense to
switch the default to that?  If it fixes those package test suites, it
probably has an observable performance impact. 8-/

Thanks,
Florian


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

end of thread, other threads:[~2023-09-18 17:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-14 16:48 Concerns regarding the -ffp-contract=fast default Florian Weimer
2023-09-14 17:09 ` Alexander Monakov
2023-09-18  7:50   ` Alexander Monakov
2023-09-18  8:06     ` Richard Biener
2023-09-18 10:10       ` Florian Weimer
2023-09-18 10:37         ` Richard Biener
2023-09-18 11:37           ` Florian Weimer
2023-09-18 11:12         ` Alexander Monakov
2023-09-18 11:34           ` Florian Weimer
2023-09-18 11:55             ` Alexander Monakov
2023-09-18 16:41               ` Florian Weimer
2023-09-18 17:31                 ` Alexander Monakov
2023-09-18 17:39                   ` Joseph Myers
2023-09-18 11:26       ` Martin Uecker
2023-09-18 11:32         ` Jakub Jelinek
2023-09-18 11:43           ` Alexander Monakov
2023-09-18 12:13             ` Martin Uecker
2023-09-18 15:38               ` Alexander Monakov

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