This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51393

             Bug #: 51393
           Summary: Wrong parameter type for _mm256_insert_epi64 in
                    avxintrin.h
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Jeremie.Detrey@loria.fr


Created attachment 25978
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25978
Minimal example.

In avxintrin.h:762, the second parameter (__D) of the function
_mm256_insert_epi64 is declared as int where it should be long long.

This results in an uncorrect behavior (truncation to 32 bits then sign
extension) when the attached minimal program is compiled with options -O3
-mavx. A look at the corresponding assembler code confirms this:

  [...]
  vpxor   %xmm0, %xmm0, %xmm0
  movslq  %ebx, %rax
  vpinsrq $0, %rax, %xmm0, %xmm0
  [...]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]