From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1CF363858D3C; Mon, 14 Nov 2022 11:49:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CF363858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668426571; bh=9r9WnoxOKfrX/wRkN+s4xwlN99GSDcJoXW0mNf62DGE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iQxnXy8irukZj6oBK38hJ2iNUgePLbsuiSFG7OePwKp90zUvj+pljkoVmsl2qH09q ukM9uw5xLuRvnlbAHlj8xwJM9fQABoyZwhTLDtU4zscv+E8LgICd2ZQX8eV5tiBcsx V+5HaCumbouFbA2FLJvINhGGlzZoFyBqbwATik5k= 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:49:25 +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: 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 --- Comment #9 from Richard Biener --- Ah, we only fold those to internal functions _after_ vectorization. SLP wi= ll see double x[2]; void foo (double a, double b, double * __restrict c) { x[0] =3D __builtin_fma (a, b, c[0]); x[1] =3D __builtin_fma (a, b, -c[1]); } as two calls to FMA and thus fail to optimially vectorize it.=