From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C305385483C; Mon, 28 Jun 2021 07:26:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C305385483C From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101207] [12 Regression] gcc.dg/vect/vect-strided-*-mult.c fails after SLP improvements Date: Mon, 28 Jun 2021 07:26:46 +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.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: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 07:26:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101207 --- Comment #5 from Richard Biener --- Ah, so what happens is that we elide the load permutation that feeds the plus reduction originally but then we vectorize the live operands of the minus reduction as BIT_FIELD_REFs ending up extracting the wrong lanes. Testcase for x86_64: /* { dg-additional-options "-ftree-slp-vectorize -ffast-math" } */ double a[2]; double x, y; void __attribute__((noipa)) foo () { x =3D a[1] - a[0]; y =3D a[0] + a[1]; } int main() { a[0] =3D 0.; a[1] =3D 1.; foo (); if (x !=3D 1. || y !=3D 1.) __builtin_abort (); return 0; }=