http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46008
Summary: Floating point condexpr not vectorized
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
void bar (double *);
void foo (double *a, double *b, double *c, double *d)
{
double e[1024], f;
int i;
for (i = 0; i < 1024; i++)
e[i] = (f = a[i] + b[i] + c[i] * d[i]) < 0.0 ? 3.0 : f;
bar (e);
}
is not vectorized at -O3 (is at -O3 -ffast-math though).
One problem is in ifcvt, which creates bogus dead stmts with bool type, but
even with that fixed the vectorizer gives up.
I'll attach ifcvt fix, is there something that can be done about this on the
vectorizer side?