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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
We code-generate

  <bb 2> [local count: 107374]:
  xy = 0;

  <bb 16> [local count: 107374]:
  # graphite_IV.7_4 = PHI <0(2), graphite_IV.7_2(17)>
  _21 = (int) graphite_IV.7_4;
  _22 = ~_21;
  sa = {};

...

  <bb 25> [count: 0]:
  xy = _22;
  graphite_IV.7_2 = graphite_IV.7_4 + 1;
  if (graphite_IV.7_4 < 1)
    goto <bb 17>; [100.00%]
  else
    goto <bb 12>; [0.00%]

  <bb 17> [count: 0]:
  goto <bb 16>; [100.00%]

  <bb 12> [count: 0]:
  tb = 1;
  return;

The issue is in the way we generate do-while style loops where we execute stmts
in the original latch too many times in this case.

The store to xy is originally in the latch of the not header copied loop
but not afterwards.

-fgraphite-identity is enough, no need to "parallelize".

Reply via email to