diff options
author | Jan Hubicka <jh@suse.cz> | 2011-12-27 11:41:58 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-12-27 10:41:58 +0000 |
commit | 0bed228eb6a10757b28a4e3f355d88267421bf6e (patch) | |
tree | 7385c749d6c50d3ea3d33b8cacedf72204863b71 /gcc/tree-ssa-threadupdate.c | |
parent | a055ca4382a2eb8857ff69bafcae5b7798b0db16 (diff) | |
download | gcc-0bed228eb6a10757b28a4e3f355d88267421bf6e.zip gcc-0bed228eb6a10757b28a4e3f355d88267421bf6e.tar.gz gcc-0bed228eb6a10757b28a4e3f355d88267421bf6e.tar.bz2 |
re PR tree-optimization/48641 (ICE: verify_flow_info failed: Wrong frequency of block 77 -419530 with -O -fno-tree-ccp -fno-tree-copy-prop)
PR middle-end/48641
* tree-ssa-threadupdate.c (redirect_edges): Watch for overflow.
* gcc.dg/compile/pr48641.c: New file.
From-SVN: r182693
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 0cdf846..6000a03 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -513,7 +513,11 @@ redirect_edges (void **slot, void *data) e->src->index, e->dest->index, rd->dup_block->index); rd->dup_block->count += e->count; - rd->dup_block->frequency += EDGE_FREQUENCY (e); + + /* Excessive jump threading may make frequencies large enough so + the computation overflows. */ + if (rd->dup_block->frequency < BB_FREQ_MAX * 2) + rd->dup_block->frequency += EDGE_FREQUENCY (e); EDGE_SUCC (rd->dup_block, 0)->count += e->count; /* Redirect the incoming edge to the appropriate duplicate block. */ |