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/38748] New: [4.4 Regression] Missed FRE because of VIEW_CONVERT_EXPR


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


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