diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2018-01-11 18:47:20 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-01-11 17:47:20 +0000 |
commit | c2893c6e1fbaef291cf69c4444cc45e77069eb3f (patch) | |
tree | 578833b6b7b4cf203477644c5137faf3bb225a5c /gcc/gimple-ssa-isolate-paths.c | |
parent | 0526ed2aef5ba7faa8ea26015e9854db82a71395 (diff) | |
download | gcc-c2893c6e1fbaef291cf69c4444cc45e77069eb3f.zip gcc-c2893c6e1fbaef291cf69c4444cc45e77069eb3f.tar.gz gcc-c2893c6e1fbaef291cf69c4444cc45e77069eb3f.tar.bz2 |
re PR tree-optimization/83189 (internal compiler error: in probability_in, at profile-count.h:1050)
PR middle-end/83189
* gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
From-SVN: r256545
Diffstat (limited to 'gcc/gimple-ssa-isolate-paths.c')
-rw-r--r-- | gcc/gimple-ssa-isolate-paths.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-isolate-paths.c b/gcc/gimple-ssa-isolate-paths.c index 73489bf..131705d 100644 --- a/gcc/gimple-ssa-isolate-paths.c +++ b/gcc/gimple-ssa-isolate-paths.c @@ -138,6 +138,7 @@ isolate_path (basic_block bb, basic_block duplicate, edge_iterator ei; edge e2; bool impossible = true; + profile_count count = e->count (); for (si = gsi_start_bb (bb); gsi_stmt (si) != stmt; gsi_next (&si)) if (stmt_can_terminate_bb_p (gsi_stmt (si))) @@ -154,11 +155,12 @@ isolate_path (basic_block bb, basic_block duplicate, if (!duplicate) { duplicate = duplicate_block (bb, NULL, NULL); - bb->count = profile_count::zero (); + duplicate->count = profile_count::zero (); if (!ret_zero) for (ei = ei_start (duplicate->succs); (e2 = ei_safe_edge (ei)); ) remove_edge (e2); } + bb->count -= count; /* Complete the isolation step by redirecting E to reach DUPLICATE. */ e2 = redirect_edge_and_branch (e, duplicate); |