https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94421
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- change_spec_dep_to_hard is called from two places: * in sched_analyze_insn, it is conditionalized on (current_sched_info->flags & DO_SPECULATION) already. * in update_dep, it is conditionalized on if was_spec was true and if no longer dep_spec_p (dep) is true. dep_spec_p is true when current_sched_info->flags & DO_SPECULATION is true (or when a few other cases. But DEP_STATUS (dep) can only be SPECULATIVE when current_sched_info->flags & DO_SPECULATION is true. So If anything you could in theory put an assert there for current_sched_info->flags & DO_SPECULATION and get the same effect if I read the code correctly.