From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40607 invoked by alias); 24 Jun 2019 16:12:34 -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 40599 invoked by uid 89); 24 Jun 2019 16:12:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-lj1-f173.google.com Received: from mail-lj1-f173.google.com (HELO mail-lj1-f173.google.com) (209.85.208.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Jun 2019 16:12:33 +0000 Received: by mail-lj1-f173.google.com with SMTP id x25so13200315ljh.2 for ; Mon, 24 Jun 2019 09:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=aKFmqjynWYTl/Y2xbIr5LlmuiYUZQmg+ystToM5fWv4=; b=PvjTXEB7LNjWPbQWeo4tQc8m59eqE+8uc/Dx2zFFupTDUV8JvVpDPsw/E4uH7D4L3X njUh34iUAP7D/m/6AR8HvfPCVw0IrnyA84qL/OYYuMvyXFSX0/7tNI6NOXiv94BRt8gd HAfHbLAb6BNea0ftgRehSjVeIPLO9nyVvjCl6jCaZu9jn/6CZHHSY+cVFGbayJ+MR1/A SR+wgkrATAiRos9Enlv2WBON+78CIjvSoAKRuMoG0uUa+dIfO6kkCcmO9dR+NNk/Nqb/ NizdkmGeh/8KIgo6wk9aGIJEX/enyk4y2AvNvtLhyHMDQr/gy2FBMOzRofU+sLwcTNCt UYFA== MIME-Version: 1.0 References: In-Reply-To: From: Prathamesh Kulkarni Date: Mon, 24 Jun 2019 16:12:00 -0000 Message-ID: Subject: Re: [SVE] [fwprop] PR88833 - Redundant moves for WHILELO-based loops To: Prathamesh Kulkarni , gcc Patches , Richard Sandiford Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg01476.txt.bz2 On Mon, 24 Jun 2019 at 19:51, Richard Sandiford wrote: > > 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. Oops, sorry about that -:( > > > + > > + /* 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. Thanks for the review, will make the changes and commit the patch after re-testing. Thanks, Prathamesh > > Richard