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



--- Comment #18 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-21 
14:01:33 UTC ---

(In reply to comment #17)

> > Nothing to fix for me - it's the IPA-CP decision that pessimizes things.

> Well, replacing parameter by known constant should not pessimize in general...



True, but replacing restrict parameter with sth non-restrict may be.

The language spec allows me to write



void foo (int * restrict p, int * restrict q, int n)

{

  for (i = 0; i < n; ++i)

    p[i] = q[n-i];

}



and call it with foo (&a[0], &a[100], n) when I know that with this

particular n it will not alias.



But without knowing 'n' (like in the mgrid case) there is no chance

that we can re-discover this non-aliasing when you propagate &a[0]

and &a[100].

Reply via email to