[Bug tree-optimization/38865] New: missing FRE with VIEW_CONVERT_EXPR
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jan 15 23:38:00 GMT 2009
Take:
struct s { int i; };
float a (struct s *sv)
{
sv->i = 0;
int d = sv->i;
return *(float*)&d;
}
float a1 (struct s *sv)
{
sv->i = 0;
return *(float*)&sv->i;
}
We miss that we could constant prop 0 into the VIEW_CONVERT_EXPR.
Likewise for non aliasing issues but with vectors:
#define vector __attribute__((vector_size(16) ))
struct s { vector int i; };
vector float a (struct s *sv)
{
sv->i = (vector int){0,0,0};
vector int d = sv->i;
return (vector float)(d);
}
vector float a1 (struct s *sv)
{
sv->i = (vector int){0,0,0};
return (vector float)sv->i;
}
--
Summary: missing FRE with 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: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38865
More information about the Gcc-bugs
mailing list