------- Comment #8 from rguenth at gcc dot gnu dot org  2008-08-17 10:20 -------
Hm, I have a patch that makes PRE phi-translation use the oracle, but still
the testcase is not optimized because for

struct Loc { int x[1]; };

int foo (int i, int b)
{
  struct Loc IND;

  if (b)
    IND.x[0] = i;
  else
    IND.x[0] = i;

  return IND.x[0];
}

PRE doesn't do anything either (instead this case looks like something
FRE can handle with the patch I have for PR23094).

But the patch handles

struct Loc { int x[2]; };

int foo (int i, int j, int b)
{
  struct Loc IND;

  if (b)
    {
      IND.x[0] = i;
      IND.x[1] = 1;
    }
  else
    {
      IND.x[0] = j;
      IND.x[1] = 0;
    }

  return IND.x[0];
}

I suspect that the original testcase was handled by DOM, which also lacks
support from the alias-oracle.  Hmm, checking with 4.3 it doesn't do anything
for the testcase - not even the PRE opportunity for IND.x[2].  So
eventually this was something done by LIM, as the testcase was placed
inside a loop? ...


-- 


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

Reply via email to