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

--- Comment #3 from acsawdey at gcc dot gnu.org ---
So, it comes down to the fact that this condition cannot ever  be true, so the
loop is not in fact infinite:

  infinite if: (expr_list:REG_DEP_TRUE (ne:SI (and:DI (minus:DI (plus:DI
(ashift:DI (reg:DI 211)
                        (const_int 2 [0x2]))
                    (reg/v/f:DI 205 [ ap ]))
                (reg:DI 193 [ ivtmp.20 ]))
            (const_int 3 [0x3]))
        (const_int 0 [0]))
    (nil))

DI 211 is just n-1

ivtmp.20 is initialized to ap-4 and is incremented by 4 so has a value of the
form ap-4+4*i.

So the whole thing looks like

4*(n-1)+ap-(ap-4+4*i)

or

4*(n-1)+4-4*i which is 4*(n-1+1-i)

and clearly the low 2 bits are always 0.

So, should some analysis have figured this out?

Reply via email to