[Bug middle-end/60418] [4.9 Regression] 435.gromacs in SPEC CPU 2006 is miscompiled

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 6 18:45:00 GMT 2014


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.



More information about the Gcc-bugs mailing list