From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16988 invoked by alias); 20 Oct 2017 08:19:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 16710 invoked by uid 89); 20 Oct 2017 08:19:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=cfmd, fingerprint X-HELO: mail-out.m-online.net Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Oct 2017 08:19:09 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3yJJbv548Cz1qsD8; Fri, 20 Oct 2017 10:19:07 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3yJJbv3tG4z1qrm6; Fri, 20 Oct 2017 10:19:07 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id mvCO5Oa6Qg3v; Fri, 20 Oct 2017 10:19:06 +0200 (CEST) X-Auth-Info: zq5sx9EJFSjHR2ila0IpOE5gDTMEh+wvoUfECnwAsF4QdU7h1NaRPUiRiaF03+7Q Received: from igel.home (ppp-188-174-149-63.dynamic.mnet-online.de [188.174.149.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 20 Oct 2017 10:19:06 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 1D1192C0649; Fri, 20 Oct 2017 10:19:06 +0200 (CEST) From: Andreas Schwab To: Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH][PR target/19201] Peephole to improve clearing items in structure for m68k References: <566D6D4C.6090103@redhat.com> X-Yow: .. Should I get locked in the PRINCIPAL'S OFFICE today -- or have a VASECTOMY?? Date: Fri, 20 Oct 2017 08:20:00 -0000 In-Reply-To: <566D6D4C.6090103@redhat.com> (Jeff Law's message of "Sun, 13 Dec 2015 06:06:20 -0700") Message-ID: <871slyjkp1.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2017-10/txt/msg01330.txt.bz2 On Dez 13 2015, Jeff Law wrote: > diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md > index 1eaf58f..444515a 100644 > --- a/gcc/config/m68k/m68k.md > +++ b/gcc/config/m68k/m68k.md > @@ -7601,3 +7601,36 @@ > > (include "cf.md") > (include "sync.md") > + > +;; Convert > +;; > +;; move.l 4(%a0),%a0 > +;; clr.b (%a0,%a1.l) > +;; > +;; into > +;; > +;; add.l 4(%a0),%a1 > +;; clr.b (%a1) > +;; > +;; The latter is smaller. It is faster on all models except m68060. > + > +(define_peephole2 > + [(set (match_operand:SI 0 "register_operand" "") > + (mem:SI (plus:SI (match_operand:SI 1 "register_operand" "") > + (match_operand:SI 2 "const_int_operand" "")))) > + (set (mem:QI (plus:SI (match_operand:SI 3 "register_operand" "") > + (match_operand:SI 4 "register_operand" ""))) > + (const_int 0))] > + "(optimize_size || !TUNE_68060) > + && (operands[0] == operands[3] || operands[0] == operands[4]) > + && ADDRESS_REG_P (operands[1]) > + && ADDRESS_REG_P ((operands[0] == operands[3]) ? operands[4] : operands[3]) Shouldn't that use rtx_equal_p? Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."