Richard Biener wrote: > > > > >> > >> On the llvm test-suite, I have seen one ICE with my fsm jump-thread > >patch. > >> This patch fixes the problem: > >> > >> diff --git a/gcc/tree-ssa-threadupdate.c > >b/gcc/tree-ssa-threadupdate.c > >> index 12f83ba..f8c736e 100644 > >> --- a/gcc/tree-ssa-threadupdate.c > >> +++ b/gcc/tree-ssa-threadupdate.c > >> @@ -2564,6 +2564,7 @@ thread_through_all_blocks (bool > >may_peel_loop_headers) > >> FOR_EACH_LOOP (loop, LI_FROM_INNERMOST) > >> { > >> if (!loop->header > >> + || !loop_latch_edge (loop) > >> || !bitmap_bit_p (threaded_blocks, loop->header->index)) > >> continue; > >> > >> retval |= thread_through_loop_header (loop, > >may_peel_loop_headers); > >> > >> Ok to commit after regstrap? > >This seems to be indicating that we have with no edge from the latch > >block to the header block. I'd like to know better how we got into > >that > >state. > > It Also returns null for loops with multiple latches. So the patch looks OK > for me.
The bug I was seeing has been fixed by the patch for: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64284 Thanks, Sebastian