1 /* { dg-do run } */
2 /* { dg-options "-O2 -ftree-vectorize -mavx512bw" } */
3 /* { dg-require-effective-target avx512bw } */
4
5 #define AVX512BW
6 #include "avx512f-helper.h"
7
8 extern void abort (void);
9
10 void __attribute__((noinline,noclone))
test1(int * a,int * b,int * c)11 test1 (int *a, int *b, int *c)
12 {
13 int i;
14 for (i = 0; i < 16; i++)
15 {
16 if ((i == 0) || (i == 3))
17 a[i] = b[i];
18 else
19 a[i] = c[i];
20 }
21 }
22
23 void
TEST()24 TEST ()
25 {
26 int a[16], b[16], c[16], i;
27
28 for (i = 0; i < 16; i++)
29 {
30 a[i] = i;
31 b[i] = -i;
32 }
33
34 test1 (a, b, c);
35
36 for (i = 0; i < 16; i++)
37 {
38 if ((i == 0) || (i == 3))
39 {
40 if (a[i] != b[i])
41 abort ();
42 }
43 else
44 {
45 if (a[i] != c[i])
46 abort ();
47 }
48 }
49 }
50