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

Aldy Hernandez <aldyh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE
                 CC|                            |law at gcc dot gnu.org,
                   |                            |matz at gcc dot gnu.org

--- Comment #3 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
This is *almost* a duplicate of PR102981.

Here we have the same scenario: the first iteration of a loop has unreachable
code.  But interestingly, the IL is sufficiently simple that DOM3 (post
loopdone) can see the threading opportunity:

a.c.192t.dom3:  [3] Registering jump thread: (2, 3) incoming edge;  (3, 4)
normal;

but... there's some limitation in the custom block copier the old forward
threader uses:

a.c.192t.dom3:Failure in thread_through_loop_header:   Cancelling jump thread:
(2, 3) incoming edge;  (3, 4) normal;

Again, the backward threader will refuse to thread this, regardless of
loopdone, because it is essentially peeling off the first iteration of a loop. 
This is the main issue we should address, regardless of DOM's limitation.

I'm going to mark this as a duplicate, because I doubt anyone has the
inclination of fixing the old forward threader's copier.

[FWIW, this supersedes the previous comment I made for this PR, as the threader
pipeline has changed in trunk.]

*** This bug has been marked as a duplicate of bug 102981 ***

Reply via email to