On Mon, 2016-11-28 at 14:44 -0700, Jeff Law wrote:
> On 11/23/2016 04:55 PM, Segher Boessenkool wrote:
> > Combine can turn a conditional trap into an unconditional trap.  If
> > it
> > does that it should make the code after it unreachable (an
> > unconditional
> > trap should be the last insn in its bb, and that bb has no
> > successors).
> > 
> > This patch seems to work.  It is hard to be sure, this is very hard
> > to
> > trigger.  Quite a few other passes look like they need something
> > similar
> > as well, but I don't see anything else handling it yet either.
> > 
> > How does this look?  Any better ideas?
> It's probably a reasonable place to start as there's lots of 
> similarities to converting a conditional branch to an unconditional. 
> Like you I worry there may be other instances of this issue may be
> lurking.
> 
> The possibility of having a conditional trap in the IL turn into an 
> unconditional trap has always been there.  As you note, it's somewhat
> difficult to trigger since the SSA optimizers ought to
> expose/optimize 
> this long before we get to RTL.

Could the RTL frontend be of use here?

Reply via email to