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

Diagnostic 15378: xxxx was not vectorized: -ffreestanding flag prevents vectorization of integer divide/remainder

$
0
0

Cause:

This vectorization diagnostic is emitted starting from Intel(R) C++ Compiler 15.0. This diagnostic message is emitted when -ffreestanding compiler option is used. Generally the vectorizer uses SVML ldivide ibrary call to vectorize this loop. Using -ffreestanding compiler option will not use the SVML library and that's when this diagnostic message is emitted.

Examples:

void foo(int *a, int *b, int n){
  int i;
  for (i=0;i<n;i++){
    a[i] /= b[i];
  }
}

$ icpc -c test41.cc -qopt-report2 -qopt-report-phase=vec -qopt-report-file=stderr -ffreestanding
Begin optimization report for: foo(int *, int *, int)
    Report from: Vector optimizations [vec]

LOOP BEGIN at test41.cc(3,3)
<Multiversioned v1>
   remark #15378: loop was not vectorized: -ffreestanding flag prevents vectorization of integer divide/remainder   [ test41.cc(4,5) ]
LOOP END

LOOP BEGIN at test41.cc(3,3)
<Multiversioned v2>
   remark #15304: loop was not vectorized: non-vectorizable loop instance from multiversioning
LOOP END


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>