From 41f4a0a00415c6e89727dd72d81c3ea4cb06fed9 Mon Sep 17 00:00:00 2001 From: prathamesh3492 Date: Tue, 1 Oct 2019 17:10:01 +0000 Subject: [PATCH] 2019-10-01 Prathamesh Kulkarni * tree-if-conv.c (tree_if_conversion): Move call to ifcvt_local_dce after local CSE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276417 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/tree-if-conv.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4c4292c299a..08951d94f506 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-10-01 Prathamesh Kulkarni + + * tree-if-conv.c (tree_if_conversion): Move call to ifcvt_local_dce + after local CSE. + 2019-10-01 Jan Hubicka * doc/invoke.texi (early-inlining-insns-O2): Document. diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index 40ad4c5947aa..822aae5b83f4 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -3060,9 +3060,6 @@ tree_if_conversion (class loop *loop, vec *preds) on-the-fly. */ combine_blocks (loop); - /* Delete dead predicate computations. */ - ifcvt_local_dce (loop->header); - /* Perform local CSE, this esp. helps the vectorizer analysis if loads and stores are involved. CSE only the loop body, not the entry PHIs, those are to be kept in sync with the non-if-converted copy. @@ -3071,6 +3068,9 @@ tree_if_conversion (class loop *loop, vec *preds) bitmap_set_bit (exit_bbs, single_exit (loop)->dest->index); bitmap_set_bit (exit_bbs, loop->latch->index); todo |= do_rpo_vn (cfun, loop_preheader_edge (loop), exit_bbs); + + /* Delete dead predicate computations. */ + ifcvt_local_dce (loop->header); BITMAP_FREE (exit_bbs); todo |= TODO_cleanup_cfg; -- 2.47.2