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

Diagnostic 15344: loop was not vectorized: vector dependence prevents vectorizationxxxx

$
0
0

Cause:

This vectorization diagnostic is emitted starting from Intel(R) C++ Compiler 15.0. This diagnostic message is emitted when the compiler detects or assumes a vector dependence in the loop body. Only the first dependence information is displayed when using -qopt-report2 compiler option (level 2 report). More detailed information on the vector dependence can be generated by using the compiler option -qopt-report5 (on Linux) or /Qopt-report5​ (on Windows).

Examples:

int foo(float *A, int n){
  int inx = 0;
  float max = A[0];
  int i;
  for (i=0;i<n;i++){
    if (max>A[i]){
      max = A[i];
      inx = i*i;
    }
  }
  return inx;
}
$ icpc test34.cc -c -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 test34.cc(5,3)
   remark #15344: loop was not vectorized: vector dependence prevents vectorization. First dependence is shown below. Use level 5 report for details   [ test34.cc(8,7) ]
   remark #15346: vector dependence: assumed ANTI dependence between  line 6 and  line 7   [ test34.cc(8,7) ]
LOOP END
LOOP BEGIN at test34.cc(5,3)
<Remainder>
LOOP END

Viewing all articles
Browse latest Browse all 3384

Trending Articles