Diagnostic 15414: loop was not vectorized: nothing to vectorize since xxxx body became empty after optimizations

By Anoop Madhusoodhanan Prabha,

Published:07/21/2014   Last Updated:07/21/2014

This vectorization diagnostic is emitted starting from Intel(R) C++ Compiler 15.0. 

Cause:

This diagnostic message is emitted when the loop body is empty. In the below example, the operation a = b + 1, is an operation which can be moved outside the loop and computed just once. Since this is the only operation happening inside the loop, moving this operation outside the loop body will make the loop body empty. 

Examples:

int foo(int a, int b, int n){
  int i;
  for(i = 0; i < n; i++)
    a = b + 1;
  return a;
}

$ icpc test42.cc -c -O2 -qopt-report2 -qopt-report-file=stderr

    Report from: Interprocedural optimizations [ipo]

INLINING OPTION VALUES:
  -inline-factor: 100
  -inline-min-size: 30
  -inline-max-size: 230
  -inline-max-total-size: 2000
  -inline-max-per-routine: 10000
  -inline-max-per-compile: 500000


Begin optimization report for: foo(int, int, int)

    Report from: Interprocedural optimizations [ipo]

INLINE REPORT: (foo(int, int, int)) [1] test42.cc(1,29)

Product and Performance Information

1

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