Diagnostic 15524: Loop was not vectorized: search loop cannot be vectorized unless all memory references can be aligned vector load.

By Devorah Hayman, Published: 10/29/2014, Last Updated: 10/29/2014

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 all memory references cannot be an aligned vector load.


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

integer function foo(a, n) 

       implicit none
       integer, intent(in) :: n
       real, intent(inout) :: a(n) 
       integer :: i 
       do i=1,n   
         if (a(2*i) .eq. 0) goto 100 
       end do
100    CONTINUE 
       foo = i
end function foo

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

Report from: Vector optimizations [vec]

 LOOP BEGIN at f15524.f90(8,8)

   remark #15524: loop was not vectorized: search loop cannot be vectorized unless all memory references can be aligned vector load. 



 In search loop vectorization if a “vector load” fits entirely within a cache line, and if such a vector load has one non-speculatively accessed  element, it is safe for the compiler to speculatively load all other elements (within the same cache line) in such a vector load. 
Rewriting the code and avoiding GOTO statements will get this loop 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