From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 6CFF0383B80E for ; Mon, 21 Jun 2021 06:42:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6CFF0383B80E Received: by mail-ed1-x533.google.com with SMTP id c7so16415582edn.6 for ; Sun, 20 Jun 2021 23:42:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uLbnUOkNUhdZpS+ed4D03R+Iuha5n33RRpG4dDs/3P4=; b=dvzUd0/GX+P2Z1StzvmzFWRqDd4IkFQSINyOfiiNtbbXUAYUPZ+zfi5tQmEIwOMEVd IaDTMJOfkOnUOQ9lbH7jSEGoVatqY3NRPUxs+DjrYpT/osvgOzu1kXJNwV+wAfweXMpu NY9iUSc3/ev/uiH9HGxmzKzrfOVKt4ckVDSmo9zGRRgdwKe5KP96WSeZVsf2nWioBFLb drRdudpCwLV9G3g4CcTwxFN9bkRPBs0xwNklcjG9mL4raJz4Pi05VsLlHMdaCG4F9Q4k Li11K2V0mWKYZrSTYhDp9UXRRU8oU82nYQuuhw/Ttuo+/X9LhGwqX0XAguaeDakKPXbe XFVQ== X-Gm-Message-State: AOAM533gMKUTtu2+8LC7bj1MOnf3bWYS89I6psyoxav5nlL+a5Iye4lM 5l0ENDUXvIeY/fNxGXDCOD0OQVFpDPP7CXduBKc= X-Google-Smtp-Source: ABdhPJyFUCirD2TAZwxyTU+wZr5FwVqvSNpyF8t+Z0KAPWgCMLS1bcDpZPD6aaaYISwI7nkvanVkr84JRMIZ0VZo6mQ= X-Received: by 2002:a05:6402:1450:: with SMTP id d16mr7077644edx.274.1624257747478; Sun, 20 Jun 2021 23:42:27 -0700 (PDT) MIME-Version: 1.0 References: <1624132041-665-1-git-send-email-apinski@marvell.com> In-Reply-To: <1624132041-665-1-git-send-email-apinski@marvell.com> From: Richard Biener Date: Mon, 21 Jun 2021 08:42:16 +0200 Message-ID: Subject: Re: [PATCH 1/7] Reset the range info on the moved instruction in PHIOPT To: Andrew Pinski Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2021 06:42:30 -0000 On Sat, Jun 19, 2021 at 9:48 PM apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > I had missed this when wrote the patch which allowed the > gimple to be moved from inside the conditional as it. It > was also missed in the review. Anyways the range information > needs to be reset for the moved gimple as it was under a > conditional and the flow has changed to be unconditional. > I have not seen any testcase in the wild that produces wrong code > yet which is why there is no testcase but this is similar to what > the other code in phiopt does so after moving those to match, there > might be some. > > OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. OK. Richard. > gcc/ChangeLog: > > * tree-ssa-phiopt.c (match_simplify_replacement): Reset > flow senatitive info on the moved ssa set. > --- > gcc/tree-ssa-phiopt.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c > index 02e26f974a5..24cbce9955a 100644 > --- a/gcc/tree-ssa-phiopt.c > +++ b/gcc/tree-ssa-phiopt.c > @@ -836,7 +836,7 @@ match_simplify_replacement (basic_block cond_bb, basic_block middle_bb, > if (!is_gimple_assign (stmt_to_move)) > return false; > > - tree lhs = gimple_assign_lhs (stmt_to_move); > + tree lhs = gimple_assign_lhs (stmt_to_move); > gimple *use_stmt; > use_operand_p use_p; > > @@ -892,6 +892,7 @@ match_simplify_replacement (basic_block cond_bb, basic_block middle_bb, > } > gimple_stmt_iterator gsi1 = gsi_for_stmt (stmt_to_move); > gsi_move_before (&gsi1, &gsi); > + reset_flow_sensitive_info (gimple_assign_lhs (stmt_to_move)); > } > if (seq) > gsi_insert_seq_before (&gsi, seq, GSI_SAME_STMT); > -- > 2.27.0 >