From 8a72034e41781e947fa16c42cce912e13868f912 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Oct 2010 06:52:23 +0000 Subject: [PATCH] the second argument to __builtin_ia32_pslldqi128 must be an immediate, 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 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Headers/emmintrin.h b/lib/Headers/emmintrin.h index e5dfe26b49..9b6b5df457 100644 --- a/lib/Headers/emmintrin.h +++ b/lib/Headers/emmintrin.h @@ -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) -- 2.40.0