Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Diagnostic 15524: xxxx was not vectorized: search loop cannot be vectorized unless all memory references can be aligned vector load

$
0
0

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


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>