This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/21485] [4.9/5/6/7 Regression] missed load PRE, PRE makes i?86/7 suck


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

--- Comment #60 from Richard Biener <rguenth at gcc dot gnu.org> ---
With code hoisting we now end up with the following for the testcase in
comment#6.  Over-the-weekend testing on bytemark (nbench?) didn't show
any effect though.  Thus requires re-evaluation.

NumSift (long int * array, long unsigned int i, long unsigned int j)
{
  long unsigned int k;
  sizetype _4;
  sizetype _5;
  long int * _6;
  long int _7;
  long unsigned int _8;
  long int * _9;
  long int _10;
  long unsigned int _14;
  long int * _28;
  long int pretmp_29;
  long unsigned int _30;
  long int prephitmp_31;
  long int * prephitmp_34;

  <bb 2>:
  goto <bb 10>;

  <bb 3>:
  _30 = _14 * 8;
  _28 = array_22(D) + _30;
  pretmp_29 = *_28;
  if (_14 < j_20(D))
    goto <bb 4>;
  else
    goto <bb 6>;

  <bb 4>:
  _4 = _14 + 1;
  _5 = _4 * 8;
  _6 = array_22(D) + _5;
  _7 = *_6;
  if (_7 > pretmp_29)
    goto <bb 5>;
  else
    goto <bb 6>;

  <bb 5>:

  <bb 6>:
  # k_16 = PHI <_14(3), _14(4), _4(5)>
  # prephitmp_34 = PHI <_28(3), _28(4), _6(5)>
  # prephitmp_31 = PHI <pretmp_29(3), pretmp_29(4), _7(5)>
  _8 = i_15 * 8;
  _9 = array_22(D) + _8;
  _10 = *_9;
  if (_10 < prephitmp_31)
    goto <bb 7>;
  else
    goto <bb 8>;

  <bb 7>:
  *prephitmp_34 = _10;
  *_9 = prephitmp_31;
  goto <bb 9>;

  <bb 8>:
  i_26 = j_20(D) + 1;

  <bb 9>:
  # i_23 = PHI <k_16(7), i_26(8)>

  <bb 10>:
  # i_15 = PHI <i_23(9), i_18(D)(2)>
  _14 = i_15 * 2;
  if (_14 <= j_20(D))
    goto <bb 3>;
  else
    goto <bb 11>;

  <bb 11>:
  return;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]