Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr94962-4.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx" } */
3 /* { dg-final { scan-assembler-not "vmovdqa" } } */
4 /* { dg-final { scan-assembler-times "vpcmpeqd\[ \\t\]+%xmm\[0-9\]" 4 } } */
5
6 typedef long long __v4di __attribute__ ((__vector_size__ (32)));
7 typedef int __v8si __attribute__ ((__vector_size__ (32)));
8 typedef short __v16hi __attribute__ ((__vector_size__ (32)));
9 typedef char __v32qi __attribute__ ((__vector_size__ (32)));
10 typedef long long __m256i __attribute__ ((__vector_size__ (32), __may_alias__));
11
12 __m256i
13 __attribute__ ((noinline, noclone))
14 foo1 ()
15 {
16 return __extension__ (__m256i)(__v4di) { -1, -1, 0, 0 };
17 }
18
19 __m256i
20 __attribute__ ((noinline, noclone))
21 foo2 ()
22 {
23 return __extension__ (__m256i)(__v8si) { -1, -1, -1, -1,
24 0, 0, 0, 0 };
25 }
26
27 __m256i
28 __attribute__ ((noinline, noclone))
29 foo3 ()
30 {
31 return __extension__ (__m256i)(__v16hi) { -1, -1, -1, -1,
32 -1, -1, -1, -1,
33 0, 0, 0, 0,
34 0, 0, 0, 0 };
35 }
36
37 __m256i
38 __attribute__ ((noinline, noclone))
39 foo4 ()
40 {
41 return __extension__ (__m256i)(__v32qi) { -1, -1, -1, -1,
42 -1, -1, -1, -1,
43 -1, -1, -1, -1,
44 -1, -1, -1, -1,
45 0, 0, 0, 0,
46 0, 0, 0, 0,
47 0, 0, 0, 0,
48 0, 0, 0, 0 };
49 }