From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DBFA33858C2F; Wed, 31 Jan 2024 08:32:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DBFA33858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706689935; bh=TPyNm/0iBlSOdHIdaXVgmxjQxDA8ysbr88bx/cINirU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=BO3uAGECOaZ0KDd1Fan8GWRzVuLeheLjAd8GaGPmg75qJTaJx9tYiDLU1wJCc9L+r qcWE9rv7t6U7jUtDWmZqGyRPIzbXdhiz2hKto7KIszncTb2eecyeM5SafnfuWKFhys TAexl32B1G6TLW99DizJiBwd+SkZqLcdBJ/dBrYc= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113678] SLP misses up vec_concat Date: Wed, 31 Jan 2024 08:32:14 +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: 14.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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on bug_status everconfirmed 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=3D113678 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-01-31 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- I think the SLP tree we discover is sound: t2.c:11:14: note: node 0x5db76f0 (max_nunits=3D8, refcnt=3D2) vector(8) c= har t2.c:11:14: note: op template: *a_7(D) =3D _1; t2.c:11:14: note: stmt 0 *a_7(D) =3D _1; t2.c:11:14: note: stmt 1 MEM[(char *)a_7(D) + 1B] =3D _2; t2.c:11:14: note: stmt 2 MEM[(char *)a_7(D) + 2B] =3D _3; t2.c:11:14: note: stmt 3 MEM[(char *)a_7(D) + 3B] =3D _4; t2.c:11:14: note: stmt 4 MEM[(char *)a_7(D) + 4B] =3D _1; t2.c:11:14: note: stmt 5 MEM[(char *)a_7(D) + 5B] =3D _2; t2.c:11:14: note: stmt 6 MEM[(char *)a_7(D) + 6B] =3D _3; t2.c:11:14: note: stmt 7 MEM[(char *)a_7(D) + 7B] =3D _4; t2.c:11:14: note: children 0x5db7778 t2.c:11:14: note: node 0x5db7778 (max_nunits=3D8, refcnt=3D2) vector(8) c= har t2.c:11:14: note: op template: _1 =3D *b_6(D); t2.c:11:14: note: stmt 0 _1 =3D *b_6(D); t2.c:11:14: note: stmt 1 _2 =3D MEM[(char *)b_6(D) + 1B]; t2.c:11:14: note: stmt 2 _3 =3D MEM[(char *)b_6(D) + 2B]; t2.c:11:14: note: stmt 3 _4 =3D MEM[(char *)b_6(D) + 3B]; t2.c:11:14: note: stmt 4 _1 =3D *b_6(D); t2.c:11:14: note: stmt 5 _2 =3D MEM[(char *)b_6(D) + 1B]; t2.c:11:14: note: stmt 6 _3 =3D MEM[(char *)b_6(D) + 2B]; t2.c:11:14: note: stmt 7 _4 =3D MEM[(char *)b_6(D) + 3B]; t2.c:11:14: note: load permutation { 0 1 2 3 0 1 2 3 } the issue is as so often t2.c:11:14: note: =3D=3D> examining statement: _1 =3D *b_6(D); t2.c:11:14: missed: BB vectorization with gaps at the end of a load is not supported t2.c:3:19: missed: not vectorized: relevant stmt not supported: _1 =3D *b= _6(D); t2.c:11:14: note: Building vector operands of 0x5db7778 from scalars inst= ead where we are not applying much non-ad-hoc work to deal with those "out-of-bound" accesses. The choice here would be obvious in doing a single vector(4) load instead.=