[Bug rtl-optimization/105231] [12 Regression] ICE: in rtl_verify_bb_insns, at cfgrtl.cc:2797 (flow control insn inside a basic block) with custom flags since r12-4767-g81342e95827f77c0
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 12 09:47:28 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105231
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #11)
> (In reply to Richard Biener from comment #10)
> > (In reply to Eric Botcazou from comment #8)
> > > > Yes, but still the float_extend:XF would have made may_trap_p say
> > > > the insn possibly traps but there's no EH on it despite
> > > > -fnon-call-exceptions.
> > >
> > > The REG_EH note is added by make_reg_eh_region_note but then removed by
> > > purge_dead_edges because of the REG_EQUAL note:
> > >
> > > /* If this instruction cannot trap, remove REG_EH_REGION notes. */
> > > if (NONJUMP_INSN_P (insn)
> > > && (note = find_reg_note (insn, REG_EH_REGION, NULL)))
> > > {
> > > rtx eqnote;
> > >
> > > if (! may_trap_p (PATTERN (insn))
> > > || ((eqnote = find_reg_equal_equiv_note (insn))
> > > && ! may_trap_p (XEXP (eqnote, 0))))
> > > remove_note (insn, note);
> > > }
> >
> > Interesting - so should combine maybe have this exception as well when it
> > tests for may_trap_p? Not sure if the above makes sense.
>
> That code was added by Jakub in r0-38443-g89753b3a903366, reverting the
> reg-equal note part fixes the testcase as well.
Oh, and checking for REG_EQUAL notes on i2/i3 doesn't work since they do not
exist there. Likewise REG_EQUAL notes can be simply dropped which would
make the IL "invalid" so I think what purge_dead_edges does is premature?
More information about the Gcc-bugs
mailing list