Testcase:
float
quantum_real(float _Complex a)
{
float *p = (float *) &a;
return p[0];
}
float
quantum_imag(float _Complex a)
{
float *p = (float *) &a;
return p[1];
}
------- CUT -----
Even though the above are optimized at the RTL level, it would be nice if we
could get them optimized at the TREE level also.
We already optimize ((float *) &a)[0] and ((float *) &a)[1] via PR 26134.
This should help libquantum in SPEC 2k6 also.
--
Summary: fold *(float*)(&complex_float_var) into
REALPART_EXPR<complex_float_var> in when &cfv is in a
different statement
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization, TREE
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
OtherBugsDependingO 26163
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32691