diff options
author | Richard Biener <rguenther@suse.de> | 2017-08-21 13:18:35 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-08-21 13:18:35 +0000 |
commit | 404938eda1ea3f5dcbca089aa7b23dc04f75b9e0 (patch) | |
tree | 192534fbe477f8655f8011eda548a0babc4ce3a4 /gcc/tree-ssa-pre.c | |
parent | 26b14dd952c9ff87aca0d5e68323c4b304cb46f7 (diff) | |
download | gcc-404938eda1ea3f5dcbca089aa7b23dc04f75b9e0.zip gcc-404938eda1ea3f5dcbca089aa7b23dc04f75b9e0.tar.gz gcc-404938eda1ea3f5dcbca089aa7b23dc04f75b9e0.tar.bz2 |
re PR tree-optimization/81900 (GCC trunk miscompiles Perl / __sigsetjmp issue)
2017-08-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/81900
* tree-ssa-pre.c (compute_antic_aux): Properly compute changed
for blocks with abnormal predecessors.
(compute_antic): Do not set visited flag prematurely.
* gcc.dg/torture/pr81900.c: New testcase.
From-SVN: r251226
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index a6a68cf..7243cf8 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -2119,16 +2119,15 @@ static sbitmap has_abnormal_preds; static bool compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge) { - bool changed = false; bitmap_set_t S, old, ANTIC_OUT; bitmap_iterator bi; unsigned int bii; edge e; edge_iterator ei; - bool was_visited = BB_VISITED (block); - old = ANTIC_OUT = S = NULL; + bool changed = ! BB_VISITED (block); BB_VISITED (block) = 1; + old = ANTIC_OUT = S = NULL; /* If any edges from predecessors are abnormal, antic_in is empty, so do nothing. */ @@ -2217,7 +2216,7 @@ compute_antic_aux (basic_block block, bool block_has_abnormal_pred_edge) /* clean (ANTIC_IN (block)) is defered to after the iteration converged because it can cause non-convergence, see for example PR81181. */ - if (!was_visited || !bitmap_set_equal (old, ANTIC_IN (block))) + if (!bitmap_set_equal (old, ANTIC_IN (block))) changed = true; maybe_dump_sets: @@ -2396,9 +2395,6 @@ compute_antic (void) if (e->flags & EDGE_ABNORMAL) { bitmap_set_bit (has_abnormal_preds, block->index); - - /* We also anticipate nothing. */ - BB_VISITED (block) = 1; break; } |