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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
For the remaining superset_of path we now have

        ((m_16(D) != 0) AND (r_18(D) <= 19) AND (m_16(D) != 100) AND (n_15(D)
<= 9))
        OR ((l_22(D) > 100) AND (NOT (m_16(D) != 0)) AND (r_18(D) <= 19) AND
(m_16(D) != 100) AND (n_15(D) <= 9))

guarding the well-definedness of

        v_59 = PHI <v_58(25), r_18(D)(21)>

and

       ((r_18(D) <= 18))

guarding the use.  The use predicate fails to prove either of the definition
guards which possibly is because the use predicate does not cover the path
from the upthread PHIs to the PHI in question:

<bb 13> [local count: 716722667]:
# v_58 = PHI <v_57(11), v_17(D)(12)>    // related PHI
if (l_22(D) > 100)
  goto <bb 14>; [50.00%]
else
  goto <bb 24>; [50.00%]

<bb 14> [local count: 358361334]:
_6 = m_16(D) <= 99;
_7 = _1 & _6;
if (_7 != 0)
  goto <bb 25>; [37.31%]
else
  goto <bb 26>; [62.69%]

<bb 15> [local count: 183623112]:
# v_59 = PHI <v_58(25), r_18(D)(21)>   // main PHI
if (r_18(D) <= 18)
  goto <bb 16>; [52.89%]
else
  goto <bb 27>; [47.11%]

<bb 16> [local count: 88583700]:
blah (v_59);

here the related PHI def v_58 is marked as possibly undefined so we use
the predicates from its incoming edges (and one more related PHI in BB11).
But the use predicate of v_58 in the v_59 PHI def isn't taken into
account.  That one would be

        ((m_16(D) <= 99) AND (n_15(D) <= 9) AND (l_22(D) > 100))

but that still looks insufficent when combined with (r_18(D) <= 18) to prove

((m_16(D) != 0) AND (r_18(D) <= 19) AND (m_16(D) != 100) AND (n_15(D) <= 9))

in particular the m_16(D) != 0 predicate.  I'm also seeing a missed
simplifcation of NOT (m_16(D) != 0) but that will not help either.

Reply via email to