http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60418

--- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
One pass removes a preheader in

  if (_47 > 0)
    goto <bb 3>;
  else
    goto <bb 8>;

  <bb 3>:

  <bb 4>:
  # n_20 = PHI <1(3), n_269(7)>

and becomes:

  if (_47 > 0)
    goto <bb 3>;
  else
    goto <bb 7>;

  <bb 3>:
  # n_20 = PHI <1(2), n_269(6)>

The next pass adds the preheader back:

  if (_47 > 0)
    goto <bb 3>;
  else
    goto <bb 7>;

  <bb 3>:
  # n_264 = PHI <1(2)> 

  <bb 8>:
  # n_20 = PHI <n_264(3), n_269(9)>

which changes the loop behavior and generates different results.

Reply via email to