From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F11D7396EC9C; Thu, 7 Jan 2021 15:19:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F11D7396EC9C From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98544] [11 regression] Wrong code generated by tree vectorizer since r11-3917-g28290cb50c7dbf87 Date: Thu, 07 Jan 2021 15:19:55 +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: 11.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: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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: Thu, 07 Jan 2021 15:19:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98544 --- Comment #11 from Richard Biener --- Or massaging the C++ to produce a single-function testcase (driver still missing, I think we can remove the "unrelated" loops as well). What kind of shape (= w/o too much guessing) is the function expecting for its input arrays? typedef unsigned long size_t; template inline void PM(T &a, T &b, T c, T d) { a=3Dc+d; b=3Dc-d; } template inline void MULPM (T1 &a, T1 &b, T2 c, T2 d, T3 e, T3 f) { a=3Dc*e+d*f; b=3Dc*f-d*e; } typedef double T; void radb2(size_t ido, size_t l1, const T * __restrict cc, T * __restrict ch, const T * __restrict wa) { auto WA =3D [wa,ido](size_t x, size_t i) { return wa[i+x*(ido-1)]; }; auto CC =3D [cc,ido](size_t a, size_t b, size_t c) -> const T& { return cc[a+ido*(b+2*c)]; }; auto CH =3D [ch,ido,l1](size_t a, size_t b, size_t c) -> T& { return ch[a+ido*(b+l1*c)]; }; for (size_t k=3D0; k