This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18412] missed vectorization opportunity
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Nov 2004 02:21:17 -0000
- Subject: [Bug tree-optimization/18412] missed vectorization opportunity
- References: <20041110010324.18412.senor_fjord@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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