Diagnostic 15414: Loop was not vectorized: loop body became empty after optimizations

By Devorah Hayman,

Published: 10/03/2014   Last Updated: 10/03/2014

Product Version: Intel® Fortran Compiler 15.0 and above


The vectorization report generated when using Intel® Fortran Compiler's optimization options (/O2 /Qopt-report:2) states that loop was not vectorized since loop body became empty after optimizations.


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

integer function foo(a, b, n) 
    implicit none
    integer, intent(in) :: n
    real, intent(inout) :: a
    real, intent (in)   :: b
    integer :: i
    do i=1,n
           a = b + 1
    end do
    foo = a
end function 
ifort -c /O2 /Qopt-report:2 /Qopt-report-file:stdout f15414.f90
Report from: Interprocedural optimizations [ipo]
  -Qinline-factor: 100
  -Qinline-min-size: 30
  -Qinline-max-size: 230
  -Qinline-max-total-size: 2000
  -Qinline-max-per-routine: 10000
  -Qinline-max-per-compile: 500000
Begin optimization report for: FOO
    Report from: Interprocedural optimizations [ipo]
INLINE REPORT: (FOO) [1] f15414.f90(1,18)


In the example above, there is only one expression inside the loop. When moved outside the loop as a result of the compiler's optimization process there is nothing else left inside the loop to vectorize. 

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


Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.