Cause:
The loop has an assignment operation of a structure variable whose definition is in vec4.h. Since there are multiple conditions in the process of assignment using this pointer (check the overloaded assignment operator in vec4.h), it emits this vectorization message. Below are examples for both the scenarios.
Example:
#include "vec4.h" extern vec4 *a; extern vec4 *b; void vecmsg_testcore002() { int i, k = 0; vec4 s(0); #pragma omp simd for (i = 0; i < 1024; i++) { if (a[i] == s) { b[i] = vec4(i); } } }
>icl -c -Qvec-report2 example.cpp -Qopenmp
example.cpp(7): (col. 10) remark: LOOP WAS VECTORIZED
example.cpp(11): (col. 16) remark: loop was not vectorized: conditional assignment to a scalar
example.cpp(9): (col. 8) warning #13379: loop was not vectorized with "simd"
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(51): (col. 3) remark: LOOP WAS VECTORIZED
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(46): (col. 3) remark: LOOP WAS VECTORIZED
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(104): (col. 3) remark: LOOP WAS VECTORIZED
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(111): (col. 11) remark: LOOP WAS VECTORIZED
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(87): (col. 3) remark: LOOP WAS VECTORIZED
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(97): (col. 3) remark: LOOP WAS VECTORIZED
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(98): (col. 11) remark: LOOP WAS VECTORIZED
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(62): (col. 7) remark: LOOP WAS VECTORIZED
C:\Users\amadhuso\Desktop\Xinmin\example2\vec4.h(70): (col. 7) remark: LOOP WAS VECTORIZED