From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5DB43858D1E; Mon, 19 Sep 2022 09:44:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5DB43858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663580690; bh=861bj/aTphILdacIaJ1WiT4kkOOT3jBaOVMlJyKuOLk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GF4nL/mXfVeJO4ovHlq7oTW5z0PfySMCm88frHIN7sf+y9sUBwZzEtN3r7NkQUspg OHj7Q3EnZmUl+zbHRfnJeLY0sfTNB4wh4l15OgnNK7IdKKfeJ8SrjjsLiauJvd/FfH vYASLnua2Qxw9XhyMwJ3j7XDRwF3+arA+TjvRlgQ= 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 09:44:50 +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: 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: resolution bug_status 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 ---------------------------------------------------------------------------- Resolution|INVALID |--- Status|RESOLVED |NEW --- Comment #14 from Richard Biener --- (In reply to Alexander Monakov from comment #13) > (In reply to Richard Biener from comment #12) > > Of course for the testcase at hand it's all in > > a single statement and no parens specify association (in case parens al= so > > matter here, like in Fortran). The fortran frontend adds PAREN_EXPRs > > as association barriers which also would prevent FMAs to be formed. >=20 > Please note that in this testcase GCC is breaking language semantics by > computing the same value in two different ways, and then using different > computed values in dependent computations. This could not have happened in > the abstract machine (there's a singular assignment in the original progr= am, > which is then used in subsequent iterations of the loop). Hmm, OK. I think we have a separate bugreport for this kind of thing. I c= an't seem to reproduce any vectorization for your smaller example though. For SLP vectorization the main source of "duplication" is when we have unvectorized uses of an SSA name (aka a LIVE def) and cannot use a lane extract but retain the scalar computations. In the updated Sample Program this happens once but the corresponding subgraph is then not profitable to vectorize for me, so it must be something else.=