1 // Auto-generated file. Do not edit!
2 // Template: src/qs8-igemm/c2-neon-mull-dup.c.in
3 // Generator: tools/xngen
4 //
5 // Copyright 2021 Google LLC
6 //
7 // This source code is licensed under the BSD-style license found in the
8 // LICENSE file in the root directory of this source tree.
9
10 #include <assert.h>
11
12 #include <arm_neon.h>
13
14 #include <xnnpack/gemm.h>
15 #include <xnnpack/math.h>
16
xnn_qs8_igemm_minmax_rndnu_ukernel_4x16c2__neon_mull_dup(size_t mr,size_t nc,size_t kc,size_t ks,const int8_t ** restrict a,const void * restrict w,int8_t * restrict c,size_t cm_stride,size_t cn_stride,size_t a_offset,const int8_t * zero,const union xnn_qs8_conv_minmax_params params[restrict XNN_MIN_ELEMENTS (1)])17 void xnn_qs8_igemm_minmax_rndnu_ukernel_4x16c2__neon_mull_dup(
18 size_t mr,
19 size_t nc,
20 size_t kc,
21 size_t ks,
22 const int8_t** restrict a,
23 const void* restrict w,
24 int8_t* restrict c,
25 size_t cm_stride,
26 size_t cn_stride,
27 size_t a_offset,
28 const int8_t* zero,
29 const union xnn_qs8_conv_minmax_params params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS
30 {
31 assert(mr != 0);
32 assert(mr <= 4);
33 assert(nc != 0);
34 assert(kc != 0);
35 assert(ks != 0);
36 assert(ks % (4 * sizeof(void*)) == 0);
37 assert(a_offset % sizeof(int8_t) == 0);
38 assert(a != NULL);
39 assert(w != NULL);
40 assert(c != NULL);
41
42 kc = round_up_po2(kc, 2 * sizeof(int8_t));
43 int8_t* c0 = c;
44 int8_t* c1 = (int8_t*) ((uintptr_t) c0 + cm_stride);
45 if XNN_UNPREDICTABLE(mr < 2) {
46 c1 = c0;
47 }
48 int8_t* c2 = (int8_t*) ((uintptr_t) c1 + cm_stride);
49 if XNN_UNPREDICTABLE(mr <= 2) {
50 c2 = c1;
51 }
52 int8_t* c3 = (int8_t*) ((uintptr_t) c2 + cm_stride);
53 if XNN_UNPREDICTABLE(mr != 4) {
54 c3 = c2;
55 }
56
57 do {
58 int32x4_t vacc0x0123 = vld1q_s32(w); w = (const void*) ((uintptr_t) w + 4 * sizeof(int32_t));
59 int32x4_t vacc0x4567 = vld1q_s32(w); w = (const void*) ((uintptr_t) w + 4 * sizeof(int32_t));
60 int32x4_t vacc0x89AB = vld1q_s32(w); w = (const void*) ((uintptr_t) w + 4 * sizeof(int32_t));
61 int32x4_t vacc0xCDEF = vld1q_s32(w); w = (const void*) ((uintptr_t) w + 4 * sizeof(int32_t));
62 int32x4_t vacc1x0123 = vacc0x0123;
63 int32x4_t vacc1x4567 = vacc0x4567;
64 int32x4_t vacc1x89AB = vacc0x89AB;
65 int32x4_t vacc1xCDEF = vacc0xCDEF;
66 int32x4_t vacc2x0123 = vacc0x0123;
67 int32x4_t vacc2x4567 = vacc0x4567;
68 int32x4_t vacc2x89AB = vacc0x89AB;
69 int32x4_t vacc2xCDEF = vacc0xCDEF;
70 int32x4_t vacc3x0123 = vacc0x0123;
71 int32x4_t vacc3x4567 = vacc0x4567;
72 int32x4_t vacc3x89AB = vacc0x89AB;
73 int32x4_t vacc3xCDEF = vacc0xCDEF;
74
75 size_t p = ks;
76 do {
77 const int8_t* restrict a0 = a[0];
78 if XNN_UNPREDICTABLE(a0 != zero) {
79 a0 = (const int8_t*) ((uintptr_t) a0 + a_offset);
80 }
81 const int8_t* restrict a1 = a[1];
82 if XNN_UNPREDICTABLE(a1 != zero) {
83 a1 = (const int8_t*) ((uintptr_t) a1 + a_offset);
84 }
85 const int8_t* restrict a2 = a[2];
86 if XNN_UNPREDICTABLE(a2 != zero) {
87 a2 = (const int8_t*) ((uintptr_t) a2 + a_offset);
88 }
89 const int8_t* restrict a3 = a[3];
90 if XNN_UNPREDICTABLE(a3 != zero) {
91 a3 = (const int8_t*) ((uintptr_t) a3 + a_offset);
92 }
93 a += 4;
94
95 size_t k = kc;
96
97
98 while (k >= 8 * sizeof(int8_t)) {
99 const int8x8_t va0 = vld1_s8(a0); a0 += 8;
100 const int8x8_t va1 = vld1_s8(a1); a1 += 8;
101 const int8x8_t va2 = vld1_s8(a2); a2 += 8;
102 const int8x8_t va3 = vld1_s8(a3); a3 += 8;
103
104 const int8x8_t vb0123c0 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
105 const int8x8_t vb4567c0 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
106 const int8x8_t vb89ABc0 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
107 const int8x8_t vbCDEFc0 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
108 const int8x8_t vb0123c1 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
109 const int8x8_t vb4567c1 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
110 const int8x8_t vb89ABc1 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
111 const int8x8_t vbCDEFc1 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
112 const int8x8_t vb0123c2 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
113 const int8x8_t vb4567c2 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
114 const int8x8_t vb89ABc2 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
115 const int8x8_t vbCDEFc2 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
116 const int8x8_t vb0123c3 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
117 const int8x8_t vb4567c3 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
118 const int8x8_t vb89ABc3 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
119 const int8x8_t vbCDEFc3 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
120
121 const int8x8_t va0c0 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va0), 0));
122 const int8x8_t va1c0 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va1), 0));
123 const int8x8_t va2c0 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va2), 0));
124 const int8x8_t va3c0 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va3), 0));
125
126 const int16x8_t vprod0x0123c0 = vmull_s8(vb0123c0, va0c0);
127 const int16x8_t vprod1x0123c0 = vmull_s8(vb0123c0, va1c0);
128 const int16x8_t vprod2x0123c0 = vmull_s8(vb0123c0, va2c0);
129 const int16x8_t vprod3x0123c0 = vmull_s8(vb0123c0, va3c0);
130 vacc0x0123 = vpadalq_s16(vacc0x0123, vprod0x0123c0);
131 vacc1x0123 = vpadalq_s16(vacc1x0123, vprod1x0123c0);
132 vacc2x0123 = vpadalq_s16(vacc2x0123, vprod2x0123c0);
133 vacc3x0123 = vpadalq_s16(vacc3x0123, vprod3x0123c0);
134 const int16x8_t vprod0x4567c0 = vmull_s8(vb4567c0, va0c0);
135 const int16x8_t vprod1x4567c0 = vmull_s8(vb4567c0, va1c0);
136 const int16x8_t vprod2x4567c0 = vmull_s8(vb4567c0, va2c0);
137 const int16x8_t vprod3x4567c0 = vmull_s8(vb4567c0, va3c0);
138 vacc0x4567 = vpadalq_s16(vacc0x4567, vprod0x4567c0);
139 vacc1x4567 = vpadalq_s16(vacc1x4567, vprod1x4567c0);
140 vacc2x4567 = vpadalq_s16(vacc2x4567, vprod2x4567c0);
141 vacc3x4567 = vpadalq_s16(vacc3x4567, vprod3x4567c0);
142 const int16x8_t vprod0x89ABc0 = vmull_s8(vb89ABc0, va0c0);
143 const int16x8_t vprod1x89ABc0 = vmull_s8(vb89ABc0, va1c0);
144 const int16x8_t vprod2x89ABc0 = vmull_s8(vb89ABc0, va2c0);
145 const int16x8_t vprod3x89ABc0 = vmull_s8(vb89ABc0, va3c0);
146 vacc0x89AB = vpadalq_s16(vacc0x89AB, vprod0x89ABc0);
147 vacc1x89AB = vpadalq_s16(vacc1x89AB, vprod1x89ABc0);
148 vacc2x89AB = vpadalq_s16(vacc2x89AB, vprod2x89ABc0);
149 vacc3x89AB = vpadalq_s16(vacc3x89AB, vprod3x89ABc0);
150 const int16x8_t vprod0xCDEFc0 = vmull_s8(vbCDEFc0, va0c0);
151 const int16x8_t vprod1xCDEFc0 = vmull_s8(vbCDEFc0, va1c0);
152 const int16x8_t vprod2xCDEFc0 = vmull_s8(vbCDEFc0, va2c0);
153 const int16x8_t vprod3xCDEFc0 = vmull_s8(vbCDEFc0, va3c0);
154 vacc0xCDEF = vpadalq_s16(vacc0xCDEF, vprod0xCDEFc0);
155 vacc1xCDEF = vpadalq_s16(vacc1xCDEF, vprod1xCDEFc0);
156 vacc2xCDEF = vpadalq_s16(vacc2xCDEF, vprod2xCDEFc0);
157 vacc3xCDEF = vpadalq_s16(vacc3xCDEF, vprod3xCDEFc0);
158 const int8x8_t va0c1 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va0), 1));
159 const int8x8_t va1c1 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va1), 1));
160 const int8x8_t va2c1 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va2), 1));
161 const int8x8_t va3c1 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va3), 1));
162
163 const int16x8_t vprod0x0123c1 = vmull_s8(vb0123c1, va0c1);
164 const int16x8_t vprod1x0123c1 = vmull_s8(vb0123c1, va1c1);
165 const int16x8_t vprod2x0123c1 = vmull_s8(vb0123c1, va2c1);
166 const int16x8_t vprod3x0123c1 = vmull_s8(vb0123c1, va3c1);
167 vacc0x0123 = vpadalq_s16(vacc0x0123, vprod0x0123c1);
168 vacc1x0123 = vpadalq_s16(vacc1x0123, vprod1x0123c1);
169 vacc2x0123 = vpadalq_s16(vacc2x0123, vprod2x0123c1);
170 vacc3x0123 = vpadalq_s16(vacc3x0123, vprod3x0123c1);
171 const int16x8_t vprod0x4567c1 = vmull_s8(vb4567c1, va0c1);
172 const int16x8_t vprod1x4567c1 = vmull_s8(vb4567c1, va1c1);
173 const int16x8_t vprod2x4567c1 = vmull_s8(vb4567c1, va2c1);
174 const int16x8_t vprod3x4567c1 = vmull_s8(vb4567c1, va3c1);
175 vacc0x4567 = vpadalq_s16(vacc0x4567, vprod0x4567c1);
176 vacc1x4567 = vpadalq_s16(vacc1x4567, vprod1x4567c1);
177 vacc2x4567 = vpadalq_s16(vacc2x4567, vprod2x4567c1);
178 vacc3x4567 = vpadalq_s16(vacc3x4567, vprod3x4567c1);
179 const int16x8_t vprod0x89ABc1 = vmull_s8(vb89ABc1, va0c1);
180 const int16x8_t vprod1x89ABc1 = vmull_s8(vb89ABc1, va1c1);
181 const int16x8_t vprod2x89ABc1 = vmull_s8(vb89ABc1, va2c1);
182 const int16x8_t vprod3x89ABc1 = vmull_s8(vb89ABc1, va3c1);
183 vacc0x89AB = vpadalq_s16(vacc0x89AB, vprod0x89ABc1);
184 vacc1x89AB = vpadalq_s16(vacc1x89AB, vprod1x89ABc1);
185 vacc2x89AB = vpadalq_s16(vacc2x89AB, vprod2x89ABc1);
186 vacc3x89AB = vpadalq_s16(vacc3x89AB, vprod3x89ABc1);
187 const int16x8_t vprod0xCDEFc1 = vmull_s8(vbCDEFc1, va0c1);
188 const int16x8_t vprod1xCDEFc1 = vmull_s8(vbCDEFc1, va1c1);
189 const int16x8_t vprod2xCDEFc1 = vmull_s8(vbCDEFc1, va2c1);
190 const int16x8_t vprod3xCDEFc1 = vmull_s8(vbCDEFc1, va3c1);
191 vacc0xCDEF = vpadalq_s16(vacc0xCDEF, vprod0xCDEFc1);
192 vacc1xCDEF = vpadalq_s16(vacc1xCDEF, vprod1xCDEFc1);
193 vacc2xCDEF = vpadalq_s16(vacc2xCDEF, vprod2xCDEFc1);
194 vacc3xCDEF = vpadalq_s16(vacc3xCDEF, vprod3xCDEFc1);
195 const int8x8_t va0c2 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va0), 2));
196 const int8x8_t va1c2 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va1), 2));
197 const int8x8_t va2c2 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va2), 2));
198 const int8x8_t va3c2 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va3), 2));
199
200 const int16x8_t vprod0x0123c2 = vmull_s8(vb0123c2, va0c2);
201 const int16x8_t vprod1x0123c2 = vmull_s8(vb0123c2, va1c2);
202 const int16x8_t vprod2x0123c2 = vmull_s8(vb0123c2, va2c2);
203 const int16x8_t vprod3x0123c2 = vmull_s8(vb0123c2, va3c2);
204 vacc0x0123 = vpadalq_s16(vacc0x0123, vprod0x0123c2);
205 vacc1x0123 = vpadalq_s16(vacc1x0123, vprod1x0123c2);
206 vacc2x0123 = vpadalq_s16(vacc2x0123, vprod2x0123c2);
207 vacc3x0123 = vpadalq_s16(vacc3x0123, vprod3x0123c2);
208 const int16x8_t vprod0x4567c2 = vmull_s8(vb4567c2, va0c2);
209 const int16x8_t vprod1x4567c2 = vmull_s8(vb4567c2, va1c2);
210 const int16x8_t vprod2x4567c2 = vmull_s8(vb4567c2, va2c2);
211 const int16x8_t vprod3x4567c2 = vmull_s8(vb4567c2, va3c2);
212 vacc0x4567 = vpadalq_s16(vacc0x4567, vprod0x4567c2);
213 vacc1x4567 = vpadalq_s16(vacc1x4567, vprod1x4567c2);
214 vacc2x4567 = vpadalq_s16(vacc2x4567, vprod2x4567c2);
215 vacc3x4567 = vpadalq_s16(vacc3x4567, vprod3x4567c2);
216 const int16x8_t vprod0x89ABc2 = vmull_s8(vb89ABc2, va0c2);
217 const int16x8_t vprod1x89ABc2 = vmull_s8(vb89ABc2, va1c2);
218 const int16x8_t vprod2x89ABc2 = vmull_s8(vb89ABc2, va2c2);
219 const int16x8_t vprod3x89ABc2 = vmull_s8(vb89ABc2, va3c2);
220 vacc0x89AB = vpadalq_s16(vacc0x89AB, vprod0x89ABc2);
221 vacc1x89AB = vpadalq_s16(vacc1x89AB, vprod1x89ABc2);
222 vacc2x89AB = vpadalq_s16(vacc2x89AB, vprod2x89ABc2);
223 vacc3x89AB = vpadalq_s16(vacc3x89AB, vprod3x89ABc2);
224 const int16x8_t vprod0xCDEFc2 = vmull_s8(vbCDEFc2, va0c2);
225 const int16x8_t vprod1xCDEFc2 = vmull_s8(vbCDEFc2, va1c2);
226 const int16x8_t vprod2xCDEFc2 = vmull_s8(vbCDEFc2, va2c2);
227 const int16x8_t vprod3xCDEFc2 = vmull_s8(vbCDEFc2, va3c2);
228 vacc0xCDEF = vpadalq_s16(vacc0xCDEF, vprod0xCDEFc2);
229 vacc1xCDEF = vpadalq_s16(vacc1xCDEF, vprod1xCDEFc2);
230 vacc2xCDEF = vpadalq_s16(vacc2xCDEF, vprod2xCDEFc2);
231 vacc3xCDEF = vpadalq_s16(vacc3xCDEF, vprod3xCDEFc2);
232 const int8x8_t va0c3 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va0), 3));
233 const int8x8_t va1c3 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va1), 3));
234 const int8x8_t va2c3 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va2), 3));
235 const int8x8_t va3c3 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va3), 3));
236
237 const int16x8_t vprod0x0123c3 = vmull_s8(vb0123c3, va0c3);
238 const int16x8_t vprod1x0123c3 = vmull_s8(vb0123c3, va1c3);
239 const int16x8_t vprod2x0123c3 = vmull_s8(vb0123c3, va2c3);
240 const int16x8_t vprod3x0123c3 = vmull_s8(vb0123c3, va3c3);
241 vacc0x0123 = vpadalq_s16(vacc0x0123, vprod0x0123c3);
242 vacc1x0123 = vpadalq_s16(vacc1x0123, vprod1x0123c3);
243 vacc2x0123 = vpadalq_s16(vacc2x0123, vprod2x0123c3);
244 vacc3x0123 = vpadalq_s16(vacc3x0123, vprod3x0123c3);
245 const int16x8_t vprod0x4567c3 = vmull_s8(vb4567c3, va0c3);
246 const int16x8_t vprod1x4567c3 = vmull_s8(vb4567c3, va1c3);
247 const int16x8_t vprod2x4567c3 = vmull_s8(vb4567c3, va2c3);
248 const int16x8_t vprod3x4567c3 = vmull_s8(vb4567c3, va3c3);
249 vacc0x4567 = vpadalq_s16(vacc0x4567, vprod0x4567c3);
250 vacc1x4567 = vpadalq_s16(vacc1x4567, vprod1x4567c3);
251 vacc2x4567 = vpadalq_s16(vacc2x4567, vprod2x4567c3);
252 vacc3x4567 = vpadalq_s16(vacc3x4567, vprod3x4567c3);
253 const int16x8_t vprod0x89ABc3 = vmull_s8(vb89ABc3, va0c3);
254 const int16x8_t vprod1x89ABc3 = vmull_s8(vb89ABc3, va1c3);
255 const int16x8_t vprod2x89ABc3 = vmull_s8(vb89ABc3, va2c3);
256 const int16x8_t vprod3x89ABc3 = vmull_s8(vb89ABc3, va3c3);
257 vacc0x89AB = vpadalq_s16(vacc0x89AB, vprod0x89ABc3);
258 vacc1x89AB = vpadalq_s16(vacc1x89AB, vprod1x89ABc3);
259 vacc2x89AB = vpadalq_s16(vacc2x89AB, vprod2x89ABc3);
260 vacc3x89AB = vpadalq_s16(vacc3x89AB, vprod3x89ABc3);
261 const int16x8_t vprod0xCDEFc3 = vmull_s8(vbCDEFc3, va0c3);
262 const int16x8_t vprod1xCDEFc3 = vmull_s8(vbCDEFc3, va1c3);
263 const int16x8_t vprod2xCDEFc3 = vmull_s8(vbCDEFc3, va2c3);
264 const int16x8_t vprod3xCDEFc3 = vmull_s8(vbCDEFc3, va3c3);
265 vacc0xCDEF = vpadalq_s16(vacc0xCDEF, vprod0xCDEFc3);
266 vacc1xCDEF = vpadalq_s16(vacc1xCDEF, vprod1xCDEFc3);
267 vacc2xCDEF = vpadalq_s16(vacc2xCDEF, vprod2xCDEFc3);
268 vacc3xCDEF = vpadalq_s16(vacc3xCDEF, vprod3xCDEFc3);
269
270 k -= 8 * sizeof(int8_t);
271 }
272
273 if XNN_UNLIKELY(k != 0) {
274 const int8x8_t va0 = vld1_s8(a0); a0 = (const int8_t*) ((uintptr_t) a0 + k);
275 const int8x8_t va1 = vld1_s8(a1); a1 = (const int8_t*) ((uintptr_t) a1 + k);
276 const int8x8_t va2 = vld1_s8(a2); a2 = (const int8_t*) ((uintptr_t) a2 + k);
277 const int8x8_t va3 = vld1_s8(a3); a3 = (const int8_t*) ((uintptr_t) a3 + k);
278
279 const int8x8_t vb0123c0 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
280 const int8x8_t vb4567c0 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
281 const int8x8_t vb89ABc0 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
282 const int8x8_t vbCDEFc0 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
283
284 const int8x8_t va0c0 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va0), 0));
285 const int16x8_t vprod0x0123c0 = vmull_s8(vb0123c0, va0c0);
286 vacc0x0123 = vpadalq_s16(vacc0x0123, vprod0x0123c0);
287 const int16x8_t vprod0x4567c0 = vmull_s8(vb4567c0, va0c0);
288 vacc0x4567 = vpadalq_s16(vacc0x4567, vprod0x4567c0);
289 const int16x8_t vprod0x89ABc0 = vmull_s8(vb89ABc0, va0c0);
290 vacc0x89AB = vpadalq_s16(vacc0x89AB, vprod0x89ABc0);
291 const int16x8_t vprod0xCDEFc0 = vmull_s8(vbCDEFc0, va0c0);
292 vacc0xCDEF = vpadalq_s16(vacc0xCDEF, vprod0xCDEFc0);
293 const int8x8_t va1c0 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va1), 0));
294 const int16x8_t vprod1x0123c0 = vmull_s8(vb0123c0, va1c0);
295 vacc1x0123 = vpadalq_s16(vacc1x0123, vprod1x0123c0);
296 const int16x8_t vprod1x4567c0 = vmull_s8(vb4567c0, va1c0);
297 vacc1x4567 = vpadalq_s16(vacc1x4567, vprod1x4567c0);
298 const int16x8_t vprod1x89ABc0 = vmull_s8(vb89ABc0, va1c0);
299 vacc1x89AB = vpadalq_s16(vacc1x89AB, vprod1x89ABc0);
300 const int16x8_t vprod1xCDEFc0 = vmull_s8(vbCDEFc0, va1c0);
301 vacc1xCDEF = vpadalq_s16(vacc1xCDEF, vprod1xCDEFc0);
302 const int8x8_t va2c0 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va2), 0));
303 const int16x8_t vprod2x0123c0 = vmull_s8(vb0123c0, va2c0);
304 vacc2x0123 = vpadalq_s16(vacc2x0123, vprod2x0123c0);
305 const int16x8_t vprod2x4567c0 = vmull_s8(vb4567c0, va2c0);
306 vacc2x4567 = vpadalq_s16(vacc2x4567, vprod2x4567c0);
307 const int16x8_t vprod2x89ABc0 = vmull_s8(vb89ABc0, va2c0);
308 vacc2x89AB = vpadalq_s16(vacc2x89AB, vprod2x89ABc0);
309 const int16x8_t vprod2xCDEFc0 = vmull_s8(vbCDEFc0, va2c0);
310 vacc2xCDEF = vpadalq_s16(vacc2xCDEF, vprod2xCDEFc0);
311 const int8x8_t va3c0 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va3), 0));
312 const int16x8_t vprod3x0123c0 = vmull_s8(vb0123c0, va3c0);
313 vacc3x0123 = vpadalq_s16(vacc3x0123, vprod3x0123c0);
314 const int16x8_t vprod3x4567c0 = vmull_s8(vb4567c0, va3c0);
315 vacc3x4567 = vpadalq_s16(vacc3x4567, vprod3x4567c0);
316 const int16x8_t vprod3x89ABc0 = vmull_s8(vb89ABc0, va3c0);
317 vacc3x89AB = vpadalq_s16(vacc3x89AB, vprod3x89ABc0);
318 const int16x8_t vprod3xCDEFc0 = vmull_s8(vbCDEFc0, va3c0);
319 vacc3xCDEF = vpadalq_s16(vacc3xCDEF, vprod3xCDEFc0);
320
321 if (k > 2 * sizeof(int8_t)) {
322 const int8x8_t vb0123c1 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
323 const int8x8_t vb4567c1 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
324 const int8x8_t vb89ABc1 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
325 const int8x8_t vbCDEFc1 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
326
327 const int8x8_t va0c1 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va0), 1));
328 const int16x8_t vprod0x0123c1 = vmull_s8(vb0123c1, va0c1);
329 vacc0x0123 = vpadalq_s16(vacc0x0123, vprod0x0123c1);
330 const int16x8_t vprod0x4567c1 = vmull_s8(vb4567c1, va0c1);
331 vacc0x4567 = vpadalq_s16(vacc0x4567, vprod0x4567c1);
332 const int16x8_t vprod0x89ABc1 = vmull_s8(vb89ABc1, va0c1);
333 vacc0x89AB = vpadalq_s16(vacc0x89AB, vprod0x89ABc1);
334 const int16x8_t vprod0xCDEFc1 = vmull_s8(vbCDEFc1, va0c1);
335 vacc0xCDEF = vpadalq_s16(vacc0xCDEF, vprod0xCDEFc1);
336 const int8x8_t va1c1 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va1), 1));
337 const int16x8_t vprod1x0123c1 = vmull_s8(vb0123c1, va1c1);
338 vacc1x0123 = vpadalq_s16(vacc1x0123, vprod1x0123c1);
339 const int16x8_t vprod1x4567c1 = vmull_s8(vb4567c1, va1c1);
340 vacc1x4567 = vpadalq_s16(vacc1x4567, vprod1x4567c1);
341 const int16x8_t vprod1x89ABc1 = vmull_s8(vb89ABc1, va1c1);
342 vacc1x89AB = vpadalq_s16(vacc1x89AB, vprod1x89ABc1);
343 const int16x8_t vprod1xCDEFc1 = vmull_s8(vbCDEFc1, va1c1);
344 vacc1xCDEF = vpadalq_s16(vacc1xCDEF, vprod1xCDEFc1);
345 const int8x8_t va2c1 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va2), 1));
346 const int16x8_t vprod2x0123c1 = vmull_s8(vb0123c1, va2c1);
347 vacc2x0123 = vpadalq_s16(vacc2x0123, vprod2x0123c1);
348 const int16x8_t vprod2x4567c1 = vmull_s8(vb4567c1, va2c1);
349 vacc2x4567 = vpadalq_s16(vacc2x4567, vprod2x4567c1);
350 const int16x8_t vprod2x89ABc1 = vmull_s8(vb89ABc1, va2c1);
351 vacc2x89AB = vpadalq_s16(vacc2x89AB, vprod2x89ABc1);
352 const int16x8_t vprod2xCDEFc1 = vmull_s8(vbCDEFc1, va2c1);
353 vacc2xCDEF = vpadalq_s16(vacc2xCDEF, vprod2xCDEFc1);
354 const int8x8_t va3c1 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va3), 1));
355 const int16x8_t vprod3x0123c1 = vmull_s8(vb0123c1, va3c1);
356 vacc3x0123 = vpadalq_s16(vacc3x0123, vprod3x0123c1);
357 const int16x8_t vprod3x4567c1 = vmull_s8(vb4567c1, va3c1);
358 vacc3x4567 = vpadalq_s16(vacc3x4567, vprod3x4567c1);
359 const int16x8_t vprod3x89ABc1 = vmull_s8(vb89ABc1, va3c1);
360 vacc3x89AB = vpadalq_s16(vacc3x89AB, vprod3x89ABc1);
361 const int16x8_t vprod3xCDEFc1 = vmull_s8(vbCDEFc1, va3c1);
362 vacc3xCDEF = vpadalq_s16(vacc3xCDEF, vprod3xCDEFc1);
363
364 if (k > 4 * sizeof(int8_t)) {
365 const int8x8_t vb0123c2 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
366 const int8x8_t vb4567c2 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
367 const int8x8_t vb89ABc2 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
368 const int8x8_t vbCDEFc2 = vld1_s8(w); w = (const void*) ((uintptr_t) w + 8 * sizeof(int8_t));
369
370 const int8x8_t va0c2 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va0), 2));
371 const int16x8_t vprod0x0123c2 = vmull_s8(vb0123c2, va0c2);
372 vacc0x0123 = vpadalq_s16(vacc0x0123, vprod0x0123c2);
373 const int16x8_t vprod0x4567c2 = vmull_s8(vb4567c2, va0c2);
374 vacc0x4567 = vpadalq_s16(vacc0x4567, vprod0x4567c2);
375 const int16x8_t vprod0x89ABc2 = vmull_s8(vb89ABc2, va0c2);
376 vacc0x89AB = vpadalq_s16(vacc0x89AB, vprod0x89ABc2);
377 const int16x8_t vprod0xCDEFc2 = vmull_s8(vbCDEFc2, va0c2);
378 vacc0xCDEF = vpadalq_s16(vacc0xCDEF, vprod0xCDEFc2);
379 const int8x8_t va1c2 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va1), 2));
380 const int16x8_t vprod1x0123c2 = vmull_s8(vb0123c2, va1c2);
381 vacc1x0123 = vpadalq_s16(vacc1x0123, vprod1x0123c2);
382 const int16x8_t vprod1x4567c2 = vmull_s8(vb4567c2, va1c2);
383 vacc1x4567 = vpadalq_s16(vacc1x4567, vprod1x4567c2);
384 const int16x8_t vprod1x89ABc2 = vmull_s8(vb89ABc2, va1c2);
385 vacc1x89AB = vpadalq_s16(vacc1x89AB, vprod1x89ABc2);
386 const int16x8_t vprod1xCDEFc2 = vmull_s8(vbCDEFc2, va1c2);
387 vacc1xCDEF = vpadalq_s16(vacc1xCDEF, vprod1xCDEFc2);
388 const int8x8_t va2c2 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va2), 2));
389 const int16x8_t vprod2x0123c2 = vmull_s8(vb0123c2, va2c2);
390 vacc2x0123 = vpadalq_s16(vacc2x0123, vprod2x0123c2);
391 const int16x8_t vprod2x4567c2 = vmull_s8(vb4567c2, va2c2);
392 vacc2x4567 = vpadalq_s16(vacc2x4567, vprod2x4567c2);
393 const int16x8_t vprod2x89ABc2 = vmull_s8(vb89ABc2, va2c2);
394 vacc2x89AB = vpadalq_s16(vacc2x89AB, vprod2x89ABc2);
395 const int16x8_t vprod2xCDEFc2 = vmull_s8(vbCDEFc2, va2c2);
396 vacc2xCDEF = vpadalq_s16(vacc2xCDEF, vprod2xCDEFc2);
397 const int8x8_t va3c2 = vreinterpret_s8_s16(vdup_lane_s16(vreinterpret_s16_s8(va3), 2));
398 const int16x8_t vprod3x0123c2 = vmull_s8(vb0123c2, va3c2);
399 vacc3x0123 = vpadalq_s16(vacc3x0123, vprod3x0123c2);
400 const int16x8_t vprod3x4567c2 = vmull_s8(vb4567c2, va3c2);
401 vacc3x4567 = vpadalq_s16(vacc3x4567, vprod3x4567c2);
402 const int16x8_t vprod3x89ABc2 = vmull_s8(vb89ABc2, va3c2);
403 vacc3x89AB = vpadalq_s16(vacc3x89AB, vprod3x89ABc2);
404 const int16x8_t vprod3xCDEFc2 = vmull_s8(vbCDEFc2, va3c2);
405 vacc3xCDEF = vpadalq_s16(vacc3xCDEF, vprod3xCDEFc2);
406 }
407 }
408 }
409 p -= 4 * sizeof(void*);
410 } while (p != 0);
411
412 const int32x4_t vright_pre_shift = vld1q_dup_s32(¶ms->rndnu_neon.right_pre_shift);
413 const int32x4_t vmultiplier = vld1q_dup_s32(¶ms->rndnu_neon.multiplier);
414 const int32x4_t vright_post_shift = vld1q_dup_s32(¶ms->rndnu_neon.right_post_shift);
415
416 vacc0x0123 = vqshlq_s32(vacc0x0123, vright_pre_shift);
417 vacc0x4567 = vqshlq_s32(vacc0x4567, vright_pre_shift);
418 vacc0x89AB = vqshlq_s32(vacc0x89AB, vright_pre_shift);
419 vacc0xCDEF = vqshlq_s32(vacc0xCDEF, vright_pre_shift);
420 vacc1x0123 = vqshlq_s32(vacc1x0123, vright_pre_shift);
421 vacc1x4567 = vqshlq_s32(vacc1x4567, vright_pre_shift);
422 vacc1x89AB = vqshlq_s32(vacc1x89AB, vright_pre_shift);
423 vacc1xCDEF = vqshlq_s32(vacc1xCDEF, vright_pre_shift);
424 vacc2x0123 = vqshlq_s32(vacc2x0123, vright_pre_shift);
425 vacc2x4567 = vqshlq_s32(vacc2x4567, vright_pre_shift);
426 vacc2x89AB = vqshlq_s32(vacc2x89AB, vright_pre_shift);
427 vacc2xCDEF = vqshlq_s32(vacc2xCDEF, vright_pre_shift);
428 vacc3x0123 = vqshlq_s32(vacc3x0123, vright_pre_shift);
429 vacc3x4567 = vqshlq_s32(vacc3x4567, vright_pre_shift);
430 vacc3x89AB = vqshlq_s32(vacc3x89AB, vright_pre_shift);
431 vacc3xCDEF = vqshlq_s32(vacc3xCDEF, vright_pre_shift);
432
433 vacc0x0123 = vqdmulhq_s32(vacc0x0123, vmultiplier);
434 vacc0x4567 = vqdmulhq_s32(vacc0x4567, vmultiplier);
435 vacc0x89AB = vqdmulhq_s32(vacc0x89AB, vmultiplier);
436 vacc0xCDEF = vqdmulhq_s32(vacc0xCDEF, vmultiplier);
437 vacc1x0123 = vqdmulhq_s32(vacc1x0123, vmultiplier);
438 vacc1x4567 = vqdmulhq_s32(vacc1x4567, vmultiplier);
439 vacc1x89AB = vqdmulhq_s32(vacc1x89AB, vmultiplier);
440 vacc1xCDEF = vqdmulhq_s32(vacc1xCDEF, vmultiplier);
441 vacc2x0123 = vqdmulhq_s32(vacc2x0123, vmultiplier);
442 vacc2x4567 = vqdmulhq_s32(vacc2x4567, vmultiplier);
443 vacc2x89AB = vqdmulhq_s32(vacc2x89AB, vmultiplier);
444 vacc2xCDEF = vqdmulhq_s32(vacc2xCDEF, vmultiplier);
445 vacc3x0123 = vqdmulhq_s32(vacc3x0123, vmultiplier);
446 vacc3x4567 = vqdmulhq_s32(vacc3x4567, vmultiplier);
447 vacc3x89AB = vqdmulhq_s32(vacc3x89AB, vmultiplier);
448 vacc3xCDEF = vqdmulhq_s32(vacc3xCDEF, vmultiplier);
449
450 vacc0x0123 = vrshlq_s32(vacc0x0123, vright_post_shift);
451 vacc0x4567 = vrshlq_s32(vacc0x4567, vright_post_shift);
452 vacc0x89AB = vrshlq_s32(vacc0x89AB, vright_post_shift);
453 vacc0xCDEF = vrshlq_s32(vacc0xCDEF, vright_post_shift);
454 vacc1x0123 = vrshlq_s32(vacc1x0123, vright_post_shift);
455 vacc1x4567 = vrshlq_s32(vacc1x4567, vright_post_shift);
456 vacc1x89AB = vrshlq_s32(vacc1x89AB, vright_post_shift);
457 vacc1xCDEF = vrshlq_s32(vacc1xCDEF, vright_post_shift);
458 vacc2x0123 = vrshlq_s32(vacc2x0123, vright_post_shift);
459 vacc2x4567 = vrshlq_s32(vacc2x4567, vright_post_shift);
460 vacc2x89AB = vrshlq_s32(vacc2x89AB, vright_post_shift);
461 vacc2xCDEF = vrshlq_s32(vacc2xCDEF, vright_post_shift);
462 vacc3x0123 = vrshlq_s32(vacc3x0123, vright_post_shift);
463 vacc3x4567 = vrshlq_s32(vacc3x4567, vright_post_shift);
464 vacc3x89AB = vrshlq_s32(vacc3x89AB, vright_post_shift);
465 vacc3xCDEF = vrshlq_s32(vacc3xCDEF, vright_post_shift);
466
467 const int16x8_t voutput_zero_point = vld1q_dup_s16(¶ms->rndnu_neon.output_zero_point);
468 #if XNN_ARCH_ARM64
469 int16x8_t vacc0x01234567 = vqmovn_high_s32(vqmovn_s32(vacc0x0123), vacc0x4567);
470 int16x8_t vacc0x89ABCDEF = vqmovn_high_s32(vqmovn_s32(vacc0x89AB), vacc0xCDEF);
471 int16x8_t vacc1x01234567 = vqmovn_high_s32(vqmovn_s32(vacc1x0123), vacc1x4567);
472 int16x8_t vacc1x89ABCDEF = vqmovn_high_s32(vqmovn_s32(vacc1x89AB), vacc1xCDEF);
473 int16x8_t vacc2x01234567 = vqmovn_high_s32(vqmovn_s32(vacc2x0123), vacc2x4567);
474 int16x8_t vacc2x89ABCDEF = vqmovn_high_s32(vqmovn_s32(vacc2x89AB), vacc2xCDEF);
475 int16x8_t vacc3x01234567 = vqmovn_high_s32(vqmovn_s32(vacc3x0123), vacc3x4567);
476 int16x8_t vacc3x89ABCDEF = vqmovn_high_s32(vqmovn_s32(vacc3x89AB), vacc3xCDEF);
477
478 vacc0x01234567 = vqaddq_s16(vacc0x01234567, voutput_zero_point);
479 vacc0x89ABCDEF = vqaddq_s16(vacc0x89ABCDEF, voutput_zero_point);
480 vacc1x01234567 = vqaddq_s16(vacc1x01234567, voutput_zero_point);
481 vacc1x89ABCDEF = vqaddq_s16(vacc1x89ABCDEF, voutput_zero_point);
482 vacc2x01234567 = vqaddq_s16(vacc2x01234567, voutput_zero_point);
483 vacc2x89ABCDEF = vqaddq_s16(vacc2x89ABCDEF, voutput_zero_point);
484 vacc3x01234567 = vqaddq_s16(vacc3x01234567, voutput_zero_point);
485 vacc3x89ABCDEF = vqaddq_s16(vacc3x89ABCDEF, voutput_zero_point);
486
487 int8x16_t vout0x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc0x01234567), vacc0x89ABCDEF);
488 int8x16_t vout1x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc1x01234567), vacc1x89ABCDEF);
489 int8x16_t vout2x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc2x01234567), vacc2x89ABCDEF);
490 int8x16_t vout3x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc3x01234567), vacc3x89ABCDEF);
491 #else
492 int16x8_t vacc0x01234567 = vcombine_s16(vqmovn_s32(vacc0x0123), vqmovn_s32(vacc0x4567));
493 int16x8_t vacc0x89ABCDEF = vcombine_s16(vqmovn_s32(vacc0x89AB), vqmovn_s32(vacc0xCDEF));
494 int16x8_t vacc1x01234567 = vcombine_s16(vqmovn_s32(vacc1x0123), vqmovn_s32(vacc1x4567));
495 int16x8_t vacc1x89ABCDEF = vcombine_s16(vqmovn_s32(vacc1x89AB), vqmovn_s32(vacc1xCDEF));
496 int16x8_t vacc2x01234567 = vcombine_s16(vqmovn_s32(vacc2x0123), vqmovn_s32(vacc2x4567));
497 int16x8_t vacc2x89ABCDEF = vcombine_s16(vqmovn_s32(vacc2x89AB), vqmovn_s32(vacc2xCDEF));
498 int16x8_t vacc3x01234567 = vcombine_s16(vqmovn_s32(vacc3x0123), vqmovn_s32(vacc3x4567));
499 int16x8_t vacc3x89ABCDEF = vcombine_s16(vqmovn_s32(vacc3x89AB), vqmovn_s32(vacc3xCDEF));
500
501 vacc0x01234567 = vqaddq_s16(vacc0x01234567, voutput_zero_point);
502 vacc0x89ABCDEF = vqaddq_s16(vacc0x89ABCDEF, voutput_zero_point);
503 vacc1x01234567 = vqaddq_s16(vacc1x01234567, voutput_zero_point);
504 vacc1x89ABCDEF = vqaddq_s16(vacc1x89ABCDEF, voutput_zero_point);
505 vacc2x01234567 = vqaddq_s16(vacc2x01234567, voutput_zero_point);
506 vacc2x89ABCDEF = vqaddq_s16(vacc2x89ABCDEF, voutput_zero_point);
507 vacc3x01234567 = vqaddq_s16(vacc3x01234567, voutput_zero_point);
508 vacc3x89ABCDEF = vqaddq_s16(vacc3x89ABCDEF, voutput_zero_point);
509
510 int8x16_t vout0x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc0x01234567), vqmovn_s16(vacc0x89ABCDEF));
511 int8x16_t vout1x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc1x01234567), vqmovn_s16(vacc1x89ABCDEF));
512 int8x16_t vout2x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc2x01234567), vqmovn_s16(vacc2x89ABCDEF));
513 int8x16_t vout3x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc3x01234567), vqmovn_s16(vacc3x89ABCDEF));
514 #endif
515
516 const int8x16_t voutput_min = vld1q_dup_s8(¶ms->rndnu_neon.output_min);
517 vout0x0123456789ABCDEF = vmaxq_s8(vout0x0123456789ABCDEF, voutput_min);
518 vout1x0123456789ABCDEF = vmaxq_s8(vout1x0123456789ABCDEF, voutput_min);
519 vout2x0123456789ABCDEF = vmaxq_s8(vout2x0123456789ABCDEF, voutput_min);
520 vout3x0123456789ABCDEF = vmaxq_s8(vout3x0123456789ABCDEF, voutput_min);
521
522 const int8x16_t voutput_max = vld1q_dup_s8(¶ms->rndnu_neon.output_max);
523 vout0x0123456789ABCDEF = vminq_s8(vout0x0123456789ABCDEF, voutput_max);
524 vout1x0123456789ABCDEF = vminq_s8(vout1x0123456789ABCDEF, voutput_max);
525 vout2x0123456789ABCDEF = vminq_s8(vout2x0123456789ABCDEF, voutput_max);
526 vout3x0123456789ABCDEF = vminq_s8(vout3x0123456789ABCDEF, voutput_max);
527
528 if (nc >= 16) {
529 vst1q_s8(c3 + 0, vout3x0123456789ABCDEF);
530 vst1q_s8(c2 + 0, vout2x0123456789ABCDEF);
531 vst1q_s8(c1 + 0, vout1x0123456789ABCDEF);
532 vst1q_s8(c0 + 0, vout0x0123456789ABCDEF);
533
534 c3 = (int8_t*) ((uintptr_t) c3 + cn_stride);
535 c2 = (int8_t*) ((uintptr_t) c2 + cn_stride);
536 c1 = (int8_t*) ((uintptr_t) c1 + cn_stride);
537 c0 = (int8_t*) ((uintptr_t) c0 + cn_stride);
538
539 a = (const int8_t**restrict) ((uintptr_t) a - ks);
540
541 nc -= 16;
542 } else {
543 int8x16_t vout2x01234567_3x01234567 = vcombine_s8(vget_low_s8(vout2x0123456789ABCDEF), vget_low_s8(vout3x0123456789ABCDEF));
544 int8x16_t vout0x01234567_1x01234567 = vcombine_s8(vget_low_s8(vout0x0123456789ABCDEF), vget_low_s8(vout1x0123456789ABCDEF));
545 if (nc & 8) {
546 vst1_s8(c3, vget_high_s8(vout2x01234567_3x01234567)); c3 += 8;
547 vst1_s8(c2, vget_low_s8(vout2x01234567_3x01234567)); c2 += 8;
548 vst1_s8(c1, vget_high_s8(vout0x01234567_1x01234567)); c1 += 8;
549 vst1_s8(c0, vget_low_s8(vout0x01234567_1x01234567)); c0 += 8;
550 vout2x01234567_3x01234567 = vcombine_s8(vget_high_s8(vout2x0123456789ABCDEF), vget_high_s8(vout3x0123456789ABCDEF));
551 vout0x01234567_1x01234567 = vcombine_s8(vget_high_s8(vout0x0123456789ABCDEF), vget_high_s8(vout1x0123456789ABCDEF));
552 }
553 if (nc & 4) {
554 vst1q_lane_u32((void*) c3, vreinterpretq_u32_s8(vout2x01234567_3x01234567), 2); c3 += 4;
555 vst1q_lane_u32((void*) c2, vreinterpretq_u32_s8(vout2x01234567_3x01234567), 0); c2 += 4;
556 vst1q_lane_u32((void*) c1, vreinterpretq_u32_s8(vout0x01234567_1x01234567), 2); c1 += 4;
557 vst1q_lane_u32((void*) c0, vreinterpretq_u32_s8(vout0x01234567_1x01234567), 0); c0 += 4;
558 vout2x01234567_3x01234567 = vextq_s8(vout2x01234567_3x01234567, vout2x01234567_3x01234567, 4);
559 vout0x01234567_1x01234567 = vextq_s8(vout0x01234567_1x01234567, vout0x01234567_1x01234567, 4);
560 }
561 if (nc & 2) {
562 vst1q_lane_u16((void*) c3, vreinterpretq_u16_s8(vout2x01234567_3x01234567), 4); c3 += 2;
563 vst1q_lane_u16((void*) c2, vreinterpretq_u16_s8(vout2x01234567_3x01234567), 0); c2 += 2;
564 vst1q_lane_u16((void*) c1, vreinterpretq_u16_s8(vout0x01234567_1x01234567), 4); c1 += 2;
565 vst1q_lane_u16((void*) c0, vreinterpretq_u16_s8(vout0x01234567_1x01234567), 0); c0 += 2;
566 vout2x01234567_3x01234567 = vextq_s8(vout2x01234567_3x01234567, vout2x01234567_3x01234567, 2);
567 vout0x01234567_1x01234567 = vextq_s8(vout0x01234567_1x01234567, vout0x01234567_1x01234567, 2);
568 }
569 if (nc & 1) {
570 vst1q_lane_s8(c3, vout2x01234567_3x01234567, 8);
571 vst1q_lane_s8(c2, vout2x01234567_3x01234567, 0);
572 vst1q_lane_s8(c1, vout0x01234567_1x01234567, 8);
573 vst1q_lane_s8(c0, vout0x01234567_1x01234567, 0);
574 }
575
576 nc = 0;
577 }
578 } while (nc != 0);
579 }
580