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/41783] r151561 (PRE fix) regresses zeusmp



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-10-21 15:14 -------
C testcase showing the likely underlying issue:

int db[100];
int dt, fact;
int main()
{
  int i;
  do
    {
      for (i=0; i<100; ++i)
        db[i] = i;
      fact = dt * i;
    }
  while (1);
}

where we not only insert into BB2 but also BB3:

<bb 2>:
  pretmp.4_16 = dt;
  goto <bb 5>;

<bb 3>:
  db[i_1] = i_1;
  i_3 = i_1 + 1;
  pretmp.4_14 = dt;

<bb 4>:
  # i_6 = PHI <0(6), i_3(3)>
  # prephitmp.5_15 = PHI <dt.0_4(6), pretmp.4_14(3)>

<bb 5>:
  # i_1 = PHI <i_6(4), 0(2)>
  # prephitmp.5_17 = PHI <prephitmp.5_15(4), pretmp.4_16(2)>
  if (i_1 <= 99)
    goto <bb 3>;
  else
    goto <bb 6>;

<bb 6>:
  dt.0_4 = prephitmp.5_17;
  fact.1_5 = i_1 * dt.0_4;
  fact = fact.1_5;
  goto <bb 4>;


-- 


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


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