diff --git a/gcc/testsuite/gcc.target/i386/avx10-helper.h b/gcc/testsuite/gcc.target/i386/avx10-helper.h
index 4d092e27447..ee5fd43de18 100644
--- a/gcc/testsuite/gcc.target/i386/avx10-helper.h
+++ b/gcc/testsuite/gcc.target/i386/avx10-helper.h
@@ -5,7 +5,6 @@
 #define AVX512FP16
 #define AVX512BF16
 #include "avx512f-helper.h"
-#include "avx512f-mask-type.h"
 #include <stdint.h>
 
 #define NOINLINE __attribute__((noinline,noclone))
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vaddnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vaddnepbf16-2.c
index 3b7d1635335..702adeb16ad 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vaddnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vaddnepbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -39,11 +40,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcmppbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcmppbf16-2.c
index a352890e9bc..e0d68a18224 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcmppbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcmppbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -18,7 +19,7 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, bf16_uw) src1, src2;
   MASK_TYPE mask = MASK_VALUE;
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       float x = 0.5;
       float y = 0.25;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtnebf162ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtnebf162ibs-2.c
index 489927ee065..db9b31e6bb6 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtnebf162ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtnebf162ibs-2.c
@@ -11,8 +11,8 @@
 #include <math.h>
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 16)
-#define DST_SIZE ((AVX512F_LEN) / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (__bf16 *s, short *r)
@@ -20,7 +20,7 @@ CALC (__bf16 *s, short *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > SCHAR_MAX)
 	tmp = SCHAR_MAX;
@@ -38,16 +38,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, bf16_bf) s;
   UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  short res_ref[DST_SIZE] = { 0 };
+  short res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
   res1.x = INTRINSIC (_ipcvtnebf16_epi16) (s.x);
@@ -59,11 +59,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtnebf162iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtnebf162iubs-2.c
index f901f41ea8b..b2a27a00a24 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtnebf162iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtnebf162iubs-2.c
@@ -11,8 +11,8 @@
 #include <math.h>
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 16)
-#define DST_SIZE ((AVX512F_LEN) / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (__bf16 *s, unsigned short *r)
@@ -20,7 +20,7 @@ CALC (__bf16 *s, unsigned short *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > UCHAR_MAX)
 	tmp = UCHAR_MAX;
@@ -38,16 +38,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, bf16_bf) s;
   UNION_TYPE (AVX512F_LEN, i_uw) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[DST_SIZE] = { 0 };
+  unsigned short res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
   res1.x = INTRINSIC (_ipcvtnebf16_epu16) (s.x);
@@ -59,11 +59,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_uw) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_uw) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_uw) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_uw) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_uw) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_uw) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_uw) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c
index 4ce8dd06bdc..ea96bc9af9f 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c
@@ -10,8 +10,8 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 16)
-#define DST_SIZE ((AVX512F_LEN) / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (_Float16 *s, short *r)
@@ -19,7 +19,7 @@ CALC (_Float16 *s, short *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > SCHAR_MAX)
 	tmp = SCHAR_MAX;
@@ -37,16 +37,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, h) s;
   UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  short res_ref[DST_SIZE] = { 0 };
+  short res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -64,11 +64,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c
index f78d6c7ee9e..4eea319a20e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c
@@ -10,8 +10,8 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 16)
-#define DST_SIZE ((AVX512F_LEN) / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (_Float16 *s, short *r)
@@ -19,7 +19,7 @@ CALC (_Float16 *s, short *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > UCHAR_MAX)
 	tmp = UCHAR_MAX;
@@ -37,16 +37,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, h) s;
   UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  short res_ref[DST_SIZE] = { 0 };
+  short res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -64,11 +64,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c
index 4852a8bd6dd..420e5de0c24 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c
@@ -11,8 +11,8 @@
 #include <limits.h>
 #include <math.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 32)
-#define DST_SIZE ((AVX512F_LEN) / 32)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (float *s, int *r)
@@ -20,7 +20,7 @@ CALC (float *s, int *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > SCHAR_MAX)
 	tmp = SCHAR_MAX;
@@ -38,16 +38,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, ) s;
   UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[DST_SIZE] = { 0 };
+  int res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -65,11 +65,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c
index 6e0ad7d150c..f5dffe267e7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c
@@ -11,15 +11,15 @@
 #include <limits.h>
 #include <math.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 32)
-#define DST_SIZE ((AVX512F_LEN) / 32)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (float *s, int *r)
 {
   int i;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > UCHAR_MAX)
 	r[i] = UCHAR_MAX;
@@ -36,16 +36,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, ) s;
   UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[DST_SIZE] = { 0 };
+  int res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -63,11 +63,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttnebf162ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttnebf162ibs-2.c
index 23de8234aa6..e810b56e177 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttnebf162ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttnebf162ibs-2.c
@@ -11,8 +11,8 @@
 #include <math.h>
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 16)
-#define DST_SIZE ((AVX512F_LEN) / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (__bf16 *s, short *r)
@@ -20,7 +20,7 @@ CALC (__bf16 *s, short *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > SCHAR_MAX)
 	tmp = SCHAR_MAX;
@@ -38,16 +38,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, bf16_bf) s;
   UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  short res_ref[DST_SIZE] = { 0 };
+  short res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
   res1.x = INTRINSIC (_ipcvttnebf16_epi16) (s.x);
@@ -59,11 +59,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttnebf162iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttnebf162iubs-2.c
index 858d8e73a00..032f83667d7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttnebf162iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttnebf162iubs-2.c
@@ -11,8 +11,8 @@
 #include <math.h>
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 16)
-#define DST_SIZE ((AVX512F_LEN) / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (__bf16 *s, short *r)
@@ -20,7 +20,7 @@ CALC (__bf16 *s, short *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > UCHAR_MAX)
 	tmp = UCHAR_MAX;
@@ -38,16 +38,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, bf16_bf) s;
   UNION_TYPE (AVX512F_LEN, i_uw) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[DST_SIZE] = { 0 };
+  unsigned short res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
   res1.x = INTRINSIC (_ipcvttnebf16_epu16) (s.x);
@@ -59,11 +59,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_uw) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_uw) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_uw) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_uw) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_uw) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_uw) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_uw) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
index dd7ea88cb82..a0ec1639c27 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
@@ -10,8 +10,9 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 64)
-#define DST_SIZE ((AVX512F_LEN_HALF) / 32)
+#define SRC_SIZE (AVX512F_LEN / 64)
+#define SIZE (AVX512F_LEN_HALF / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (double *s, int *r)
@@ -35,7 +36,7 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, d) s;
   UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[DST_SIZE] = { 0 };
+  int res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
   for (i = 0; i < SRC_SIZE; i++)
@@ -44,7 +45,7 @@ TEST (void)
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c
index a28643152ae..e83c1dbfe27 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c
@@ -10,15 +10,15 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 64)
-#define DST_SIZE ((AVX512F_LEN) / 64)
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (double *s, long long *r)
 {
   int i;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > LLONG_MAX)
 	r[i] = LLONG_MAX;
@@ -35,16 +35,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, d) s;
   UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  long long res_ref[DST_SIZE] = { 0 };
+  long long res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -62,11 +62,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_q) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_q) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_q) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_q) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c
index 768567747a4..7ade9093cc7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c
@@ -10,8 +10,9 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 64)
-#define DST_SIZE ((AVX512F_LEN_HALF) / 32)
+#define SRC_SIZE (AVX512F_LEN / 64)
+#define SIZE (AVX512F_LEN_HALF / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (double *s, unsigned int *r)
@@ -35,7 +36,7 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, d) s;
   UNION_TYPE (AVX512F_LEN_HALF, i_ud) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned int res_ref[DST_SIZE] = { 0 };
+  unsigned int res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
   for (i = 0; i < SRC_SIZE; i++)
@@ -44,7 +45,7 @@ TEST (void)
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c
index dbdd8114241..c137548b707 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c
@@ -10,15 +10,15 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 64)
-#define DST_SIZE ((AVX512F_LEN) / 64)
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (double *s, unsigned long long *r)
 {
   int i;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > ULONG_MAX)
 	r[i] = ULONG_MAX;
@@ -35,16 +35,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, d) s;
   UNION_TYPE (AVX512F_LEN, i_uq) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned long long res_ref[DST_SIZE] = { 0 };
+  unsigned long long res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -62,11 +62,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_uq) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_uq) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_uq) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_uq) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_uq) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_uq) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_uq) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c
index e2624fb64b2..b154c54fe49 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c
@@ -10,8 +10,8 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 16)
-#define DST_SIZE ((AVX512F_LEN) / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (_Float16 *s, short *r)
@@ -19,7 +19,7 @@ CALC (_Float16 *s, short *r)
   int i;
   char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > SCHAR_MAX)
 	tmp = SCHAR_MAX;
@@ -37,16 +37,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, h) s;
   UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  short res_ref[DST_SIZE] = { 0 };
+  short res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -64,11 +64,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c
index d98a462c4b3..4e36ad75ce7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c
@@ -10,8 +10,8 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 16)
-#define DST_SIZE ((AVX512F_LEN) / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (_Float16 *s, short *r)
@@ -19,7 +19,7 @@ CALC (_Float16 *s, short *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > UCHAR_MAX)
 	tmp = UCHAR_MAX;
@@ -37,16 +37,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, h) s;
   UNION_TYPE (AVX512F_LEN, i_w) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  short res_ref[DST_SIZE] = { 0 };
+  short res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -64,11 +64,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_w) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_w) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c
index 7a9b6e31e40..086d841b6ed 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c
@@ -10,15 +10,15 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 32)
-#define DST_SIZE ((AVX512F_LEN) / 32)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (float *s, int *r)
 {
   int i;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > INT_MAX)
 	r[i] = INT_MAX;
@@ -35,16 +35,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, ) s;
   UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[DST_SIZE] = { 0 };
+  int res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -62,11 +62,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c
index 47136108a6b..d5cff6fbaf4 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c
@@ -11,8 +11,8 @@
 #include <limits.h>
 #include <math.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 32)
-#define DST_SIZE ((AVX512F_LEN) / 32)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (float *s, int *r)
@@ -20,7 +20,7 @@ CALC (float *s, int *r)
   int i;
   unsigned char tmp;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > SCHAR_MAX)
 	tmp = SCHAR_MAX;
@@ -38,16 +38,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, ) s;
   UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[DST_SIZE] = { 0 };
+  int res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -65,11 +65,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c
index f753dd5a707..a13c7a362fe 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c
@@ -11,15 +11,15 @@
 #include <limits.h>
 #include <math.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 32)
-#define DST_SIZE ((AVX512F_LEN) / 32)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (float *s, int *r)
 {
   int i;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > UCHAR_MAX)
 	r[i] = UCHAR_MAX;
@@ -36,16 +36,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, ) s;
   UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[DST_SIZE] = { 0 };
+  int res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -63,11 +63,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_d) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c
index ed19c5e329d..d298595d200 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c
@@ -10,15 +10,16 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN_HALF) / 32)
-#define DST_SIZE ((AVX512F_LEN) / 64)
+#define SRC_SIZE (AVX512F_LEN_HALF / 32)
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (float *s, long long *r)
 {
   int i;
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > LLONG_MAX)
 	r[i] = LLONG_MAX;
@@ -35,7 +36,7 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN_HALF, ) s;
   UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  long long res_ref[DST_SIZE] = { 0 };
+  long long res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
   for (i = 0; i < SRC_SIZE; i++)
@@ -44,7 +45,7 @@ TEST (void)
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -63,11 +64,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_q) (res_ref, mask, DST_SIZE);
+  MASK_MERGE (i_q) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_q) (res_ref, mask, DST_SIZE);
+  MASK_ZERO (i_q) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c
index b279af29326..af26bacd9f9 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c
@@ -10,15 +10,15 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN) / 32)
-#define DST_SIZE ((AVX512F_LEN) / 32)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (float *s, unsigned int *r)
 {
   int i;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       if (s[i] > UINT_MAX)
 	r[i] = UINT_MAX;
@@ -35,16 +35,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, ) s;
   UNION_TYPE (AVX512F_LEN, i_ud) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned int res_ref[DST_SIZE] = { 0 };
+  unsigned int res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
-  for (i = 0; i < SRC_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     {
       s.a[i] = 1.23 * (i + 2) * sign;
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
@@ -62,11 +62,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_ud) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_ud) (res_ref, mask, SRC_SIZE);
+  MASK_MERGE (i_ud) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_ud) (res2, res_ref))
     abort ();
 
-  MASK_ZERO (i_ud) (res_ref, mask, SRC_SIZE);
+  MASK_ZERO (i_ud) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_ud) (res3, res_ref))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c
index 7151d079b79..f94bcf753ef 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c
@@ -10,8 +10,9 @@
 #include "avx10-helper.h"
 #include <limits.h>
 
-#define SRC_SIZE ((AVX512F_LEN_HALF) / 32)
-#define DST_SIZE ((AVX512F_LEN) / 64)
+#define SRC_SIZE (AVX512F_LEN_HALF / 32)
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (float *s, unsigned long long *r)
@@ -35,7 +36,7 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN_HALF, ) s;
   UNION_TYPE (AVX512F_LEN, i_uq) res1, res2, res3;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned long long res_ref[DST_SIZE] = { 0 };
+  unsigned long long res_ref[SIZE] = { 0 };
   int i, sign = 1;
 
   for (i = 0; i < SRC_SIZE; i++)
@@ -44,7 +45,7 @@ TEST (void)
       sign = -sign;
     }
 
-  for (i = 0; i < DST_SIZE; i++)
+  for (i = 0; i < SIZE; i++)
     res2.a[i] = DEFAULT_VALUE;
 
 #if AVX512F_LEN == 128
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vdivnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vdivnepbf16-2.c
index ca9082885e7..a0cf48a9cb6 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vdivnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vdivnepbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -39,11 +40,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c
index 9b73a298fb9..7a298a7e470 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c
@@ -10,8 +10,9 @@
 
 #include "avx10-helper.h"
 
-#define SRC_SIZE AVX512F_LEN / 16
-#define SIZE AVX512F_LEN / 32
+#define SRC_SIZE (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void  
 CALC (float *dest, _Float16 *src1, _Float16 *src2)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXnepbf16-2.c
index b19c9d437fb..d7a98118197 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXnepbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       float x = 0.5;
       float y = 2;
@@ -37,16 +38,16 @@ TEST (void)
       res_ref2[i] = convert_fp32_to_bf16 (m2);
     }
 
-  MASK_MERGE (bf16_uw) (res1.a, mask, SIZE_RES);
-  MASK_MERGE (bf16_uw) (res2.a, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res1.a, mask, SIZE);
+  MASK_MERGE (bf16_uw) (res2.a, mask, SIZE);
   res1.x = INTRINSIC (_mask_fmaddne_pbh) (res1.x, mask, src1.x, src2.x);
   res2.x = INTRINSIC (_mask3_fmaddne_pbh) (src1.x, src2.x, res2.x, mask);
   
-  MASK_MERGE (bf16_uw) (res_ref, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXnepbf16-2.c
index 86adbc5fba4..23ef38fa584 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXnepbf16-2.c
@@ -9,7 +9,8 @@
 #endif
 #include "avx10-helper.h"
 
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -17,9 +18,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       float x = 0.5;
       float y = 2;
@@ -38,16 +39,16 @@ TEST (void)
       res_ref2[i] = convert_fp32_to_bf16 (m2);
     }
 
-  MASK_MERGE (bf16_uw) (res1.a, mask, SIZE_RES);
-  MASK_MERGE (bf16_uw) (res2.a, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res1.a, mask, SIZE);
+  MASK_MERGE (bf16_uw) (res2.a, mask, SIZE);
   res1.x = INTRINSIC (_mask_fmsubne_pbh) (res1.x, mask, src1.x, src2.x);
   res2.x = INTRINSIC (_mask3_fmsubne_pbh) (src1.x, src2.x, res2.x, mask);
   
-  MASK_MERGE (bf16_uw) (res_ref, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXnepbf16-2.c
index 3a7d4cfca48..0bac657d190 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXnepbf16-2.c
@@ -9,7 +9,8 @@
 #endif
 #include "avx10-helper.h"
 
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -17,9 +18,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       float x = 0.5;
       float y = 2;
@@ -38,16 +39,16 @@ TEST (void)
       res_ref2[i] = convert_fp32_to_bf16 (m2);
     }
 
-  MASK_MERGE (bf16_uw) (res1.a, mask, SIZE_RES);
-  MASK_MERGE (bf16_uw) (res2.a, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res1.a, mask, SIZE);
+  MASK_MERGE (bf16_uw) (res2.a, mask, SIZE);
   res1.x = INTRINSIC (_mask_fnmaddne_pbh) (res1.x, mask, src1.x, src2.x);
   res2.x = INTRINSIC (_mask3_fnmaddne_pbh) (src1.x, src2.x, res2.x, mask);
   
-  MASK_MERGE (bf16_uw) (res_ref, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXnepbf16-2.c
index 943146e14f2..6c5ba4b096a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXnepbf16-2.c
@@ -9,7 +9,8 @@
 #endif
 #include "avx10-helper.h"
 
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -17,9 +18,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       float x = 0.5;
       float y = 2;
@@ -38,16 +39,16 @@ TEST (void)
       res_ref2[i] = convert_fp32_to_bf16 (m2);
     }
 
-  MASK_MERGE (bf16_uw) (res1.a, mask, SIZE_RES);
-  MASK_MERGE (bf16_uw) (res2.a, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res1.a, mask, SIZE);
+  MASK_MERGE (bf16_uw) (res2.a, mask, SIZE);
   res1.x = INTRINSIC (_mask_fnmsubne_pbh) (res1.x, mask, src1.x, src2.x);
   res2.x = INTRINSIC (_mask3_fnmsubne_pbh) (src1.x, src2.x, res2.x, mask);
   
-  MASK_MERGE (bf16_uw) (res_ref, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclasspbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclasspbf16-2.c
index 1b25a070eff..c408c9cabbb 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclasspbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclasspbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -20,13 +21,13 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, ) src2;
   MASK_TYPE mask = MASK_VALUE;
 
-  for (i = 0; i < SIZE_RES / 2; i++)
+  for (i = 0; i < SIZE / 2; i++)
     {
       src1.a[i] = 0;
       src2.a[i] = (uint32_t) (src1.a[i]) << 16;
     }
 
-  for (i = SIZE_RES / 2; i < SIZE_RES; i++)
+  for (i = SIZE / 2; i < SIZE; i++)
     src1.a[i] = 0;
   
   src1.a[0] = 0x7FC0;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexppbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexppbf16-2.c
index def6d93ccad..4c10f1afefa 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexppbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexppbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
  
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -37,11 +38,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantpbf16-2.c
index 898cf5ccf38..07eb978fc06 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantpbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 5.0;
       res2.a[i] = DEFAULT_VALUE;
@@ -40,11 +41,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();  
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxpbf16-2.c
index a563b1e933e..126d9c00252 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxpbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -41,11 +42,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxnepbf16-2.c
index 491a63d1726..854950e5360 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxnepbf16-2.c
@@ -6,10 +6,11 @@
 #define AVX10_2
 #define AVX10_512BIT
 #endif
-#define SIZE (AVX512F_LEN / 16)
 #include "avx10-helper.h"
+#define SIZE (AVX512F_LEN / 16)
 #include <stdbool.h>
 #include "avx10-minmax-helper.h"
+#include "avx512f-mask-type.h"
 
 void static
 CALC (__bf16 *r, __bf16 *s1, __bf16 *s2, int R)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c
index fe9bb65e6b1..934a4237228 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c
@@ -6,10 +6,11 @@
 #define AVX10_2
 #define AVX10_512BIT
 #endif
-#define SIZE (AVX512F_LEN / 64)
 #include "avx10-helper.h"
+#define SIZE (AVX512F_LEN / 64)
 #include <stdbool.h>
 #include "avx10-minmax-helper.h"
+#include "avx512f-mask-type.h"
 
 void static
 CALC (double *r, double *s1, double *s2, int R)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c
index 503bb9f18b4..4c1b94dae96 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c
@@ -6,10 +6,11 @@
 #define AVX10_2
 #define AVX10_512BIT
 #endif
-#define SIZE (AVX512F_LEN / 16)
 #include "avx10-helper.h"
+#define SIZE (AVX512F_LEN / 16)
 #include <stdbool.h>
 #include "avx10-minmax-helper.h"
+#include "avx512f-mask-type.h"
 
 void static
 CALC (_Float16 *r, _Float16 *s1, _Float16 *s2, int R)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c
index f3ef43ed629..20ccac18473 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c
@@ -6,10 +6,11 @@
 #define AVX10_2
 #define AVX10_512BIT
 #endif
-#define SIZE (AVX512F_LEN / 32)
 #include "avx10-helper.h"
+#define SIZE (AVX512F_LEN / 32)
 #include <stdbool.h>
 #include "avx10-minmax-helper.h"
+#include "avx512f-mask-type.h"
 
 void static
 CALC (float *r, float *s1, float *s2, int R)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminpbf16-2.c
index 10f13d45403..19f1bae3b03 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminpbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -41,11 +42,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c
index 3cedab490fa..e86b7900d64 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c
@@ -9,9 +9,9 @@
 #endif
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 8)
-#define SIZE_RES (AVX512F_LEN / 16)
-
+#define SRC_SIZE (AVX512F_LEN / 8)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (short* dst, char* src1, char* src2, int cont)
@@ -58,15 +58,15 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_b) src1;
   UNION_TYPE (AVX512F_LEN, i_b) src2;
   MASK_TYPE mask = MASK_VALUE;
-  short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       src1.a[i] = 10 + 2 * i;
       src2.a[i] = 3 * i;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -83,11 +83,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_w) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_w) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_w) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_w) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_w) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmulnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmulnepbf16-2.c
index ce168070a93..747e1e92500 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmulnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmulnepbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -39,11 +40,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c
index 969a5ff844e..add9de89351 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c
@@ -10,16 +10,16 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 8)
-#define SIZE_RES (AVX512F_LEN / 32)
+#define SRC_SIZE (AVX512F_LEN / 8)
+#define SIZE (AVX512F_LEN / 32)
 
 static void
 CALC (int *r, int *dst, char *s1, char *s2)
 {
-  short tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  short tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (short) s1[i] * (short) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 4] + tempres[i * 4 + 1]
 				      + tempres[i * 4 + 2] + tempres[i * 4 + 3];
@@ -35,16 +35,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_b) src1;
   UNION_TYPE (AVX512F_LEN, i_b) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       int sign = i % 2 ? 1 : -1;
       src1.a[i] = sign * (10 + 3 * i * i);
       src2.a[i] = sign * 10 * i * i;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -61,11 +61,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c
index 1f147009186..b8bc0ecd17a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c
@@ -10,16 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 8)
-#define SIZE_RES (AVX512F_LEN / 32)
+#define SRC_SIZE (AVX512F_LEN / 8)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, char *s1, char *s2)
 {
-  short tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  short tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] =  (short) s1[i] * (short) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 4] + tempres[i * 4 + 1]
 				      + tempres[i * 4 + 2] + tempres[i * 4 + 3];
@@ -38,16 +39,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_b) src1;
   UNION_TYPE (AVX512F_LEN, i_b) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       int sign = i % 2 ? 1 : -1;
       src1.a[i] = sign * (10 + 3 * i * i);
       src2.a[i] = sign * 10 * i * i;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -64,11 +65,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c
index 81653b223c7..5bb8efcbf6e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c
@@ -10,16 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 8)
-#define SIZE_RES (AVX512F_LEN / 32)
+#define SRC_SIZE (AVX512F_LEN / 8)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, char *s1, unsigned char *s2)
 {
-  short tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  short tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (short) s1[i] * (unsigned short) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 4] + tempres[i * 4 + 1]
 				      + tempres[i * 4 + 2] + tempres[i * 4 + 3];
@@ -35,16 +36,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_b) src1;
   UNION_TYPE (AVX512F_LEN, i_ub) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       int sign = i % 2 ? 1 : -1;
       src1.a[i] = sign*10*i*i;
       src2.a[i] = 10 +  3*i*i + sign;
    }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -61,11 +62,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c
index 70a00aa76f2..6bbd578d55f 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c
@@ -10,16 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 8)
-#define SIZE_RES (AVX512F_LEN / 32)
+#define SRC_SIZE (AVX512F_LEN / 8)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, char *s1, unsigned char *s2)
 {
-  short tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  short tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (short) s1[i] * (unsigned short) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 4] + tempres[i * 4 + 1]
 				      + tempres[i * 4 + 2] + tempres[i * 4 + 3];
@@ -38,16 +39,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_b) src1;
   UNION_TYPE (AVX512F_LEN, i_ub) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       int sign = i % 2 ? 1 : -1;
       src1.a[i] = sign * 10 * i * i;
       src2.a[i] = 10 + 3 * i * i + sign;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -64,11 +65,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c
index 84ef32f1b01..978dae81359 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c
@@ -10,16 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 8)
-#define SIZE_RES (AVX512F_LEN / 32)
+#define SRC_SIZE (AVX512F_LEN / 8)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, unsigned char *s1, unsigned char *s2)
 {
-  unsigned short tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  unsigned short tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (unsigned short) s1[i] * (unsigned short) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 4] + tempres[i * 4 + 1]
 				      + tempres[i * 4 + 2] + tempres[i * 4 + 3];
@@ -35,15 +36,15 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_ub) src1;
   UNION_TYPE (AVX512F_LEN, i_ub) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       src1.a[i] = 10 + 3 * i * i;
       src2.a[i] = 10 * i * i;
    }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -60,11 +61,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c
index 98fe36d6b66..23316945959 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c
@@ -10,16 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 8)
-#define SIZE_RES (AVX512F_LEN / 32)
+#define SRC_SIZE (AVX512F_LEN / 8)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, unsigned char *s1, unsigned char *s2)
 {
-  unsigned short tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  unsigned short tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (unsigned short) s1[i] * (unsigned short) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 4] + tempres[i * 4 + 1]
 				      + tempres[i * 4 + 2] + tempres[i * 4 + 3];
@@ -38,15 +39,15 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_ub) src1;
   UNION_TYPE (AVX512F_LEN, i_ub) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       src1.a[i] = 10 + 3 * i * i;
       src2.a[i] = 10 * i * i;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -63,11 +64,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c
index 1643f6f0803..9fc2ea57422 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c
@@ -10,17 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 16)
-#define SIZE_RES (AVX512F_LEN / 32)
-
+#define SRC_SIZE (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, short *s1, unsigned short *s2)
 {
-  int tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  int tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (int) s1[i] * (unsigned int) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 2] + tempres[i * 2 + 1];
       r[i] = test;
@@ -35,16 +35,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_w) src1;
   UNION_TYPE (AVX512F_LEN, i_uw) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       int sign = i % 2 ? 1 : -1;
       src1.a[i] = sign * (10 + 3 * i * i);
       src2.a[i] = sign * 10 * i * i;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -61,11 +61,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c
index 7c959119a2a..4c9e9ceb0ce 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c
@@ -10,17 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 16)
-#define SIZE_RES (AVX512F_LEN / 32)
-
+#define SRC_SIZE (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, short *s1, unsigned short *s2)
 {
-  int tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  int tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (int) s1[i] * (unsigned int) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 2] + tempres[i * 2 + 1];
       long long max_int = 0x7FFFFFFF;
@@ -38,16 +38,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_w) src1;
   UNION_TYPE (AVX512F_LEN, i_uw) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       int sign = i % 2 ? 1 : -1;
       src1.a[i] = sign * (10 + 3 * i * i);
       src2.a[i] = sign * 10 * i * i;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -64,11 +64,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c
index b780e41bfba..9b931cf3b22 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c
@@ -10,17 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 16)
-#define SIZE_RES (AVX512F_LEN / 32)
-
+#define SRC_SIZE (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, unsigned short *s1, short *s2)
 {
-  int tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  int tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (unsigned int) s1[i] * (int) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 2] + tempres[i * 2 + 1];
       r[i] = test;
@@ -35,16 +35,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_uw) src1;
   UNION_TYPE (AVX512F_LEN, i_w) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       int sign = i % 2 ? 1 : -1;
       src1.a[i] = sign * 10 * i * i;
       src2.a[i] = 10 + 3 * i * i + sign;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -61,11 +61,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c
index 922d4b37ab8..0780452eb01 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c
@@ -10,17 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 16)
-#define SIZE_RES (AVX512F_LEN / 32)
-
+#define SRC_SIZE (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, unsigned short *s1, short *s2)
 {
-  int tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  int tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (unsigned int) s1[i] * (int) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 2] + tempres[i * 2 + 1];
       long long max_int = 0x7FFFFFFF;
@@ -38,16 +38,16 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_uw) src1;
   UNION_TYPE (AVX512F_LEN, i_w) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       int sign = i % 2 ? 1 : -1;
       src1.a[i] = sign * 10 * i * i;
       src2.a[i] = 10 + 3 * i * i + sign;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -64,11 +64,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c
index d9f5dba8dff..720eee023e5 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c
@@ -10,17 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 16)
-#define SIZE_RES (AVX512F_LEN / 32)
-
+#define SRC_SIZE (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, unsigned short *s1, unsigned short *s2)
 {
-  unsigned int tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  unsigned int tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (unsigned int) s1[i] * (unsigned int) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 2] + tempres[i * 2 + 1];
       r[i] = test;
@@ -35,15 +35,15 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_uw) src1;
   UNION_TYPE (AVX512F_LEN, i_uw) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       src1.a[i] = 10 + 3 * i * i;
       src2.a[i] = 10 * i * i;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -60,11 +60,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c
index da3c82bd4cc..268eb914aa4 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c
@@ -10,17 +10,17 @@
 
 #include "avx10-helper.h"
 
-#define SIZE (AVX512F_LEN / 16)
-#define SIZE_RES (AVX512F_LEN / 32)
-
+#define SRC_SIZE (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
 
 static void
 CALC (int *r, int *dst, unsigned short *s1, unsigned short *s2)
 {
-  unsigned int tempres[SIZE];
-  for (int i = 0; i < SIZE; i++)
+  unsigned int tempres[SRC_SIZE];
+  for (int i = 0; i < SRC_SIZE; i++)
     tempres[i] = (unsigned int) s1[i] * (unsigned int) s2[i];
-  for (int i = 0; i < SIZE_RES; i++)
+  for (int i = 0; i < SIZE; i++)
     {
       long long test = (long long) dst[i] + tempres[i * 2] + tempres[i * 2 + 1];
       long long max_uint = 0xFFFFFFFF;
@@ -38,15 +38,15 @@ TEST (void)
   UNION_TYPE (AVX512F_LEN, i_uw) src1;
   UNION_TYPE (AVX512F_LEN, i_uw) src2;
   MASK_TYPE mask = MASK_VALUE;
-  int res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  int res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE; i++)
+  for (i = 0; i < SRC_SIZE; i++)
     {
       src1.a[i] = 10 + 3 * i * i;
       src2.a[i] = 10 * i * i;
     }
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0x7FFFFFFF;
       res2.a[i] = DEFAULT_VALUE;
@@ -63,11 +63,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
     abort ();
 
-  MASK_MERGE (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (i_d) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (i_d) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrcppbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrcppbf16-2.c
index 0bca27d504f..6016491bd55 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrcppbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrcppbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -35,11 +36,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vreducenepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vreducenepbf16-2.c
index c3e2b36864e..5af09e900d7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vreducenepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vreducenepbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,14 +17,14 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 5.0;
       res2.a[i] = DEFAULT_VALUE;
       res3.a[i] = DEFAULT_VALUE;
-      float s = (float) (SIZE_RES - 1) / (float) i;
+      float s = (float) (SIZE - 1) / (float) i;
       src1.a[i] = convert_fp32_to_bf16 (s);
       float x = convert_bf16_to_fp32 (src1.a[i]);
       __m128 px = _mm_load_ss (&x);
@@ -40,11 +41,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();  
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalenepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalenepbf16-2.c
index 5b0e6a89120..35b8233a2af 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalenepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalenepbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,14 +17,14 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 5.0;
       res2.a[i] = DEFAULT_VALUE;
       res3.a[i] = DEFAULT_VALUE;
-      float s = (float) (SIZE_RES - 1) / (float) i;
+      float s = (float) (SIZE - 1) / (float) i;
       src1.a[i] = convert_fp32_to_bf16 (s);
       float x = convert_bf16_to_fp32 (src1.a[i]);
       res_ref[i] = res_ref2[i] =  convert_fp32_to_bf16_ne (rndscale (x));
@@ -36,11 +37,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtpbf16-2.c
index a879efce3f8..a3c6c5add65 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtpbf16-2.c
@@ -9,7 +9,8 @@
 #endif
 #include "avx10-helper.h"
 #include <math.h>
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -17,9 +18,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -37,11 +38,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefpbf16-2.c
index 78df474240d..d12be1b92b8 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefpbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,15 +17,15 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
       res3.a[i] = DEFAULT_VALUE;
       float x = (float) (2 * (i % 7) + 7);
-      float y = 1.0 + (float) (4 * i) / (float) SIZE_RES;
+      float y = 1.0 + (float) (4 * i) / (float) SIZE;
       float xx, yy, res;
       src2.a[i] = convert_fp32_to_bf16 (y);
       src1.a[i] = convert_fp32_to_bf16 (x);
@@ -41,11 +42,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtnepbf16-2.c
index 987c9b1abe9..faf06e691c7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtnepbf16-2.c
@@ -9,7 +9,8 @@
 #endif
 #include "avx10-helper.h"
 #include <math.h>
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -17,9 +18,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
 
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -37,11 +38,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vsubnepbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vsubnepbf16-2.c
index f8a9a51cd37..cdd22d2aca0 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vsubnepbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vsubnepbf16-2.c
@@ -8,7 +8,8 @@
 #define AVX10_512BIT
 #endif
 #include "avx10-helper.h"
-#define SIZE_RES (AVX512F_LEN / 16)
+#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 void
 TEST (void)
@@ -16,9 +17,9 @@ TEST (void)
   int i;
   UNION_TYPE (AVX512F_LEN, bf16_uw) res1, res2, res3, src1, src2;
   MASK_TYPE mask = MASK_VALUE;
-  unsigned short res_ref[SIZE_RES], res_ref2[SIZE_RES];
+  unsigned short res_ref[SIZE], res_ref2[SIZE];
   
-  for (i = 0; i < SIZE_RES; i++)
+  for (i = 0; i < SIZE; i++)
     {
       res1.a[i] = 0;
       res2.a[i] = DEFAULT_VALUE;
@@ -39,11 +40,11 @@ TEST (void)
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res1, res_ref))
     abort ();
   
-  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_MERGE (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res2, res_ref2))
     abort ();
 
-  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE_RES);
+  MASK_ZERO (bf16_uw) (res_ref2, mask, SIZE);
   if (UNION_CHECK (AVX512F_LEN, bf16_uw) (res3, res_ref2))
     abort ();
 }
diff --git a/gcc/testsuite/gcc.target/i386/avx512fp16-vfpclassph-1b.c b/gcc/testsuite/gcc.target/i386/avx512fp16-vfpclassph-1b.c
index 9ffb5606b81..844bc5c006e 100644
--- a/gcc/testsuite/gcc.target/i386/avx512fp16-vfpclassph-1b.c
+++ b/gcc/testsuite/gcc.target/i386/avx512fp16-vfpclassph-1b.c
@@ -8,8 +8,8 @@
 #include <math.h>
 #include <limits.h>
 #include <float.h>
-#include "avx512f-mask-type.h"
 #define SIZE (AVX512F_LEN / 16)
+#include "avx512f-mask-type.h"
 
 #ifndef __FPCLASSPH__
 #define __FPCLASSPH__
