------- Comment #2 from pinskia at gcc dot gnu dot org 2009-01-15 23:26 ------- Created an attachment (id=17111) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17111&action=view) Patch which should fix this and PR 38748
This patch still creates VCE for INDIRECT_REF based but only if the aliasing sets are the same. This is to allow for the following to be optimized: struct S { unsigned f; }; int __attribute__((noinline)) foo (float *r, struct S *p) { int *q = (int *)&p->f; int i = *q; *r = 0.0; return i + *q; } Without a need for &p->f in the IR. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38747