From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50595 invoked by alias); 24 Jun 2019 14:21:21 -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 50585 invoked by uid 89); 24 Jun 2019 14:21:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:871 X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Jun 2019 14:21:19 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 41ADD344; Mon, 24 Jun 2019 07:21:18 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C06003F71E; Mon, 24 Jun 2019 07:21:17 -0700 (PDT) From: Richard Sandiford To: Prathamesh Kulkarni Mail-Followup-To: Prathamesh Kulkarni ,gcc Patches , richard.sandiford@arm.com Cc: gcc Patches Subject: Re: [SVE] [fwprop] PR88833 - Redundant moves for WHILELO-based loops References: Date: Mon, 24 Jun 2019 14:21:00 -0000 In-Reply-To: (Prathamesh Kulkarni's message of "Mon, 24 Jun 2019 17:06:37 +0530") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-06/txt/msg01456.txt.bz2 Prathamesh Kulkarni writes: > @@ -1415,6 +1460,19 @@ forward_propagate_into (df_ref use) > if (!def_set) > return false; > > + if (reg_prop_only > + && !REG_P (SET_SRC (def_set)) > + && !REG_P (SET_DEST (def_set))) > + return false; This should be: if (reg_prop_only && (!REG_P (SET_SRC (def_set)) || !REG_P (SET_DEST (def_set)))) return false; so that we return false if either operand isn't a register. > + > + /* Allow propagations into a loop only for reg-to-reg copies, since > + replacing one register by another shouldn't increase the cost. */ > + > + if (DF_REF_BB (def)->loop_father != DF_REF_BB (use)->loop_father > + && !REG_P (SET_SRC (def_set)) > + && !REG_P (SET_DEST (def_set))) > + return false; Same here. OK with that change, thanks. Richard