From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5F98B3856DD5; Mon, 5 Sep 2022 18:02:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F98B3856DD5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662400942; bh=MLqLThGO8nNiinZS3MQAUV5OGkUcWrgBdpwssb3tS/M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=f5mEF83zu4bPE0OFzEIsVpPkeSsXEojGGqc5SEX2vh6v6MIFFOOUbE3OgUpYYB8cJ XPfsbmLyAO5Hj7fhNfIRRc4CZrTU+73iHQR2mY/zB0241JGPPQs+J2YQg9XHKFI8TG I/iqOLpbtJ+U3qyDl5wPuTxXGZFjpqk41gq7tC7Y= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106453] Redundant zero extension after crc32q Date: Mon, 05 Sep 2022 18:02:22 +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: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: cvs-commit 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: 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=3D106453 --- Comment #3 from CVS Commits --- The master branch has been updated by Alexander Monakov : https://gcc.gnu.org/g:810d9815249451f477d4cbc67b8e4a0819c37faa commit r13-2448-g810d9815249451f477d4cbc67b8e4a0819c37faa Author: Alexander Monakov Date: Tue Aug 23 18:42:24 2022 +0300 i386: avoid zero extension for crc32q The crc32q instruction takes 64-bit operands, but ignores high 32 bits of the destination operand, and zero-extends the result from 32 bits. Let's model this in the RTL pattern to avoid zero-extension when the _mm_crc32_u64 intrinsic is used with a 32-bit type. PR target/106453 gcc/ChangeLog: * config/i386/i386.md (sse4_2_crc32di): Model that only low 32 bits of operand 0 are consumed, and the result is zero-extended to 64 bits. gcc/testsuite/ChangeLog: * gcc.target/i386/pr106453.c: New test.=