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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-05-15

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC isn't able to compute the number of iterations of a loop like the following
which would be required for us to peel it and do the required constant folding.
We're also not trying brute-force peeling for loops we cannot compute an
upper bound of its number of iterations (attempting to arrive at one when
evaluating the peeled stmts).

  <bb 3> [local count: 955630224]:
  # _26 = PHI <_9(8), 116(2)>
  # h_27 = PHI <h_15(8), 0(2)>
  # s_29 = PHI <s_14(8), "t.c"(2)>
  _10 = (unsigned int) _26;
  h_12 = _10 + h_27;
  s_14 = s_29 + 1;
  h_15 = _10 * h_12;
  _9 = *s_14;
  if (_9 != 0)
    goto <bb 8>; [89.00%]
  else
    goto <bb 4>; [11.00%]

  <bb 8> [local count: 850510900]:
  goto <bb 3>; [100.00%]

Reply via email to