Diagnostic 15048: vector dependence: assumed xxxx dependence between xxxx line <val> and xxxx line <val>

There are two variants of this diagnostic message:
1. vector dependence: assumed ANTI dependence between xxxx line <val> and xxxx line <val>
2. vector dependence: assumed FLOW dependence between xxxx line <val> and xxxx line <val>

Cause:

1. ANTI dependence stands for "READ before WRITE" scenario when considering the vector version of a loop. In the below, when the compiler auto-vectorizer tries to vectorize for SSE2 architecture by default, it chooses a vectorlength of 4 (since data type it operates on is int). But when considering a vector operand instead of scalar operands for this loop, there is an overlap between the input vector and output vector. The overlap is such those overlapped locations are read before latest value is written into them.

2. FLOW dependence stands for "WRITE before READ" scenario when considering the vector version of a loop. In the below, when the compiler auto-vectorizer tries to vectorize for SSE2 architecture by default, it chooses a vectorlength of 4 (since data type it operates on is int). But when considering a vector operand instead of scalar operands for this loop, there is an overlap between the input vector and output vector. The overlap is such those overlapped locations are written into before their initial value is read for the computation.

Below is an example for above two scenarios:

Example:

#include<stdlib.h>
#define N 70
int main(int argc, char *argv[]){
int k = atoi(argv[1]);
int a[N], i;
for(i = abs(k); i < N; i++)
        a[i] = a[i+k] + 1;
return 0;
}


$ icpc dependency.cc -vec-report6
dependency.cc(6): (col. 1) remark: loop was not vectorized: existence of vector dependence
dependency.cc(6): (col. 24) remark: vector dependence: assumed ANTI dependence between i line 6 and i line 6
dependency.cc(6): (col. 24) remark: vector dependence: assumed FLOW dependence between i line 6 and i line 6
dependency.cc(6): (col. 24) remark: vector dependence: assumed FLOW dependence between i line 6 and i line 6
dependency.cc(6): (col. 24) remark: vector dependence: assumed ANTI dependence between i line 6 and i line 6
dependency.cc(6): (col. 24) remark: vector dependence: assumed FLOW dependence between i line 6 and i line 7
dependency.cc(7): (col. 2) remark: vector dependence: assumed ANTI dependence between i line 7 and i line 6
dependency.cc(6): (col. 24) remark: vector dependence: assumed FLOW dependence between i line 6 and i line 7
dependency.cc(7): (col. 2) remark: vector dependence: assumed ANTI dependence between i line 7 and i line 6
dependency.cc(7): (col. 2) remark: vector dependence: assumed ANTI dependence between i line 7 and i line 6
dependency.cc(6): (col. 24) remark: vector dependence: assumed FLOW dependence between i line 6 and i line 7
dependency.cc(7): (col. 2) remark: vector dependence: assumed ANTI dependence between i line 7 and i line 6
dependency.cc(6): (col. 24) remark: vector dependence: assumed FLOW dependence between i line 6 and i line 7
dependency.cc(7): (col. 2) remark: vector dependence: assumed ANTI dependence between a line 7 and a line 7
dependency.cc(7): (col. 2) remark: vector dependence: assumed FLOW dependence between a line 7 and a line 7
dependency.cc(7): (col. 2) remark: vector dependence: assumed FLOW dependence between a line 7 and a line 7
dependency.cc(7): (col. 2) remark: vector dependence: assumed ANTI dependence between a line 7 and a line 7


 

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