From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25470 invoked by alias); 4 Jul 2016 08:47:35 -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 25459 invoked by uid 89); 4 Jul 2016 08:47:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jul 2016 08:47:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 99F0F28; Mon, 4 Jul 2016 01:48:19 -0700 (PDT) Received: from localhost (e105548-lin.manchester.arm.com [10.45.32.67]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D881A3F215; Mon, 4 Jul 2016 01:47:21 -0700 (PDT) From: Richard Sandiford To: Andrew Burgess Mail-Followup-To: Andrew Burgess ,gcc-patches@gcc.gnu.org, Joern Wolfgang Rennecke , richard.sandiford@arm.com Cc: gcc-patches@gcc.gnu.org, Joern Wolfgang Rennecke Subject: Re: [PATCH 2/2] gcc/genrecog: Don't warn for missing mode on special predicates References: <65124582452f1e6ba9f95992684363b0ae5ef0be.1465946922.git.andrew.burgess@embecosm.com> <87bn32tjer.fsf@googlemail.com> <20160630132949.GP8823@embecosm.com> Date: Mon, 04 Jul 2016 08:47:00 -0000 In-Reply-To: <20160630132949.GP8823@embecosm.com> (Andrew Burgess's message of "Thu, 30 Jun 2016 14:29:49 +0100") Message-ID: <878txhlrhj.fsf@e105548-lin.cambridge.arm.com> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2016-07/txt/msg00090.txt.bz2 Andrew Burgess writes: > +/* Return true if OPERAND is a MATCH_OPERAND using a special predicate > + function. */ > + > +static bool > +special_predicate_operand_p (rtx operand) > +{ > + if (GET_CODE (operand) == MATCH_OPERAND) > + { > + const char *pred_name = predicate_name (operand); > + if (pred_name[0] != 0) > + { > + const struct pred_data *pred; > + > + pred = lookup_predicate (pred_name); > + return pred->special; Thanks for removing the duplicated error check for unknown predicates. I think that error gets reported later though, so we should check for null here: return pred && pred->special; OK with that change, thanks. Richard