From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id D8A023858433; Wed, 24 Nov 2021 14:34:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8A023858433 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/loop-unswitch-improvement-v3)] Fix folding. X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/loop-unswitch-improvement-v3 X-Git-Oldrev: 190e8454b679d7c3a2e07a4488740bb994d25d48 X-Git-Newrev: ef821ec43baa1ac958e48a6bafe65d1618da150d Message-Id: <20211124143422.D8A023858433@sourceware.org> Date: Wed, 24 Nov 2021 14:34:22 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 14:34:22 -0000 https://gcc.gnu.org/g:ef821ec43baa1ac958e48a6bafe65d1618da150d commit ef821ec43baa1ac958e48a6bafe65d1618da150d Author: Martin Liska Date: Wed Nov 24 15:31:57 2021 +0100 Fix folding. Diff: --- gcc/tree-ssa-loop-unswitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/tree-ssa-loop-unswitch.c b/gcc/tree-ssa-loop-unswitch.c index 9db758b5199..1d5bcfc3237 100644 --- a/gcc/tree-ssa-loop-unswitch.c +++ b/gcc/tree-ssa-loop-unswitch.c @@ -647,12 +647,12 @@ tree_unswitch_single_loop (class loop *loop, int num, free_original_copy_tables (); /* Invoke itself on modified loops. */ - predicate_path.safe_push (std::make_pair (predicate, true)); + predicate_path.safe_push (std::make_pair (predicate, false)); changed |= simplify_loop_version (nloop, predicate_path); tree_unswitch_single_loop (nloop, num + 1, predicate_path); predicate_path.pop (); - predicate_path.safe_push (std::make_pair (predicate, false)); + predicate_path.safe_push (std::make_pair (predicate, true)); changed |= simplify_loop_version (loop, predicate_path); tree_unswitch_single_loop (loop, num + 1, predicate_path); predicate_path.pop ();