Debian Codegraph @

gcc/testsuite/gcc.target/i386/pr106010-2a.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mavx -ftree-vectorize -fvect-cost-model=unlimited -fdump-tree-slp-details -mprefer-vector-width=256" } */
3 /* { dg-final { scan-tree-dump-times "basic block part vectorized using (?:32|64) byte vectors" 6 "slp2" } }*/
4 /* { dg-final { scan-tree-dump-times {(?n)add new stmt:.*MEM <vector\(4\) double>} 2 "slp2" } } */
5 /* { dg-final { scan-tree-dump-times {(?n)add new stmt:.*MEM <vector\(8\) float>} 2 "slp2" } } */
6 /* { dg-final { scan-tree-dump-times {(?n)add new stmt:.*MEM <vector\(4\) long long int>} 2 "slp2" } } */
7 /* { dg-final { scan-tree-dump-times {(?n)add new stmt:.*MEM <vector\(8\) int>} 2 "slp2" } } */
8 /* { dg-final { scan-tree-dump-times {(?n)add new stmt:.*MEM <vector\(16\) short int>} 2 "slp2" } } */
9 /* { dg-final { scan-tree-dump-times {(?n)add new stmt:.*MEM <vector\(32\) char>} 2 "slp2" } } */
10
11 void
12 __attribute__((noipa))
13 foo_pd (_Complex double* a, _Complex double* __restrict b)
14 {
15 a[0] = b[0];
16 a[1] = b[1];
17 }
18
19 void
20 __attribute__((noipa))
21 foo_ps (_Complex float* a, _Complex float* __restrict b)
22 {
23 a[0] = b[0];
24 a[1] = b[1];
25 a[2] = b[2];
26 a[3] = b[3];
27
28 }
29
30 void
31 __attribute__((noipa))
32 foo_epi64 (_Complex long long* a, _Complex long long* __restrict b)
33 {
34 a[0] = b[0];
35 a[1] = b[1];
36 }
37
38 void
39 __attribute__((noipa))
40 foo_epi32 (_Complex int* a, _Complex int* __restrict b)
41 {
42 a[0] = b[0];
43 a[1] = b[1];
44 a[2] = b[2];
45 a[3] = b[3];
46 }
47
48 void
49 __attribute__((noipa))
50 foo_epi16 (_Complex short* a, _Complex short* __restrict b)
51 {
52 a[0] = b[0];
53 a[1] = b[1];
54 a[2] = b[2];
55 a[3] = b[3];
56 a[4] = b[4];
57 a[5] = b[5];
58 a[6] = b[6];
59 a[7] = b[7];
60 }
61
62 void
63 __attribute__((noipa))
64 foo_epi8 (_Complex char* a, _Complex char* __restrict b)
65 {
66 a[0] = b[0];
67 a[1] = b[1];
68 a[2] = b[2];
69 a[3] = b[3];
70 a[4] = b[4];
71 a[5] = b[5];
72 a[6] = b[6];
73 a[7] = b[7];
74 a[8] = b[8];
75 a[9] = b[9];
76 a[10] = b[10];
77 a[11] = b[11];
78 a[12] = b[12];
79 a[13] = b[13];
80 a[14] = b[14];
81 a[15] = b[15];
82 }