[cfe-commits] r107902 - /cfe/trunk/lib/Headers/emmintrin.h
Eli Friedman
eli.friedman at gmail.com
Thu Jul 8 13:09:45 PDT 2010
Author: efriedma
Date: Thu Jul 8 15:09:45 2010
New Revision: 107902
URL: http://llvm.org/viewvc/llvm-project?rev=107902&view=rev
Log:
PR7588: Fix the _mm_shufflehi_epi16 macro. (The issue was an oversight
involving operator precedence.)
Modified:
cfe/trunk/lib/Headers/emmintrin.h
Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=107902&r1=107901&r2=107902&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Thu Jul 8 15:09:45 2010
@@ -1222,9 +1222,10 @@
4, 5, 6, 7))
#define _mm_shufflehi_epi16(a, imm) \
((__m128i)__builtin_shufflevector((__v8hi)(a), (__v8hi) {0}, 0, 1, 2, 3, \
- 4 + ((imm) & 0x3), 4 + ((imm) & 0xc) >> 2, \
- 4 + ((imm) & 0x30) >> 4, \
- 4 + ((imm) & 0xc0) >> 6))
+ 4 + (((imm) & 0x03) >> 0), \
+ 4 + (((imm) & 0x0c) >> 2), \
+ 4 + (((imm) & 0x30) >> 4), \
+ 4 + (((imm) & 0xc0) >> 6)))
static __inline__ __m128i __attribute__((__always_inline__, __nodebug__))
_mm_unpackhi_epi8(__m128i a, __m128i b)
More information about the cfe-commits
mailing list