aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorkonglin1 <lingling.kong@intel.com>2021-08-09 10:58:24 +0800
committerliuhongt <hongtao.liu@intel.com>2021-08-25 14:35:34 +0800
commitdb3d4129b6f4cff685713da514b64ff7bbc401fc (patch)
tree1562cfac060ea28cb73ffe38ff053553b818a004 /gcc
parenta20be0cdc068d9ffab7bf0c9d2a8702162746bd8 (diff)
downloadgcc-db3d4129b6f4cff685713da514b64ff7bbc401fc.zip
gcc-db3d4129b6f4cff685713da514b64ff7bbc401fc.tar.gz
gcc-db3d4129b6f4cff685713da514b64ff7bbc401fc.tar.bz2
i386: Fix _mm512_fpclass_ps_mask in O0 [PR 101471]
gcc/ChangeLog: PR target/101471 * config/i386/avx512dqintrin.h (_mm512_fpclass_ps_mask): Fix macro define in O0. (_mm512_mask_fpclass_ps_mask): Ditto. gcc/testsuite/ChangeLog: PR target/101471 * gcc.target/i386/avx512f-pr101471.c: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/avx512dqintrin.h4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr101471.c18
2 files changed, 20 insertions, 2 deletions
diff --git a/gcc/config/i386/avx512dqintrin.h b/gcc/config/i386/avx512dqintrin.h
index 51c0b12..9794f5d 100644
--- a/gcc/config/i386/avx512dqintrin.h
+++ b/gcc/config/i386/avx512dqintrin.h
@@ -2814,7 +2814,7 @@ _mm512_fpclass_ps_mask (__m512 __A, const int __imm)
#define _mm512_mask_fpclass_ps_mask(u, x, c) \
((__mmask16) __builtin_ia32_fpclassps512_mask ((__v16sf) (__m512) (x),\
- (int) (c),(__mmask8)(u)))
+ (int) (c),(__mmask16)(u)))
#define _mm512_fpclass_pd_mask(X, C) \
((__mmask8) __builtin_ia32_fpclasspd512_mask ((__v8df) (__m512d) (X), \
@@ -2822,7 +2822,7 @@ _mm512_fpclass_ps_mask (__m512 __A, const int __imm)
#define _mm512_fpclass_ps_mask(x, c) \
((__mmask16) __builtin_ia32_fpclassps512_mask ((__v16sf) (__m512) (x),\
- (int) (c),(__mmask8)-1))
+ (int) (c),(__mmask16)-1))
#define _mm_reduce_sd(A, B, C) \
((__m128d) __builtin_ia32_reducesd_mask ((__v2df)(__m128d)(A), \
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr101471.c b/gcc/testsuite/gcc.target/i386/avx512f-pr101471.c
new file mode 100644
index 0000000..4a0057b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr101471.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512dq -O0" } */
+/* { dg-require-effective-target avx512dq } */
+
+#include "avx512f-check.h"
+
+static void
+avx512f_test (void)
+{
+ __m512 x = {
+ 1, 1, 1, 1,
+ 1, 1, 1, 1,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0, };
+ int ret = _mm512_fpclass_ps_mask(x, 0x26);
+ if (ret != 65280)
+ __builtin_abort();
+}