I want to compile code that uses the intrinsic function _mm256_undefined_si256()
(returns a vector of 8 packed double word integers). Here is the reduced snipped of the affected function from the header file:
// test.hpp#include "immintrin.h"namespace { inline __m256i foo(__m256i a, __m256i b) { __m256i res = _mm256_undefined_si256(); // some inline asm stuff // __asm__(...); return res; }}
Compiling via gcc -march=native -mavx2 -O3 -std=c++11 test.cpp -o app
throws the following error >>_mm256_undefined_si256<< was not declared in this scope.
I can not explain why this intrinsic function is not defined, since there are other intrinsics used in the header file which work properly.