[Bug tree-optimization/61938] Vectorization not happening .
harmeeksingh at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jul 30 22:25:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61938
--- Comment #6 from harmeeksingh at gmail dot com ---
Equivalent code when written by hand where tmp is a intermediate array . The
compiler
vectorizes both loops.
int k, i;
/* vectorize the compares */
for (i=0; i < arraysize; ++i) {
tmp[i] = (array[i] == compval);
}
/* another loop now set the result array */
for (k=0, i=0; i < arraysize; ++i) {
if (tmp[i])
{
result[k] = i;
k++;
}
}
More information about the Gcc-bugs
mailing list