From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E5E1384645E; Thu, 18 May 2023 08:31:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E5E1384645E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684398677; bh=uRpXMuVA327QnIKU3+xi6FjFtugQVgt8JXOcIdKGtow=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oiIuM0ddvenUXTzTBIYjxutD2HLHWdNPIbHu0maPDQrjHjsF9E0JE/zbTZPw2Byei wHqec39AZMeYwah+W1E4T2wVk8v2Qf6i4XjxtokmgR6QmJaM4zO2IVZRuwtXGvj4mM nZ+Q6iQmCCQizI0AG7FcJwrPbyQuUuVaOfQSFRe8= From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106902] [11/12/13/14 Regression] Program compiled with -O3 -mfma produces different result Date: Thu, 18 May 2023 08:31:10 +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: amonakov at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: 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 --- Comment #25 from Alexander Monakov --- (In reply to Richard Biener from comment #24) > As of the patch it looks good, I wonder if we want to check for OPTIMIZE_= BOTH > though since at least when no extra negations are required the contraction > should also be a win when optimizing for size? Makes sense, I'll change that (current target hooks always return true for fma). > Also I wondered about the PROP_gimple_any check - do we get into the > gimplification langhook after lowering? I see we are not resetting the > langhook after lowering (only in free-lang-data, but that only runs with > LTO). Yes, that surprised me. I caught it when analyzing ICE on slp-50.c testcase. > We probably at least should gate the langhook invocation in the gimplifier > with what you added in the patch or specify whether the gimplifier is > invoked from the middle-end via the gimplifier context. Perhaps. I'll add a comment that we want to handle -ffp-contract=3Don stric= tly during initial gimplification, to hash this out further on gcc-patches, if necessary.=20=20 > If we go for c-family only the genericize entry could be another place to > handle this. That seems less convenient to me. Is IFN_FMA representable as a tree? > Did you run into any of NON_LVALUE / C_MAYBE_CONST wrappings of the > multiplication btw? No, I'm not familiar with those, so I didn't try to construct corresponding testcases.=