From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38767 invoked by alias); 21 Feb 2017 20:40:25 -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 38708 invoked by uid 89); 21 Feb 2017 20:40:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:58ACA48, H*f:sk:58ACA48, H*i:sk:58ACA48 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Feb 2017 20:40:22 +0000 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1D4B80B20; Tue, 21 Feb 2017 20:40:22 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-76.ams2.redhat.com [10.36.117.76]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C7E67FE7E; Tue, 21 Feb 2017 20:40:22 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v1LKeI4i010947; Tue, 21 Feb 2017 21:40:18 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v1LKeG9p009447; Tue, 21 Feb 2017 21:40:16 +0100 Date: Tue, 21 Feb 2017 20:41:00 -0000 From: Jakub Jelinek To: Michael Eager Cc: Segher Boessenkool , gcc-patches@gcc.gnu.org Subject: Re: [PATCH 3/6] microblaze: Fixes for RTL checking Message-ID: <20170221204016.GX1849@tucnak> Reply-To: Jakub Jelinek References: <0b3332af5c3662c0efdf2d930c06457b0fd3cd13.1487685472.git.segher@kernel.crashing.org> <20170221201555.GW1849@tucnak> <58ACA485.4030105@eagercon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58ACA485.4030105@eagercon.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg01351.txt.bz2 On Tue, Feb 21, 2017 at 12:35:17PM -0800, Michael Eager wrote: > On 02/21/2017 12:15 PM, Jakub Jelinek wrote: > > On Tue, Feb 21, 2017 at 02:48:15PM +0000, Segher Boessenkool wrote: > > > - /* Shift by zero -- copy regs if necessary. */ > > > + /* Shift by zero -- copy regs. */ > > > if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == 0)) > > > > You could have changed this line to > > if (operands[2] == const0_rtx) > > as well. > > And this would not change the generated code. Sure, and it doesn't need to be done for GCC7, but would be a nice cleanup for stage1 (e.g. remove redundant parens in the backend, cases like this where because of the uniqueness of CONST_INT values a pointer comparison is enough, or using macros where available (e.g. GET_CODE (operands[2]) == CONST_INT can be written as CONST_INT_P (operands[2]), etc.). Jakub