annotate gcc/testsuite/g++.target/aarch64/pr94052.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 /* { dg-do compile } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 /* { dg-additional-options "-O2 -std=gnu++11 -w" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4 namespace c {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 typedef int d;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6 template <typename e> struct f { typedef e g; };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 template <bool, typename> struct h;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 template <typename e> e aa(typename f<e>::g i) { return i; }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 template <typename, typename> struct j {};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 template <d, typename> struct k;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 template <class l, class m> struct k<1, j<l, m>> { typedef m g; };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 template <d n, class l, class m> typename k<n, j<l, m>>::g ab(j<l, m>);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 } // namespace c
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 typedef long d;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 typedef char o;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 typedef int p;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17 typedef char q;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 typedef int r;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 namespace {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 struct s;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 constexpr d t = 6;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 template <typename> class ad {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 public:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24 static constexpr d u = t;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 d v();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 d x();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 d y();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29 class z : ad<int> {};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30 struct ae {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 p af;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33 class ag {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
34 public:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
35 ae ah();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
36 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
37 } // namespace
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
38 typedef __Int32x4_t ai;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
39 typedef struct {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
40 ai aj[2];
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
41 } ak;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
42 typedef int al;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
43 void am(p *a, ai b) { __builtin_aarch64_st1v4si(a, b); }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
44 namespace an {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
45 class ao {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
46 public:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
47 bool operator==(ao);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
48 d v();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
49 d x();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
50 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
51 class ap : public ad<r> {};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
52 class aq {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
53 public:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
54 c::j<int, int> ar();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
55 int as();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
56 int at();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
57 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
58 class au {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
59 public:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
60 virtual d av(d);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
61 virtual ap aw();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
62 virtual ag ax();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
63 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
64 class ay {};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
65 class az {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
66 virtual void ba(const ay &, const s &);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
67 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
68 using bb = az;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
69 class bc;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
70 class bd : bb {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
71 void ba(const ay &, const s &);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
72 bc *be;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
73 bc *bf;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
74 bc *bg;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
75 aq bh;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
76 int bi;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
77 int bj;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
78 ao bk;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
79 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
80 namespace bl {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
81 namespace bm {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
82 namespace bn {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
83 class bo;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
84 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
85 } // namespace bm
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
86 } // namespace bl
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
87 namespace bn {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
88 template <typename ac = c::h<0, bl::bm ::bn::bo>>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
89 ai bp(ac *, ac *, ac *, al, al, al, d, p);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
90 template <typename ac = c::h<0, bl::bm ::bn::bo>>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
91 ak bq(ac *br, ac *bs, ac *bt, al bu, al bv, al bw, d bx, int, int by) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
92 ak{bp(br, bs, bt, bu, bv, bw, bx, by), bp(br, bs, bt, bu, bv, bw, bx, by)};
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
93 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
94 template <typename ac = c::h<0, bl::bm ::bn::bo>>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
95 ak bz(ac *, ac *, ac *, al, al, al &, int, p);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
96 template <int> void ca(p *, const ak &);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
97 template <> void ca<1>(p *buffer, const ak &cb) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
98 am(buffer, cb.aj[0]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
99 am(buffer + 4, cb.aj[1]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
100 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
101 int cc(int, int);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
102 } // namespace bn
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
103 class bc {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
104 public:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
105 virtual au *cd();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
106 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
107 class ce {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
108 public:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
109 q *cf();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
110 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
111 template <d> struct cg {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
112 template <typename ch> static void ci(ay, z cj, ch ck) { ck(cj); }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
113 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
114 template <typename ch> void cl(ay w, ch ck) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
115 z cj;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
116 cg<z::u>::ci(w, cj, c::aa<ch>(ck));
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
117 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
118 namespace {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
119 template <typename T1, typename cm, int cn> class co {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
120 public:
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
121 static void convolve(ay, int cs, bc *cp, bc *cq, bc *cr, aq cw, int, ao ct) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
122 int by = cp->cd()->ax().ah().af;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
123 int cu = cq->cd()->ax().ah().af;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
124 cp->cd()->aw().v();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
125 int cv = cp->cd()->aw().x();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
126 cp->cd()->aw().y();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
127 cp->cd()->aw();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
128 int da = cr->cd()->aw().x();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
129 int cx = cq->cd()->aw().x();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
130 cq->cd()->aw().y();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
131 int cy = cr->cd()->av(0);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
132 int cz = cr->cd()->av(1);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
133 bn::cc(cs, cn);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
134 int de = c::ab<1>(cw.ar());
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
135 cw.as();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
136 cw.at();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
137 ay db;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
138 ce dc;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
139 ce dd;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
140 ce w;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
141 q *di = w.cf();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
142 cl(db, [&](z) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
143 int df;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
144 dc;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
145 di;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
146 cx;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
147 auto dg(cu);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
148 auto dh(cu);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
149 auto dl(cu);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
150 for (; cz; df += de) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
151 auto br = reinterpret_cast<T1 *>(cv);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
152 auto bs = reinterpret_cast<T1 *>(cv);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
153 auto bt = reinterpret_cast<T1 *>(df * ct.x());
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
154 auto dj = reinterpret_cast<cm *>(dd.cf() + da);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
155 for (int dk; dk < cy; dk += cs, dj += cs)
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
156 if (ct == ao()) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
157 auto vres = bn::bz(br, bs, bt, dg, dh, dl, cn, by);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
158 bn::ca<cn>(dj, vres);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
159 } else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
160 bn::bq(br, bs, bt, dg, dh, dl, ct.v(), cn, by);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
161 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
162 });
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
163 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
164 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
165 template <typename T1, typename cm>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
166 void bz(ay dm, int cs, bc *cp, bc *cq, bc *cr, aq cw, int dn, ao ct) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
167 co<T1, cm, 1>::convolve(dm, cs, cp, cq, cr, cw, dn, ct);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
168 co<T1, cm, 2>::convolve(dm, cs, cp, cq, cr, cw, dn, ct);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
169 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
170 } // namespace
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
171 void bd::ba(const ay &dm, const s &) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
172 bz<o, p>(dm, bi, be, bg, bf, bh, bj, bk);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
173 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
174 } // namespace an