Cause:
This vectorization diagnostic is emitted starting from Intel(R) C++ Compiler 15.0. Search loop vectorization depends on the following heuristic: If a "vector load" fits entirely within a cache line, and if such a vector load has one non-speculatively accessed element, it is safe for the compiler to speculatively load all other elements (within the same cache line) in such a vector load.
Examples:
int foo(float *a, int n){
int i;
for (i=0;i<n;i++){
if (a[2*i] == 0){
break;
}
}
return i;
}
$ icpc test45.cc -c -O2 -qopt-report2 -qopt-report-phase=vec -qopt-report-file=stderr
Begin optimization report for: foo(float *, int)
Report from: Vector optimizations [vec]
LOOP BEGIN at test45.cc(3,3)
remark #15524: loop was not vectorized: search loop cannot be vectorized unless all memory references can be aligned vector load.
LOOP END