[PATCH] [X86] replace vinsertf128 intrinsics with generic shuffles

Simon Pilgrim llvm-dev at redking.me.uk
Fri Mar 6 00:27:10 PST 2015


Thanks for working on this Sanjay!


================
Comment at: lib/Headers/avxintrin.h:1160
@@ +1159,3 @@
+  __m256 __V1 = (V1); \
+  __m256 __V2 = _mm256_castps128_ps256((__m128)(V2)); \
+  (__m256)__builtin_shufflevector((__v8sf)__V1, (__v8sf)__V2, \
----------------
The use of macros leaves these open to Wshadow warnings - what is the effect of casting them directly in the __builtin_shufflevector args?

================
Comment at: lib/Headers/avxintrin.h:1173
@@ +1172,3 @@
+  __m256d __V1 = (V1); \
+  __m256d __V2 = _mm256_castpd128_pd256((__m128d)(V2)); \
+  (__m256d)__builtin_shufflevector((__v4df)__V1, (__v4df)__V2, \
----------------
Ditto Wshadow

================
Comment at: lib/Headers/avxintrin.h:1182
@@ +1181,3 @@
+  __m256i __V1 = (V1); \
+  __m256i __V2 = _mm256_castsi128_si256((__m128i)(V2)); \
+  (__m256i)__builtin_shufflevector((__v4di)__V1, (__v4di)__V2, \
----------------
Ditto Wshadow

================
Comment at: lib/Headers/avxintrin.h:1188
@@ -1169,1 +1187,3 @@
+    ((M) ? 5 : 3) );})
+
 /* SIMD load ops (unaligned) */
----------------
Similar to D8086 - shouldn't the immediate value be masked to just use the lsb? ((M)&1)

http://reviews.llvm.org/D8088

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list