Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

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

$
0
0

Product Version: Intel(R) Visual Fortran Compiler XE 15.0.0.070

Cause:

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

Example:

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 

Report from: Vector optimizations [vec]

LOOP BEGIN at f15414.f90(8,5)
   remark #15414: loop was not vectorized: nothing to vectorize since loop body became empty after optimizations
LOOP END

Resolution:

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


Viewing all articles
Browse latest Browse all 3384

Latest Images

Trending Articles



Latest Images