public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
@ 2012-04-11 10:25 agner at agner dot org
  2012-04-11 14:12 ` [Bug c/52932] " ubizjak at gmail dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: agner at agner dot org @ 2012-04-11 10:25 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2012-04-16 16:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
2012-04-11 14:12 ` [Bug c/52932] " ubizjak at gmail dot com
2012-04-11 14:16 ` ubizjak at gmail dot com
2012-04-11 14:16 ` [Bug target/52932] " ubizjak at gmail dot com
2012-04-11 17:32 ` kirill.yukhin at intel dot com
2012-04-12 13:53 ` kirill.yukhin at intel dot com
2012-04-12 13:54 ` kirill.yukhin at intel dot com
2012-04-12 13:58 ` ubizjak at gmail dot com
2012-04-12 17:08 ` ubizjak at gmail dot com
2012-04-12 17:11 ` ubizjak at gmail dot com
2012-04-12 18:39 ` uros at gcc dot gnu.org
2012-04-13 16:51 ` agner at agner dot org
2012-04-13 16:58 ` ubizjak at gmail dot com
2012-04-13 18:10 ` ubizjak at gmail dot com
2012-04-16 16:04 ` uros at gcc dot gnu.org
2012-04-16 16:05 ` ubizjak at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).