diff options
author | Richard Biener <rguenther@suse.de> | 2019-02-06 12:56:02 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-02-06 12:56:02 +0000 |
commit | 292ea7060058deb7fecdc2aaba5a3b4b20bd431b (patch) | |
tree | b146d33d3bc6f4c9f75f94b805e55f9df93b0fe6 /gcc/tree-ssa-phiprop.c | |
parent | 109b557ac4b575b9a5afec8aac94c78f8a78328b (diff) | |
download | gcc-292ea7060058deb7fecdc2aaba5a3b4b20bd431b.zip gcc-292ea7060058deb7fecdc2aaba5a3b4b20bd431b.tar.gz gcc-292ea7060058deb7fecdc2aaba5a3b4b20bd431b.tar.bz2 |
backport: [multiple changes]
2019-02-06 Richard Biener <rguenther@suse.de>
Backport from mainline
2019-01-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/89135
* tree-ssa-phiprop.c (pass_phiprop::execute): Skip blocks
with abnormal preds.
* gcc.dg/torture/pr89135.c: New testcase.
2019-01-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/88903
* tree-vect-stmts.c (vectorizable_shift): Verify we see all
scalar stmts a SLP shift amount is composed of when detecting
shifts by scalars.
* gcc.dg/vect/pr88903-1.c: New testcase.
* gcc.dg/vect/pr88903-2.c: Likewise.
From-SVN: r268578
Diffstat (limited to 'gcc/tree-ssa-phiprop.c')
-rw-r--r-- | gcc/tree-ssa-phiprop.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-ssa-phiprop.c b/gcc/tree-ssa-phiprop.c index 03dbb39..14dfe2a 100644 --- a/gcc/tree-ssa-phiprop.c +++ b/gcc/tree-ssa-phiprop.c @@ -495,8 +495,14 @@ pass_phiprop::execute (function *fun) bbs = get_all_dominated_blocks (CDI_DOMINATORS, single_succ (ENTRY_BLOCK_PTR_FOR_FN (fun))); FOR_EACH_VEC_ELT (bbs, i, bb) - for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi)) - did_something |= propagate_with_phi (bb, gsi.phi (), phivn, n); + { + /* Since we're going to move dereferences across predecessor + edges avoid blocks with abnormal predecessors. */ + if (bb_has_abnormal_pred (bb)) + continue; + for (gsi = gsi_start_phis (bb); !gsi_end_p (gsi); gsi_next (&gsi)) + did_something |= propagate_with_phi (bb, gsi.phi (), phivn, n); + } if (did_something) gsi_commit_edge_inserts (); |