Diagnostic 15542: Loop was not vectorized: inner loop was already vectorized.

By Devorah Hayman, Published: 10/30/2014, Last Updated: 09/24/2015

Product Version: Intel(R) Visual Fortran Compiler XE 15.0 or a later version


When using Visual Fortran Compiler's optimization options ( /O2 /Qopt-report:2 /Qopt-report-phase:vec ) the vectorization report indicates that the outer loop was not vectorized since the inner loop was vectorized.


An example below will generate the following remark in optimization report:

program f15542
implicit none
integer, parameter :: N=25
real :: a(N,N)=1.0, b(N) 
integer :: i, j 

do j=1,N 
  do i=1,N 
     a(i,j) = a(i,j) * i 
  end do 
  b(j) = 1.0 
end do

print*, a(3,3), b(3) 
end program f15542 

ifort -c /O2 /Qopt-report:2 /Qopt-report-phase:vec /Qopt-report-file:stdout f15542.f90

(ifort -c -O2 -qopt-report2  f15542.f90 for Linux)

Begin optimization report for: F15542

    Report from: Vector optimizations [vec]

LOOP BEGIN at f15542.f90(7,1)
   remark #15542: loop was not vectorized: inner loop was already vectorized

   LOOP BEGIN at f15542.f90(8,3)
      remark #15300: LOOP WAS VECTORIZED


See also:

Requirements for Vectorizable Loops

Vectorization Essentials

Vectorization and Optimization Reports

Back to the list of vectorization diagnostics for Intel® Fortran

Product and Performance Information


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