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: unassig...@gcc.gnu.org ReportedBy: jeremie.det...@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 [...]