From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8FA313870891; Thu, 14 Jan 2021 13:26:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FA313870891 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98674] [10/11 Regression] vectorizer failed for compilation time alias Date: Thu, 14 Jan 2021 13:26:32 +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: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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, 14 Jan 2021 13:26:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98674 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marxin at gcc dot gnu.org --- Comment #4 from Richard Biener --- (In reply to Richard Biener from comment #3) > While GCC 9 vectorizes this case (and thus the vectorization failure is a > regression) dependence analysis isn't presented with the problematical ac= cess > but instead we see >=20 > _1 =3D *p_22; > _5 =3D (unsigned short) _1; > bswapdst_10 =3D _5 r>> 8; > _8 =3D (short int) bswapdst_10; > *p_22 =3D _8; >=20 > where the problematical access is created by the bswap pass which > detects >=20 > 16 bit bswap implementation found at: _8 =3D _4 | _7; >=20 > creates the replacement load but then fails half-way, not emitting a > bswap!? That's a bug worth fixing IMHO (either do all or none of the > transform). Oh, so it produces load_dst_11 =3D MEM[(short int *)p_22]; bswapdst_10 =3D load_dst_11 r>> 8; _8 =3D (short int) bswapdst_10; *p_22 =3D _8; it's just pattern recog that turns the rotate back to a shift sequence. So indeed dependence analysis is what should be fixed.=