From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 415C33858025; Fri, 5 Mar 2021 14:49:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 415C33858025 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/99411] s311, s312, s31111 and s31111, s3110 benchmark of TSVC is vectorized by clang better than by gcc Date: Fri, 05 Mar 2021 14:49:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc 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: Fri, 05 Mar 2021 14:49:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99411 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|s311, s312, s31111 and |s311, s312, s31111 and |s31111 benchmark of TSVC is |s31111, s3110 benchmark of |vectorized by clang better |TSVC is vectorized by clang |than by gcc |better than by gcc --- Comment #4 from Jan Hubicka --- typedef float real_t; #define iterations 100000 #define LEN_1D 32000 #define LEN_2D 256 real_t a[LEN_1D]; real_t aa[LEN_2D][LEN_2D]; int main() { // reductions // if to max with index reductio 2 dimensions // similar to S315 int xindex, yindex; real_t max, chksum; for (int nl =3D 0; nl < 100*(iterations/(LEN_2D)); nl++) { max =3D aa[(0)][0]; xindex =3D 0; yindex =3D 0; for (int i =3D 0; i < LEN_2D; i++) { for (int j =3D 0; j < LEN_2D; j++) { if (aa[i][j] > max) { max =3D aa[i][j]; xindex =3D i; yindex =3D j; } } } chksum =3D max + (real_t) xindex + (real_t) yindex; } return max + xindex+1 + yindex+1; }=