Product Version: Intel(R) Visual Fortran Compiler XE 15.0 or a later version
The vectorization report generated when using Visual Fortran Compiler's optimization options ( /O2 /Qopt-report:2 /Qopt-report-phase:vec ) states that loop was not vectorized since loop with function call cannot be vectorized.
An example below will generate the following remark in optimization report:
subroutine bar(a) implicit none include 'omp_lib.h' integer (kind=omp_lock_kind) a call omp_init_lock(a) end subroutine bar subroutine foo(a,n) include 'omp_lib.h' integer (kind=omp_lock_kind) a(n) do i=1,n call bar (a(i)) end do end subroutine foo
ifort -c /O2 /Qopt-report:2 /Qopt-report-phase:vec /Qopt-report-file:stdout f15527.f90
Report from: Vector optimizations [vec]
LOOP BEGIN at f15527.f90(14,8)
f15527.f90(6,10):remark #15527: simd loop was not vectorized: function call to omp_init_lock cannot be vectorized
In order for the loop to be vectorized there should be no special operators and no function or subroutine calls, unless these are inlined, either manually or automatically by the compiler, or they are SIMD (vectorized) functions.
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804