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

--- Comment #11 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
The testcase for PR104067 shows an example where the dominance matters,
irregardless of if we reset relations at the backedge point.  There we have a
path that looks like 9->3->5->...:

 <bb 3> [local count: 1063004409]:
  # j_17 = PHI <j_2(9), 0(2)>
  # q_18 = PHI <prephitmp_16(9), &a(2)>
  # ivtmp_4 = PHI <ivtmp_3(9), 99(2)>
  j_8 = j_17 + 1;
  if (j_8 == 10)
    goto <bb 5>; [34.00%]
  else
    goto <bb 4>; [66.00%]

  <bb 4> [local count: 701582906]:
  _1 = (sizetype) j_8;
  _15 = _1 * 4;
  _14 = &a + _15;

  <bb 5> [local count: 1063004409]:
  # j_2 = PHI <j_8(4), 0(3)>
  # prephitmp_16 = PHI <_14(4), &a(3)>
  if (prephitmp_16 == q_18)
    goto <bb 6>; [0.00%]
  else
    goto <bb 7>; [100.00%]

  <bb 9> [local count: 1052374367]:
  goto <bb 3>; [100.00%]

Even if we reset relations and clear the root oracle at the backedge (9->3), we
still get the _16 == _18 in BB3, followed by the DEF of _16 in BB5.

Reply via email to