aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-25 20:42:40 +0000
committerChris Lattner <sabre@nondot.org>2011-04-25 20:42:40 +0000
commit85e59d79e3033510d615625d1da421ac4fe7f38f (patch)
tree8b06c135060372097eabc6c1e9ac319a5c424826
parent223de2497fdaacf3a6b0a123c12265ca837abf19 (diff)
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! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130149 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Headers/emmintrin.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Headers/emmintrin.h b/lib/Headers/emmintrin.h
index 19d9f3f26b..0c1d730f01 100644
--- a/lib/Headers/emmintrin.h
+++ b/lib/Headers/emmintrin.h
@@ -1210,16 +1210,18 @@ _mm_movemask_epi8(__m128i a)
}
#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), \