From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1314) id 961E33858004; Mon, 24 Apr 2023 15:50:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 961E33858004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682351436; bh=R0yCyiN3gVkcCUdVrSeIRGFlFVQIJ3G2I/lfM6hwHi4=; h=From:To:Subject:Date:From; b=CKFfbzlVnQbblRHMrfD1R1CytSUhqmWN+Nl2eBHSttw5a2u8xEaTLJq3xZ+hlIZgI t9CEnERPMrTFXQyaQBkRPP0nGCu1nV3DkXHNDIt9mrGKLYrLmuxINNaTJHjMRP1akm GF8aeA3t42KcNkX8zTMXeOcvpIau2CC6Z5tx+gM8= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Andrew Pinski To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-201] PHIOPT: Allow other diamond uses when do_hoist_loads is true X-Act-Checkin: gcc X-Git-Author: Andrew Pinski X-Git-Refname: refs/heads/trunk X-Git-Oldrev: 7dd4761ee7f95be3cbf74ad57564faa7b1464dc2 X-Git-Newrev: 7049241f6ee558cfc0b227b5a0a355ec29afd6f1 Message-Id: <20230424155036.961E33858004@sourceware.org> Date: Mon, 24 Apr 2023 15:50:36 +0000 (GMT) List-Id: https://gcc.gnu.org/g:7049241f6ee558cfc0b227b5a0a355ec29afd6f1 commit r14-201-g7049241f6ee558cfc0b227b5a0a355ec29afd6f1 Author: Andrew Pinski Date: Thu Apr 20 10:56:17 2023 -0700 PHIOPT: Allow other diamond uses when do_hoist_loads is true While working on adding diamond shaped form to match-and-simplify phiopt, I Noticed that we would not reach there if do_hoist_loads was true. In the original code before the cleanups it was not obvious why but after I finished the cleanups, it was just a matter of removing a continue and that is what this patch does. This just happens also to fix a bug report that I noticed too. OK? Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: PR tree-optimization/68894 * tree-ssa-phiopt.cc (tree_ssa_phiopt_worker): Remove the continue for the do_hoist_loads diamond case. Diff: --- gcc/tree-ssa-phiopt.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index f9d8d6e78b2..ce3409b532b 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -241,10 +241,7 @@ tree_ssa_phiopt_worker (bool do_store_elim, bool do_hoist_loads, bool early_p) is likely to perform worse than the well-predicted branch. */ && !predictable_edge_p (EDGE_SUCC (bb, 0)) && !predictable_edge_p (EDGE_SUCC (bb, 1))) - { - hoist_adjacent_loads (bb, bb1, bb2, bb3); - continue; - } + hoist_adjacent_loads (bb, bb1, bb2, bb3); } gimple_stmt_iterator gsi;