From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6638A385B800; Tue, 7 Mar 2023 08:53:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6638A385B800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678179225; bh=NkedMHBoFooM+L8GRnjg3mAvkJKElfd/Ot3Rsq43pnQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wJ8d3l4wfYSC5564DD3fm5JI/AOOmQnlBxAeZ480e3RW0YCyzrPV3ScKD6l2kXReo nCIgnCT+uGFjaJ7ydQjn6Qvw4Bc1Wns988Zd/A2OWQoCR6BPW1rCq/vlAKbTofvFpS IGz6yitu69hB6QWXmMIlSzABncBK/FjxmiuQacQk= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108938] Missing bswap detection Date: Tue, 07 Mar 2023 08:53:45 +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: crazylht at gmail dot com 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 #13 from Hongtao.liu --- (In reply to Jakub Jelinek from comment #12) > (In reply to Hongtao.liu from comment #11) > > (In reply to Jakub Jelinek from comment #9) > > > Though, if more than one replacement operation is emitted, one needs = to be > > > careful not to emit more expensive replacement than the original sequ= ence > > > (especially if some subexpressions aren't single use). > >=20 > > The patch(support swap + bit_and + rotate) doesn't show much impact on > > SPEC2017, is there any other benchmark that I can try to find some > > performance regressiones with bswap + bit_and + rotate? > > So that I'll restrict the patch to only bswp + rotate/shift. >=20 > I didn't mean to look at SPEC numbers, I meant count number of statements > that could be DCEd. The code currently computes n_ops as it walks the > statements that compute the value. So, the idea would be to have another > counter next to it, initialized > very similarly, except on a statement that !has_single_use it would be re= set > to zero (essentially not counting that statement or any of its defining > statements (transitively)). > So it would count solely the statements that could be DCEd. Make sense.=