PR middle-end/83189
* gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
From-SVN: r256545
+2018-01-11 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/83189
+ * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
+
2018-01-11 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/83718
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)))
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);