--- /dev/null
+// { dg-do compile }
+// ICE in verify_dominators, reduced from charset.cc (libstdc++).
+
+void convert_escape(int *);
+int cpp_interpret_string_1_to, cpp_interpret_string_1_tbuf;
+char *cpp_interpret_string_1_base;
+char cpp_interpret_string_1_limit;
+void cpp_interpret_string_1() {
+ char *p;
+ for (;;) {
+ cpp_interpret_string_1_base = p;
+ while (p < &cpp_interpret_string_1_limit && *p)
+ p++;
+ if (p > cpp_interpret_string_1_base)
+ if (cpp_interpret_string_1_to)
+ goto fail;
+ if (p >= &cpp_interpret_string_1_limit)
+ break;
+ int *tbuf_ptr =
+ cpp_interpret_string_1_to ? &cpp_interpret_string_1_tbuf : __null;
+ convert_escape(tbuf_ptr);
+ }
+fail:
+ ;
+}
prob_prolog = prob_epilog = profile_probability::guessed_always ()
.apply_scale (estimated_vf - 1, estimated_vf);
- class loop *prolog, *epilog = NULL;
+ class loop *prolog = NULL, *epilog = NULL;
class loop *first_loop = loop;
bool irred_flag = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP;
skip_e = guard_e;
e = EDGE_PRED (guard_to, 0);
e = (e != guard_e ? e : EDGE_PRED (guard_to, 1));
+
+ /* Handle any remaining dominator updates needed after
+ inserting the loop skip edge above. */
+ if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo)
+ && prolog_peeling)
+ {
+ /* Adding a skip edge to skip a loop with multiple exits
+ means the dominator of the join blocks for all exits shifts
+ from the prolog skip guard to the loop skip guard. */
+ auto prolog_skip_bb
+ = single_pred (loop_preheader_edge (prolog)->src);
+ auto needs_update
+ = get_dominated_by (CDI_DOMINATORS, prolog_skip_bb);
+
+ /* Update everything except for the immediate children of
+ the prolog skip block (the prolog and vector preheaders).
+ Those should remain dominated by the prolog skip block itself,
+ since the loop guard edge goes to the epilogue. */
+ for (auto bb : needs_update)
+ if (bb != EDGE_SUCC (prolog_skip_bb, 0)->dest
+ && bb != EDGE_SUCC (prolog_skip_bb, 1)->dest)
+ set_immediate_dominator (CDI_DOMINATORS, bb, guard_bb);
+ }
+
slpeel_update_phi_nodes_for_guard1 (first_loop, epilog, guard_e, e);
/* Simply propagate profile info from guard_bb to guard_to which is