From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BC45F3858D1E; Mon, 14 Nov 2022 11:43:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BC45F3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668426195; bh=FVkLFYRtTQYkKFJ9vr63NurFOIKzjS3fnID7m5T1bqM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KtSSPEQ9VAw8JafRRstZp4vO5p42X+1WAms8t+F99VvuxVQKt1ArWX3m4/hTqvXR9 OO4hyDrpi71EvbWScm+N6rFQAdKOwxDansXkH8F4LlfzTMyXpSGeel/Ory2lgsEPeX W076hmRy6r+MqkQGQzqBDaxTSp6z3YPP2GqhnwBQ= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107647] [12/13 Regression] GCC 12.2.0 may produce FMAs even with -ffp-contract=off Date: Mon, 14 Nov 2022 11:43:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to priority 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=3D107647 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org Priority|P3 |P2 --- Comment #8 from Richard Biener --- I think the SLP pattern detection doesn't even work with a FMADD, FMSUB com= bo. We don't generate FMSUB early, not sure if we could somehow trick us into folding one with __builtin_fma, maybe __builtin_fma (x, y, -z) would do, I'd have to check. So yes, the SLP pattern detection introduces a FMA where none was before (and then vectorizes it). I'll fix it.=