From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 680613858405; Mon, 4 Oct 2021 07:53:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 680613858405 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2 Date: Mon, 04 Oct 2021 07:53:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on 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 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: Mon, 04 Oct 2021 07:53:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102583 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-10-04 Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- We're lacking stripping of a load that's only used partially I guess.=20 forwprop1 generates _1 =3D *srcp_11(D); _2 =3D BIT_FIELD_REF <_1, 32, 128>; _3 =3D (float) _2; _4 =3D BIT_FIELD_REF <_1, 32, 160>; _5 =3D (float) _4; _6 =3D BIT_FIELD_REF <_1, 32, 192>; _7 =3D (float) _6; _8 =3D BIT_FIELD_REF <_1, 32, 224>; _9 =3D (float) _8; _12 =3D VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>; _15 =3D BIT_FIELD_REF <_12, 128, 0>; _16 =3D (vector(4) float) _15; and the second forwprop then sees _1 =3D *srcp_3(D); _4 =3D VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>; _5 =3D BIT_FIELD_REF <_4, 128, 0>; _6 =3D (vector(4) float) _5; in a single-use chain we probably want to try swapping the BIT_FIELD_REF and the VEC_PERM_EXPR so that we expose the BIT_FIELD_REF directly to the load which we'd already handle.=