Diagnostic 15125: Invalid vectorlength clause specified


The vectorlength should always be a power of 2. In the following example, the vectorlength is given as 7 which is not a power of 2. So this becomes an invalid vectorlength. Below is an example for this scenario:


#include <math.h>
float foo(float *A, int n){
float sum=0;
int i;
#pragma simd reduction(+:sum) vectorlength(7)
  return sum;

$ icpc example62.cc -c -vec-report2
warning #13003: message verification failed for: 28003; reverting to internal message
warning #13003: message verification failed for: 28008; reverting to internal message
example62.cc(4): (col. 3) remark: Invalid vectorlength clause specified
example62.cc(6): (col. 3) remark: SIMD LOOP WAS VECTORIZED

For more complete information about compiler optimizations, see our Optimization Notice.