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