From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2700 invoked by alias); 12 May 2015 11:13:33 -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 2686 invoked by uid 89); 12 May 2015 11:13:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 12 May 2015 11:13:31 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id t4CBDMtP002772; Tue, 12 May 2015 06:13:22 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id t4CBDLOh002771; Tue, 12 May 2015 06:13:21 -0500 Date: Tue, 12 May 2015 11:16:00 -0000 From: Segher Boessenkool To: Kyrill Tkachov Cc: "gcc-patches@gcc.gnu.org" , "dje.gcc@gmail.com" Subject: Re: [PATCH 2/6] combine: If recog fails, try again with zero_ext{ract,end} simplified Message-ID: <20150512111321.GM2521@gate.crashing.org> References: <00854266aef1cbae6d3620f78122e6131c37b73c.1431268135.git.segher@kernel.crashing.org> <5551B7C2.9050502@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5551B7C2.9050502@arm.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg01071.txt.bz2 On Tue, May 12, 2015 at 09:20:18AM +0100, Kyrill Tkachov wrote: > Does this patch means we can remove any patterns in > the backend that look like: > > - [(set (match_operand:SI 0 "gpc_reg_operand" "=r") > - (zero_extract:SI (match_operand:SI 1 "gpc_reg_operand" "r") > - (match_operand:SI 2 "const_int_operand" "i") > - (match_operand:SI 3 "const_int_operand" "i")))] > > > as long as we have an equivalent and-with-mask pattern? Yes, exactly. But you can also keep them, it will find either. Older / CISC targets will usually want the zero_ext*, newer / RISC targets will more often write something as AND (and LSHIFTRT). You can also have both in the same target: for example, many targets will want to write their plain zero_extend patterns as that, because you want to allow both mem and reg in the same pattern, for reload. Segher