if (throwing_compare_p)
{
add_stmt_to_eh_lp (asgnck, lookup_stmt_eh_lp (asgn));
- make_eh_edge (asgnck);
+ edge eh = make_eh_edge (asgnck);
+ /* This compare looks like it could raise an exception,
+ but it's dominated by the original compare, that
+ would raise an exception first, so the EH edge from
+ this one is never really taken. */
+ eh->probability = profile_probability::never ();
+ if (eh->dest->count.initialized_p ())
+ eh->dest->count += eh->count ();
+ else
+ eh->dest->count = eh->count ();
edge ckeh;
basic_block nbb = split_edge (non_eh_succ_edge
(gimple_bb (asgnck), &ckeh));
+ gcc_checking_assert (eh == ckeh);
gsi_split = gsi_start_bb (nbb);
if (dump_file)