From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D309C3858D33; Tue, 13 Jun 2023 03:45:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D309C3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686627931; bh=eVGZLCggLL+SKGOLgrH4z5z7gP3vehSBR9N0Vz50MHQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WDPfknEyo6KUeA02onBqTW+S/Qa/98mEldSVUceFbGcHamT67gKxQvpzJPtawM1+k q3qD0oNQ23z4HVCqbv9/ntsLG0xPhIiA+TYWlJQhdB6Teig/9UGpciIAar6W6cGSsR /mbdMEVGkUdzGD3vTSzvvIC/W0BtKzF8bhA8V4sI= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108410] x264 averaging loop not optimized well for avx512 Date: Tue, 13 Jun 2023 03:45:30 +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: crazylht at gmail dot com 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 #8 from Hongtao.liu --- > 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. I see, we don't have scalar version. Also vector instruction looks not very fast. https://uops.info/html-instr/VPMOVSDB_XMM_XMM.html=