summaryrefslogtreecommitdiffstats
path: root/clang
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
commitf03406f103392d444e11fe455ef895c24eba4025 (patch)
treeab98658e22f64bffd450e5c191f9a79328f7a11b /clang
parentcdb591af0338a197bdf6b9a77c89c630e556369a (diff)
downloadbcm5719-llvm-f03406f103392d444e11fe455ef895c24eba4025.tar.gz
bcm5719-llvm-f03406f103392d444e11fe455ef895c24eba4025.zip
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! llvm-svn: 130149
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Headers/emmintrin.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Headers/emmintrin.h b/clang/lib/Headers/emmintrin.h
index 19d9f3f26b4..0c1d730f015 100644
--- a/clang/lib/Headers/emmintrin.h
+++ b/clang/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), \
OpenPOWER on IntegriCloud