I have some code that uses _mm_slli_epi32 intrinsics and some other shift ones.
This code compiles fine in GCC 4.1/4.0 and ICC 9.1.
I tried compiling it with GCC 4.2 and I get the error
testt.c:4: error: shift must be an immediate
_mm_slli_epi32 is defined as:
__m128i _mm_slli_epi32 (__m128i m, int count)
Unfortunately, it seems like GCC 4.2 is requiring count to be an immediate. If
an immediate were intended to be required I believe it would be named "int imm"
instead of "int count" like how _mm_slli_si128 is defined.
Here's a test case that compiles with ICC 9.1, GCC 4.0, and GCC 4.1, but not
GCC 4.2:
#include <xmmintrin.h>
void a( int n ) {
__m128i a;
a = _mm_slli_epi32( a, n );
}
I've also tried different flags, including both -m32 and -m64 to see if it was
an issue with that. Nothing fixed it.
--
Summary: GCC 4.2 has different requirements for x86 shift xmm
intrinsics
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mikelikespie at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32961