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

ID 732972
Updated 9/24/2015
Version Latest
Public

author-image

By

Product Version: Intel® Visual Fortran Compiler XE 15.0 or a later version 

Cause:

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.

Example:

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
   LOOP END

LOOP END

See also:

Requirements for Vectorizable Loops

Vectorization Essentials

Vectorization and Optimization Reports

Back to the list of vectorization diagnostics for Intel® Fortran