[Bug tree-optimization/38748] New: [4.4 Regression] Missed FRE because of VIEW_CONVERT_EXPR

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Tue Jan 6 21:32:00 GMT 2009


The load from *q should be CSEd but it isn't because tree forwprop introduces
a VIEW_CONVERT_EXPR from a load of p->f which conflicts with the store
through *r.

/* { dg-do "compile" } */
/* { dg-options "-O -fdump-tree-fre" } */

struct S { float f; };
int __attribute__((noinline))
foo (float *r, struct S *p)
{
  int *q = (int *)&p->f;
  int i = *q;
  *r = 0.0;
  return i + *q;
}

/* { dg-final { scan-tree-dump-times "\\\*q" 1 "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */


-- 
           Summary: [4.4 Regression] Missed FRE because of VIEW_CONVERT_EXPR
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list