[PATCH] D107946: [X86] Reverse *_set_ph and *_setr_ph 's set order.
Freddy, Ye via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 12 01:27:18 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6c1468854d70: [X86] Reverse *_set_ph and *_setr_ph 's set order. (authored by FreddyYe).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107946/new/
https://reviews.llvm.org/D107946
Files:
clang/lib/Headers/avx512fp16intrin.h
clang/lib/Headers/avx512vlfp16intrin.h
Index: clang/lib/Headers/avx512vlfp16intrin.h
===================================================================
--- clang/lib/Headers/avx512vlfp16intrin.h
+++ clang/lib/Headers/avx512vlfp16intrin.h
@@ -48,7 +48,7 @@
static __inline __m128h __DEFAULT_FN_ATTRS128
_mm_set_ph(_Float16 __h1, _Float16 __h2, _Float16 __h3, _Float16 __h4,
_Float16 __h5, _Float16 __h6, _Float16 __h7, _Float16 __h8) {
- return (__m128h)(__v8hf){__h1, __h2, __h3, __h4, __h5, __h6, __h7, __h8};
+ return (__m128h)(__v8hf){__h8, __h7, __h6, __h5, __h4, __h3, __h2, __h1};
}
static __inline __m256h __DEFAULT_FN_ATTRS256
@@ -56,19 +56,18 @@
_Float16 __h5, _Float16 __h6, _Float16 __h7, _Float16 __h8,
_Float16 __h9, _Float16 __h10, _Float16 __h11, _Float16 __h12,
_Float16 __h13, _Float16 __h14, _Float16 __h15, _Float16 __h16) {
- return (__m256h)(__v16hf){__h1, __h2, __h3, __h4, __h5, __h6,
- __h7, __h8, __h9, __h10, __h11, __h12,
- __h13, __h14, __h15, __h16};
+ return (__m256h)(__v16hf){__h16, __h15, __h14, __h13, __h12, __h11,
+ __h10, __h9, __h8, __h7, __h6, __h5,
+ __h4, __h3, __h2, __h1};
}
-#define _mm_setr_ph(__h1, __h2, __h3, __h4, __h5, __h6, __h7, __h8) \
- _mm_set_ph((__h8), (__h7), (__h6), (__h5), (__h4), (__h3), (__h2), (__h1))
+#define _mm_setr_ph(h1, h2, h3, h4, h5, h6, h7, h8) \
+ _mm_set_ph((h8), (h7), (h6), (h5), (h4), (h3), (h2), (h1))
-#define _mm256_setr_ph(__h1, __h2, __h3, __h4, __h5, __h6, __h7, __h8, __h9, \
- __h10, __h11, __h12, __h13, __h14, __h15, __h16) \
- _mm256_set_ph((__h16), (__h15), (__h14), (__h13), (__h12), (__h11), (__h10), \
- (__h9), (__h8), (__h7), (__h6), (__h5), (__h4), (__h3), \
- (__h2), (__h1))
+#define _mm256_setr_ph(h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, \
+ h14, h15, h16) \
+ _mm256_set_ph((h16), (h15), (h14), (h13), (h12), (h11), (h10), (h9), (h8), \
+ (h7), (h6), (h5), (h4), (h3), (h2), (h1))
static __inline__ __m256h __DEFAULT_FN_ATTRS256 _mm256_abs_ph(__m256h __A) {
return (__m256h)_mm256_and_epi32(_mm256_set1_epi32(0x7FFF7FFF), (__m256i)__A);
Index: clang/lib/Headers/avx512fp16intrin.h
===================================================================
--- clang/lib/Headers/avx512fp16intrin.h
+++ clang/lib/Headers/avx512fp16intrin.h
@@ -82,22 +82,20 @@
_Float16 __h21, _Float16 __h22, _Float16 __h23, _Float16 __h24,
_Float16 __h25, _Float16 __h26, _Float16 __h27, _Float16 __h28,
_Float16 __h29, _Float16 __h30, _Float16 __h31, _Float16 __h32) {
- return (__m512h)(__v32hf){__h1, __h2, __h3, __h4, __h5, __h6, __h7,
- __h8, __h9, __h10, __h11, __h12, __h13, __h14,
- __h15, __h16, __h17, __h18, __h19, __h20, __h21,
- __h22, __h23, __h24, __h25, __h26, __h27, __h28,
- __h29, __h30, __h31, __h32};
-}
-
-#define _mm512_setr_ph(__h1, __h2, __h3, __h4, __h5, __h6, __h7, __h8, __h9, \
- __h10, __h11, __h12, __h13, __h14, __h15, __h16, __h17, \
- __h18, __h19, __h20, __h21, __h22, __h23, __h24, __h25, \
- __h26, __h27, __h28, __h29, __h30, __h31, __h32) \
- _mm512_set_ph((__h32), (__h31), (__h30), (__h29), (__h28), (__h27), (__h26), \
- (__h25), (__h24), (__h23), (__h22), (__h21), (__h20), (__h19), \
- (__h18), (__h17), (__h16), (__h15), (__h14), (__h13), (__h12), \
- (__h11), (__h10), (__h9), (__h8), (__h7), (__h6), (__h5), \
- (__h4), (__h3), (__h2), (__h1))
+ return (__m512h)(__v32hf){__h32, __h31, __h30, __h29, __h28, __h27, __h26,
+ __h25, __h24, __h23, __h22, __h21, __h20, __h19,
+ __h18, __h17, __h16, __h15, __h14, __h13, __h12,
+ __h11, __h10, __h9, __h8, __h7, __h6, __h5,
+ __h4, __h3, __h2, __h1};
+}
+
+#define _mm512_setr_ph(h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12, h13, \
+ h14, h15, h16, h17, h18, h19, h20, h21, h22, h23, h24, \
+ h25, h26, h27, h28, h29, h30, h31, h32) \
+ _mm512_set_ph((h32), (h31), (h30), (h29), (h28), (h27), (h26), (h25), (h24), \
+ (h23), (h22), (h21), (h20), (h19), (h18), (h17), (h16), (h15), \
+ (h14), (h13), (h12), (h11), (h10), (h9), (h8), (h7), (h6), \
+ (h5), (h4), (h3), (h2), (h1))
static __inline__ __m128 __DEFAULT_FN_ATTRS128 _mm_castph_ps(__m128h __a) {
return (__m128)__a;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107946.365931.patch
Type: text/x-patch
Size: 4953 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210812/775daa64/attachment-0001.bin>
More information about the cfe-commits
mailing list