Debian Codegraph @

gcc/testsuite/g++.target/i386/avx512bw-pr96246-1.C

raw
1 /* PR target/96246 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -std=c++14 -mavx512bw" } */
4 /* { dg-require-effective-target c99_runtime } */
5 /* { dg-final { scan-assembler-times "vpblendm\[bwdq\]\[\t \]" 4 } } */
6 /* { dg-final { scan-assembler-times "vblendmp\[sd\]\[\t \]" 2 } } */
7
8 typedef char v64qi __attribute__((vector_size (64)));
9 typedef short v32hi __attribute__((vector_size (64)));
10 typedef int v16si __attribute__((vector_size (64)));
11 typedef long long v8di __attribute__((vector_size (64)));
12 typedef float v16sf __attribute__((vector_size (64)));
13 typedef double v8df __attribute__((vector_size (64)));
14
15 #define COMPILE_TEST(vtype, num) \
16 vtype \
17 __attribute__ ((noipa)) \
18 foo_##vtype (vtype a, vtype b, vtype c, vtype d) \
19 { \
20 return a > b ? c : d; \
21 }
22
23 COMPILE_TEST (v64qi, 64);
24 COMPILE_TEST (v32hi, 32);
25 COMPILE_TEST (v16si, 16);
26 COMPILE_TEST (v8di, 8);
27 COMPILE_TEST (v16sf, 16);
28 COMPILE_TEST (v8df, 8);