From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 53D133857723; Tue, 30 May 2023 09:54:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53D133857723 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685440482; bh=LyFUVaQN5L3LBTPMBFBERz6jSwCUtWYJLtFqA8rzuZ4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Oq0GhWeJdaDJSdTAPXKVPaHTe3K659eMv6D+hVOA/CQtXd37/dE2G+EpsnT8Vslqd ZWnpF5/19Kvpz6+366Xwl9BD1/0bOfEKstTOAYKfb5JHbnBMIbxtWx7jWz/kMkmaJ5 KONoYOPzner4/WX2vS4l6jz/603GksXEGDHZQdkE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108938] Missing bswap detection Date: Tue, 30 May 2023 09:54:39 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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=3D108938 --- Comment #16 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:d8545fb2c71683f407bfd96706103297d4d6e27b commit r14-1402-gd8545fb2c71683f407bfd96706103297d4d6e27b Author: liuhongt Date: Mon Mar 6 15:35:37 2023 +0800 Detect bswap + rotate for byte permutation in pass_bswap. The patch doesn't handle: 1. cast64_to_32, 2. memory source with rsize < range. gcc/ChangeLog: PR middle-end/108938 * gimple-ssa-store-merging.cc (is_bswap_or_nop_p): New function, cut from original find_bswap_or_nop function. (find_bswap_or_nop): Add a new parameter, detect bswap + rotate and save rotate result in the new parameter. (bswap_replace): Add a new parameter to indicate rotate and generate rotate stmt if needed. (maybe_optimize_vector_constructor): Adjust for new rotate parameter in the upper 2 functions. (pass_optimize_bswap::execute): Ditto. (imm_store_chain_info::output_merged_store): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/pr108938-1.c: New test. * gcc.target/i386/pr108938-2.c: New test. * gcc.target/i386/pr108938-3.c: New test. * gcc.target/i386/pr108938-load-1.c: New test. * gcc.target/i386/pr108938-load-2.c: New test.=