From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89239 invoked by alias); 21 Feb 2017 20:26:12 -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 89225 invoked by uid 89); 21 Feb 2017 20:26:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*r:8.13.8 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 ESMTP; Tue, 21 Feb 2017 20:26:10 +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 v1LKPilT030890; Tue, 21 Feb 2017 14:25:45 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id v1LKPfKk030863; Tue, 21 Feb 2017 14:25:41 -0600 Date: Tue, 21 Feb 2017 20:33:00 -0000 From: Segher Boessenkool To: Michael Eager Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 3/6] microblaze: Fixes for RTL checking Message-ID: <20170221202538.GQ21840@gate.crashing.org> References: <0b3332af5c3662c0efdf2d930c06457b0fd3cd13.1487685472.git.segher@kernel.crashing.org> <58AC9E42.7020104@eagerm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58AC9E42.7020104@eagerm.com> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg01347.txt.bz2 On Tue, Feb 21, 2017 at 12:08:34PM -0800, Michael Eager wrote: > >- /* Shift by zero -- copy regs if necessary. */ > >+ /* Shift by zero -- copy regs. */ > > if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == > > 0)) > > { > >- if (REGNO (operands[0]) != REGNO (operands[1])) > >- emit_insn (gen_movsi (operands[0], operands[1])); > >+ emit_insn (gen_movsi (operands[0], operands[1])); > > return 1; > > } > > Why generate an unnecessary NOP? Why not? It will be optimised away anyway, and the code to get at the subregs is hairy... But could optimise away the useless move here already if both ops are a reg and both are the same, if you prefer that? Or rtx_equal_p (operands[0], operands[1])? Segher