This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/18412] missed vectorization opportunity


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]