9.x vs 10.1.x optimization help.

9.x vs 10.1.x optimization help.

I've tried to boil this down to the simplest program I can. This vectorizes with 9.1.051, but reports "routine skipped: no vectorization candidates" with 10.1.18.


int main (int argc, char * argv[])
  int count = atoi(argv[1]);
  if (count <=0) count = 1;

  float a[count];
  float b[count];

  float * restrict a_ptr = a;
  float * restrict b_ptr = b;
  float * a_stop = a + count;

  a_ptr[0] = 1.0f;
  b_ptr[0] = 2.0f;

  while (a_ptr < a_stop) *a_ptr++ *= *b_ptr++;

  std::cout << a_ptr[-count] << ";" << b_ptr[-count] << std::endl;

  return 0;


/share/apps/intel/cce/9.1.051/bin/icpc -o test test.cpp -O3 -xP -vec-report3 -restrict -std=c99 -ansi-alias

test.cpp(18) : (col. 2) remark: LOOP WAS VECTORIZED.

/share/apps/intel/cce/10.1.018/bin/icpc -o test test.cpp -vec-report3 -ip -restrict -std=c99 -ansi-alias

test.cpp(4): (col. 1) remark: routine skipped: no vectorization candidates.

Any suggestions? Am I missing something obvious?



2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

The 11.0 compiler, formerly offered at the top of this forum, and still offered at the top of the Fortran and MKL forums, appears to have restored the optimization.

Leave a Comment

Please sign in to add a comment. Not a member? Join today