Using GCC 4.8.1 on previous generation i7 processor with flags:
-O3 -ftree-vectorizer-verbose=5 -fomit-frame-pointer -DNDEBUG -fno-operator-names -msse2 -mfpmath=sse -march=native -funsafe-math-optimizations -ffast-math
(e.g. all of 'hem!)
I get:
.cpp:31:note: not vectorized: relevant stmt not supported: D.56044_367 = __builtin_logf (D.55726_232);
for the line:
for(i=0;i<N5;i++) d3[i]=std::log(d2[i]);
what does this 'error' message mean? (d3 and d2 are vector of floats). Is it hopeless to vectorize the log function?
To vectorize
means to pack multiple data items into one register and to operate on them in parallel using vector
(a.k.a. packed
) instructions. Many floating point operations have vector
forms, LOG
is not one of them. Here's a list of single-precision packed form vector instructions, from http://docs.oracle.com/cd/E19253-01/817-5477/epmoa/index.html
It means that compiler has no SIMD (SSE) instructions to evaluate log.
SIMD instructions allow to evaluate several operations for the price of one so to speak. Log and its relatives typically have no matching hardware instructions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With