[cfe-commits] r130149 - /cfe/trunk/lib/Headers/emmintrin.h
Chris Lattner
sabre at nondot.org
Mon Apr 25 13:42:40 PDT 2011
Author: lattner
Date: Mon Apr 25 15:42:40 2011
New Revision: 130149
URL: http://llvm.org/viewvc/llvm-project?rev=130149&view=rev
Log:
don't use compound literals in MM macros, since they will be instantiated
into user code which may warn about them with -pedantic. Patch by Jonathan Sauer!
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=130149&r1=130148&r2=130149&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Mon Apr 25 15:42:40 2011
@@ -1210,16 +1210,18 @@
}
#define _mm_shuffle_epi32(a, imm) \
- ((__m128i)__builtin_shufflevector((__v4si)(a), (__v4si) {0}, \
+ ((__m128i)__builtin_shufflevector((__v4si)(a), (__v4si) _mm_set1_epi32(0), \
(imm) & 0x3, ((imm) & 0xc) >> 2, \
((imm) & 0x30) >> 4, ((imm) & 0xc0) >> 6))
+
+
#define _mm_shufflelo_epi16(a, imm) \
- ((__m128i)__builtin_shufflevector((__v8hi)(a), (__v8hi) {0}, \
+ ((__m128i)__builtin_shufflevector((__v8hi)(a), (__v8hi) _mm_set1_epi16(0), \
(imm) & 0x3, ((imm) & 0xc) >> 2, \
((imm) & 0x30) >> 4, ((imm) & 0xc0) >> 6, \
4, 5, 6, 7))
#define _mm_shufflehi_epi16(a, imm) \
- ((__m128i)__builtin_shufflevector((__v8hi)(a), (__v8hi) {0}, 0, 1, 2, 3, \
+ ((__m128i)__builtin_shufflevector((__v8hi)(a), (__v8hi) _mm_set1_epi16(0), 0, 1, 2, 3, \
4 + (((imm) & 0x03) >> 0), \
4 + (((imm) & 0x0c) >> 2), \
4 + (((imm) & 0x30) >> 4), \
More information about the cfe-commits
mailing list