https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68780

            Bug ID: 68780
           Summary: _mm256_mul_epi32 intrinsic not working
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: guille at cal dot berkeley.edu
  Target Milestone: ---

Created attachment 36950
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36950&action=edit
Preprocessed source

Multiplying:
_mm256_mul_epi32([1,1,1,1, 1,1,1,1], 
                 [2,2,2,2, 2,2,2,2])
results in:
[2,0,2,0, 2,0,2,0]



--------------------------------------------------------
$ cat t.c
#include <stdio.h>
#include <immintrin.h>


int main()
{
    __m256i a = _mm256_set1_epi32(1);
    __m256i b = _mm256_set1_epi32(2);
    __m256i c = _mm256_mul_epi32(a, b);
    printf("%d%d%d%d%d%d%d%d\n", ((const int32_t *)&a)[0], ((const int32_t
*)&a)[1], 
                                 ((const int32_t *)&a)[2], ((const int32_t
*)&a)[3], 
                                 ((const int32_t *)&a)[4], ((const int32_t
*)&a)[5], 
                                 ((const int32_t *)&a)[6], ((const int32_t
*)&a)[7]);
    printf("%d%d%d%d%d%d%d%d\n", ((const int32_t *)&b)[0], ((const int32_t
*)&b)[1], 
                                 ((const int32_t *)&b)[2], ((const int32_t
*)&b)[3], 
                                 ((const int32_t *)&b)[4], ((const int32_t
*)&b)[5], 
                                 ((const int32_t *)&b)[6], ((const int32_t
*)&b)[7]);
    printf("%d%d%d%d%d%d%d%d\n", ((const int32_t *)&c)[0], ((const int32_t
*)&c)[1], 
                                 ((const int32_t *)&c)[2], ((const int32_t
*)&c)[3], 
                                 ((const int32_t *)&c)[4], ((const int32_t
*)&c)[5], 
                                 ((const int32_t *)&c)[6], ((const int32_t
*)&c)[7]);
    return 0;
}


----------------------------------------------------------
(Note the -Wa,-q is needed because without on OSX 10.9.5 the assembler
complains "...no such instruction: `vmovdqa...")

$ gcc t.c -o t -mavx2  -Wa,-q -v -save-temps 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/6.0.0/lto-wrapper
Target: x86_64-apple-darwin13.4.0
Configured with: ..//configure --enable-languages=c,c++
Thread model: posix
gcc version 6.0.0 20151108 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-o' 't' '-mavx2' '-v' '-save-temps'
'-mmacosx-version-min=10.9.4' '-mtune=core2'
 /usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/6.0.0/cc1 -E -quiet -v
-D__DYNAMIC__ t.c -fPIC -mavx2 -mmacosx-version-min=10.9.4 -mtune=core2
-fpch-preprocess -o t.i
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0/../../../../x86_64-apple-darwin13.4.0/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0/include-fixed
 /usr/include
 /System/Library/Frameworks
 /Library/Frameworks
End of search list.
COLLECT_GCC_OPTIONS='-o' 't' '-mavx2' '-v' '-save-temps'
'-mmacosx-version-min=10.9.4' '-mtune=core2'
 /usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/6.0.0/cc1 -fpreprocessed t.i
-fPIC -quiet -dumpbase t.c -mavx2 -mmacosx-version-min=10.9.4 -mtune=core2
-auxbase t -version -o t.s
GNU C11 (GCC) version 6.0.0 20151108 (experimental) (x86_64-apple-darwin13.4.0)
        compiled by GNU C version 6.0.0 20151108 (experimental), GMP version
6.0.0, MPFR version 3.1.3-p2, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C11 (GCC) version 6.0.0 20151108 (experimental) (x86_64-apple-darwin13.4.0)
        compiled by GNU C version 6.0.0 20151108 (experimental), GMP version
6.0.0, MPFR version 3.1.3-p2, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 638918875426438b832445196361a1ea
COLLECT_GCC_OPTIONS='-o' 't' '-mavx2' '-v' '-save-temps'
'-mmacosx-version-min=10.9.4' '-mtune=core2'
 as -arch x86_64 -force_cpusubtype_ALL -q -o t.o t.s
COMPILER_PATH=/usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/6.0.0/:/usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/6.0.0/:/usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/:/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0/:/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/
LIBRARY_PATH=/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0/:/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0/../../../
COLLECT_GCC_OPTIONS='-o' 't' '-mavx2' '-v' '-save-temps'
'-mmacosx-version-min=10.9.4' '-mtune=core2'
 /usr/local/libexec/gcc/x86_64-apple-darwin13.4.0/6.0.0/collect2 -dynamic -arch
x86_64 -macosx_version_min 10.9.4 -weak_reference_mismatches non-weak -o t
-L/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0
-L/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0/../../.. t.o
-no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v
collect2 version 6.0.0 20151108 (experimental)
/usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.9.4
-weak_reference_mismatches non-weak -o t
-L/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0
-L/usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0/../../.. t.o
-no_compact_unwind -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v
@(#)PROGRAM:ld  PROJECT:ld64-241.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h
armv6m armv7m armv7em
Library search paths:
        /usr/local/lib/gcc/x86_64-apple-darwin13.4.0/6.0.0
        /usr/local/lib
        /usr/lib
        /usr/local/lib
Framework search paths:
        /Library/Frameworks/
        /System/Library/Frameworks/

Reply via email to