[Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
agner at agner dot org
gcc-bugzilla@gcc.gnu.org
Wed Apr 11 10:25:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
Bug #: 52932
Summary: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong
parameter type
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: agner@agner.org
The intrinsic _mm256_permutevar8x32_ps in avx2intrin.h has the second parameter
of type __m256, the correct type is __m256i.
The Intel programming reference has the type __m256, which is wrong. This error
may have propagated into gnu avx2intrin.h.
The correct type is specified by Intel at
http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/2011Update/cpp/lin/intref_cls/common/intref_avx2_permutevar8x32_ps.htm
Both Intel and Microsoft immintrin.h files have the type __m256i, which appears
to be the only logically correct choice.
Excerpt from Intel version of immintrin.h:
extern __m256 __cdecl _mm256_permutevar8x32_ps(__m256, __m256i);
For the sake of compatibility with other compilers, and for logical reasons, I
would prefer __m26i.
The function works after type-casting the parameter.
More information about the Gcc-bugs
mailing list