https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87896
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-11-06 Ever confirmed|0 |1 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Looks like a latent issue? We have EDGE_IGNORE set on edges so if ((e->flags & ~(EDGE_DFS_BACK | EDGE_CAN_FALLTHRU | EDGE_IRREDUCIBLE_LOOP | EDGE_LOOP_EXIT | EDGE_CROSSING | EDGE_PRESERVE)) == 0) n_branch++; doesn't count them. The flag is set by vr-values.c:simplify_switch_using_ranges but never reset. /* An edge we should ignore. It should be entirely local to passes. ie, it is never set on any edge upon the completion of any pass. */ DEF_EDGE_FLAG(IGNORE, 17) We could clear the flag in vr_values::~vr_values, but not sure if that's the best thing to do. VRP and DOM could do that as well. tree-vrp.c used to clear EDGE_IGNORE but the issue must be that we somehow _do_ thread (and copy) those edges?! That is, we seem to look at EDGE_IGNORE only in thread_outgoing_edges but appearantly not on all edges included in a threading path? As said edges marked this way are determined to be never executed. Jeff?