[Bug tree-optimization/18412] missed vectorization opportunity
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Nov 10 02:21:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-10 02:21 -------
Yes but it is not done right, note that if I do this:
#include <stdio.h>
#include <malloc.h>
static int size;
int main() {
int *x;
x = (int *)malloc(sizeof(int) * size);
for (int i = 0; i < size; i++)
x[i] = 7;
return 0;
}
We do vectorize the loop as we know that malloc does not modify size or even return something which
can alias size.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18412
More information about the Gcc-bugs
mailing list