https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122456

--- Comment #29 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah.  So we have in fold_marked_statements:

5573                    if (is_gimple_call (old_stmt)
5574                        || is_gimple_call (new_stmt))
5575                      cgraph_update_edges_for_call_stmt (old_stmt,
old_decl,
5576                                                         new_stmt);

and

(gdb) p debug_gimple_stmt (old_stmt)
# .MEM = VDEF <.MEM>
OBJ_TYPE_REF(_17;(struct operator_bitwise_and)&op_plus.D.9380->40B)
(&op_plus.D.9380, &tmp.D.9173, type_1(D), lh_lb_5(D), &D.17039, rh_lb_12(D),
rh_ub_13(D));
$2 = void
(gdb) p debug_gimple_stmt (new_stmt)
__builtin_unreachable ();

and cgraph_update_edges_for_call_stmt_node tries to fixup the speculative
edge and is getting confused.  It probably should see the new edge should
be direct.

Reply via email to