From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C633F384F02A; Thu, 1 Jul 2021 10:38:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C633F384F02A From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101280] [12 Regression] TSVC s231 slower with -Ofast -march=znver1 since r12-1836-g0ad9d88a3d7170b3 Date: Thu, 01 Jul 2021 10:38: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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed cf_reconfirmed_on 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, 01 Jul 2021 10:38:55 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101280 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2021-07-01 --- Comment #3 from Richard Biener --- void dummy (double *, double *); #define LEN_2D 32 double aa[LEN_2D][LEN_2D], bb[LEN_2D][LEN_2D]; double s231(int iterations) { // loop interchange // loop with data dependency for (int nl =3D 0; nl < 100*(iterations/LEN_2D); nl++) { for (int i =3D 0; i < LEN_2D; ++i) { for (int j =3D 1; j < LEN_2D; j++) { aa[j][i] =3D aa[j - 1][i] + bb[j][i]; } } dummy(aa[0],bb[0]); } } compiles and > gcc-11 t.c -O3 -fopt-info-loop -S t.c:9:27: optimized: loops interchanged in loop nest t.c:10:31: optimized: loop vectorized using 16 byte vectors t.c:4:8: optimized: loop with 15 iterations completely unrolled (header execution count 33608120) while trunk only vectorizes.=