]>
gcc.gnu.org Git - gcc.git/blob - gcc/testsuite/gcc.target/i386/avx512f-broadcast-pr87767-6.c
3 /* { dg-options "-O2 -mavx512f" } */
4 /* { dg-require-effective-target avx512f} */
6 #include "avx512f-helper.h"
8 #include "avx512f-broadcast-pr87767-5.c"
10 #define RTEST(VTYPE, TYPE, N, OP_NAME, OP1, OP2) \
13 TYPE exp[N], src[N]; \
15 for (int i = 0; i < N; i++) \
17 src[i] = i * i * 107; \
19 res = foo_##OP_NAME##_##VTYPE (*(VTYPE*)&src[0]); \
20 for (int i = 0; i < N; i ++) \
21 exp[i] = (OP1 src[i]) OP2 CONSTANT; \
22 for (int j = 0; j < N; j++) \
24 if (res[j] != exp[j]) \
33 RTEST (v16si
, int, 16, andnot
, ~, &);
34 RTEST (v8di
, long long, 8, andnot
, ~, &);
35 RTEST (v16si
, int, 16, and,, &);
36 RTEST (v8di
, long long, 8, and,, &);
37 RTEST (v16si
, int, 16, or,, |);
38 RTEST (v8di
, long long, 8, or,, |);
39 RTEST (v16si
, int, 16, xor,, ^);
40 RTEST (v8di
, long long, 8, xor,, ^);
This page took 0.036944 seconds and 5 git commands to generate.