From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D11F63858CDA; Tue, 13 Jun 2023 08:05:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D11F63858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686643523; bh=N0L50dyUIfvJH+BqEBDycoq3Nlw5bk0RXUo9k5v2f9g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XzuhejdvgohSyS6mZs4gewnDNJjhaLOwoLwNxA+hadX8bybCM1fU6vw8JWVsp6Z83 6QtHUptmcPieEtOCZCeprp9UX0xbKWwpn9WoMbcEXqQLOGFHfg/wWe8msAvf4EGQ9N NWkHgQaSoHmU1U5XWeArYVpKQVAWal0qrjuB41wc= From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108410] x264 averaging loop not optimized well for avx512 Date: Tue, 13 Jun 2023 08:05:23 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de 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: 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=3D108410 --- Comment #9 from rguenther at suse dot de --- On Tue, 13 Jun 2023, crazylht at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108410 >=20 > --- Comment #8 from Hongtao.liu --- >=20 > > Can x86 do this? We'd want to apply this to a scalar, so move ivtmp > > to xmm, apply pack_usat or as you say below, the non-existing us_trunc > > and then broadcast. >=20 > I see, we don't have scalar version. Also vector instruction looks not ve= ry > fast. >=20 > https://uops.info/html-instr/VPMOVSDB_XMM_XMM.html Uh, yeah. Well, Zen4 looks reasonable though latency could be better. Preliminary performance data also shows masked epilogues are a mixed bag. I'll finish off the implementation and then we'll see if we can selectively enable it for the profitable cases somehow.=