diff options
author | Richard Biener <rguenther@suse.de> | 2019-05-13 11:37:21 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-05-13 11:37:21 +0000 |
commit | 40289199ee725183a286f50cf448f6347267047e (patch) | |
tree | e5c9e26646781ec79c4aa4ae92b04c9ebef06279 /gcc/tree-if-conv.c | |
parent | aae6da83564549a6f8700407df50cdd52d411727 (diff) | |
download | gcc-40289199ee725183a286f50cf448f6347267047e.zip gcc-40289199ee725183a286f50cf448f6347267047e.tar.gz gcc-40289199ee725183a286f50cf448f6347267047e.tar.bz2 |
re PR tree-optimization/90402 (ICE in slpeel_duplicate_current_defs_from_edges)
2019-05-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/90402
* tree-if-conv.c (tree_if_conversion): Value number only
the loop body by making the latch an exit of the region
as well.
* tree-ssa-sccvn.c (process_bb): Add flag whether to skip
processing PHIs.
(do_rpo_vn): Deal with multiple edges into the entry block
that are not backedges inside the region by skipping PHIs
of the entry block.
* gcc.dg/torture/pr90402-1.c: New testcase.
From-SVN: r271125
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index ec2db00..98566e3 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -3066,10 +3066,12 @@ tree_if_conversion (struct loop *loop, vec<gimple *> *preds) ifcvt_local_dce (loop->header); /* Perform local CSE, this esp. helps the vectorizer analysis if loads - and stores are involved. + 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. ??? We'll still keep dead stores though. */ exit_bbs = BITMAP_ALLOC (NULL); 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); BITMAP_FREE (exit_bbs); |