This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
- From: "Jeremie.Detrey at loria dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 03 Dec 2011 11:19:38 +0000
- Subject: [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
- Auto-submitted: auto-generated
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
[...]