From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10967385843D; Mon, 19 Sep 2022 07:25:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10967385843D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663572325; bh=Y4/yI4+bG/dSwNIx7fLdzG6yvdylbrR4cBUrRBh+1R0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gs5MvRoNWc+duj5i1mzfBv+OzKfRE7swre7OAlF/STPhovNOVXKkD/MS6yl9MxB99 lq8+fWN2+bDIansh9dx5XpGyC2yCRBHd8nEdeZZliCNRwzYTHfUNb5aJ/aog74Wii7 JCRJr0xN+fK+llNm3LyJLW7tG85gjLU3Hee+fopM= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106902] [11/12/13 Regression] Program compiled with -O3 -mfma produces different result Date: Mon, 19 Sep 2022 07:25:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106902 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsm28 at gcc dot gnu.org --- Comment #12 from Richard Biener --- (In reply to Alexander Monakov from comment #11) > Can we move -ffp-contract=3Dfast under the -ffast-math umbrella and defau= lt to > -ffp-contract=3Don/off? That's probably a question for the frontend maintainers. > Isn't it easy now to implement -ffp-contract=3Don by a GENERIC-only match= .pd > rule? You mean in the frontend only for -ffp-contract=3Don? Maybe, I suppose FE specific folding would also work in that case. One would also need to read the fine prints in the language standards again as to whether FP contraction allows to form FMA for double tem =3D a * b; double res =3D tem + c; or across inlined function call boundaries which we'll happily do. Of course for the testcase at hand it's all in a single statement and no parens specify association (in case parens also matter here, like in Fortran). The fortran frontend adds PAREN_EXPRs as association barriers which also would prevent FMAs to be formed.=