[Bug tree-optimization/85501] missed if-conversion / phiopt trick
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Apr 24 18:24:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85501
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Take:
void f(float *myVector, float *result, int i )
{
for(int n = 0; n < 1024; n++)
if (myVector[n] > 0.5){
result[n] = 0.8f;
}
else {
result[n] = 0.1f;
}
}
This loop does get vectorized at -O3 and produces the conditional move at -O2
but the tree level for the scalar side has a store inside the conditional
still.
More information about the Gcc-bugs
mailing list