]> granicus.if.org Git - clang/commitdiff
the second argument to __builtin_ia32_pslldqi128 must be an immediate,
authorChris Lattner <sabre@nondot.org>
Fri, 1 Oct 2010 06:52:23 +0000 (06:52 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 1 Oct 2010 06:52:23 +0000 (06:52 +0000)
so it needs to be called from a macro, not a function.  This is a necessary
but insufficient step towards fixing PR8221

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115299 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/emmintrin.h

index e5dfe26b49a6adc445efd6f8d489488699943769..9b6b5df45780da9d04a2f890005bd4f92dd153a2 100644 (file)
@@ -777,11 +777,8 @@ _mm_xor_si128(__m128i a, __m128i b)
   return a ^ b;
 }
 
-static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
-_mm_slli_si128(__m128i a, int imm)
-{
-  return __builtin_ia32_pslldqi128(a, imm * 8);
-}
+#define _mm_slli_si128(VEC, IMM) \
+  ((__m128i)__builtin_ia32_pslldqi128(VEC, (IMM)*8))
 
 static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
 _mm_slli_epi16(__m128i a, int count)