Debian Codegraph @

src/qd8-f16-qc8w-gemm/gen/qd8-f16-qc8w-gemm-6x8c4-minmax-neondotfp16arith.c

raw
1 // Auto-generated file. Do not edit!
2 // Template: src/qs8-gemm/c4-neondot.c.in
3 // Generator: tools/xngen
4 //
5 // Copyright 2020 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
17
18 void xnn_qd8_f16_qc8w_gemm_minmax_ukernel_6x8c4__neondotfp16arith(
19 size_t mr,
20 size_t nc,
21 size_t kc,
22 const int8_t* restrict a,
23 size_t a_stride,
24 const void* restrict w,
25 xnn_float16* restrict c,
26 size_t cm_stride,
27 size_t cn_stride,
28 const union xnn_f16_minmax_params params[restrict XNN_MIN_ELEMENTS(1)],
29 const struct xnn_qd8_quantization_params quantization_params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS
30 {
31 assert(mr != 0);
32 assert(mr <= 6);
33 assert(nc != 0);
34 assert(kc != 0);
35 assert(kc % sizeof(int8_t) == 0);
36 assert(a != NULL);
37 assert(w != NULL);
38 assert(c != NULL);
39
40 kc = round_up_po2(kc, 4 * sizeof(int8_t));
41 const int8_t* a0 = a;
42 uint16_t* c0 = (uint16_t*) c;
43 const int8_t* a1 = (const int8_t*) ((uintptr_t) a0 + a_stride);
44 uint16_t* c1 = (uint16_t*) ((uintptr_t) c0 + cm_stride);
45 if XNN_UNPREDICTABLE(mr < 2) {
46 a1 = a0;
47 c1 = c0;
48 }
49 const int8_t* a2 = (const int8_t*) ((uintptr_t) a1 + a_stride);
50 uint16_t* c2 = (uint16_t*) ((uintptr_t) c1 + cm_stride);
51 if XNN_UNPREDICTABLE(mr <= 2) {
52 a2 = a1;
53 c2 = c1;
54 }
55 const int8_t* a3 = (const int8_t*) ((uintptr_t) a2 + a_stride);
56 uint16_t* c3 = (uint16_t*) ((uintptr_t) c2 + cm_stride);
57 if XNN_UNPREDICTABLE(mr < 4) {
58 a3 = a2;
59 c3 = c2;
60 }
61 const int8_t* a4 = (const int8_t*) ((uintptr_t) a3 + a_stride);
62 uint16_t* c4 = (uint16_t*) ((uintptr_t) c3 + cm_stride);
63 if XNN_UNPREDICTABLE(mr <= 4) {
64 a4 = a3;
65 c4 = c3;
66 }
67 const int8_t* a5 = (const int8_t*) ((uintptr_t) a4 + a_stride);
68 uint16_t* c5 = (uint16_t*) ((uintptr_t) c4 + cm_stride);
69 if XNN_UNPREDICTABLE(mr != 6) {
70 a5 = a4;
71 c5 = c4;
72 }
73
74 // Loop over groups of 8 columns.
75 do {
76 // Initialize accumulators with bias. 8 bias values are loaded from the
77 // weight matrix, at the start of the group of 8 columns.
78 const int32x4_t vinput_zero_point01 = vld1q_s32(&quantization_params[0].zero_point);
79 const int32x4_t vksum0123 = vld1q_s32(w); w = (const int32_t*) w + 4;
80 int32x4_t vacc0x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point01), 0);
81 int32x4_t vacc1x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point01), 0);
82 const int32x4_t vksum4567 = vld1q_s32(w); w = (const int32_t*) w + 4;
83 int32x4_t vacc0x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point01), 0);
84 int32x4_t vacc1x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point01), 0);
85 const int32x4_t vinput_zero_point23 = vld1q_s32(&quantization_params[2].zero_point);
86 int32x4_t vacc2x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point23), 0);
87 int32x4_t vacc3x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point23), 0);
88 int32x4_t vacc2x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point23), 0);
89 int32x4_t vacc3x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point23), 0);
90 const int32x4_t vinput_zero_point45 = vld1q_s32(&quantization_params[4].zero_point);
91 int32x4_t vacc4x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point45), 0);
92 int32x4_t vacc5x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point45), 0);
93 int32x4_t vacc4x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point45), 0);
94 int32x4_t vacc5x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point45), 0);
95
96 // Inner accumulation loop along the 8 columns.
97 size_t k = kc;
98 // 2x partial unrolled loop to load 8 bytes at a time.
99 while (k >= 8 * sizeof(int8_t)) {
100 // Load a 6x8 block of activations.
101 const int8x8_t va0x01234567 = vld1_s8(a0); a0 += 8;
102 const int8x8_t va1x01234567 = vld1_s8(a1); a1 += 8;
103 const int8x8_t va2x01234567 = vld1_s8(a2); a2 += 8;
104 const int8x8_t va3x01234567 = vld1_s8(a3); a3 += 8;
105 const int8x8_t va4x01234567 = vld1_s8(a4); a4 += 8;
106 const int8x8_t va5x01234567 = vld1_s8(a5); a5 += 8;
107
108 // Load a 8x8 block of weights.
109 const int8x16_t vb0123x0123 = vld1q_s8(w); w = (const int8_t*) w + 16;
110 const int8x16_t vb0123x4567 = vld1q_s8(w); w = (const int8_t*) w + 16;
111 const int8x16_t vb4567x0123 = vld1q_s8(w); w = (const int8_t*) w + 16;
112 const int8x16_t vb4567x4567 = vld1q_s8(w); w = (const int8_t*) w + 16;
113
114 // Multiply-accumulate: 6x8 * 8x8 --> 6x8.
115 vacc0x0123 = vdotq_lane_s32(vacc0x0123, vb0123x0123, va0x01234567, 0);
116 vacc0x4567 = vdotq_lane_s32(vacc0x4567, vb0123x4567, va0x01234567, 0);
117 vacc1x0123 = vdotq_lane_s32(vacc1x0123, vb0123x0123, va1x01234567, 0);
118 vacc1x4567 = vdotq_lane_s32(vacc1x4567, vb0123x4567, va1x01234567, 0);
119 vacc2x0123 = vdotq_lane_s32(vacc2x0123, vb0123x0123, va2x01234567, 0);
120 vacc2x4567 = vdotq_lane_s32(vacc2x4567, vb0123x4567, va2x01234567, 0);
121 vacc3x0123 = vdotq_lane_s32(vacc3x0123, vb0123x0123, va3x01234567, 0);
122 vacc3x4567 = vdotq_lane_s32(vacc3x4567, vb0123x4567, va3x01234567, 0);
123 vacc4x0123 = vdotq_lane_s32(vacc4x0123, vb0123x0123, va4x01234567, 0);
124 vacc4x4567 = vdotq_lane_s32(vacc4x4567, vb0123x4567, va4x01234567, 0);
125 vacc5x0123 = vdotq_lane_s32(vacc5x0123, vb0123x0123, va5x01234567, 0);
126 vacc5x4567 = vdotq_lane_s32(vacc5x4567, vb0123x4567, va5x01234567, 0);
127 vacc0x0123 = vdotq_lane_s32(vacc0x0123, vb4567x0123, va0x01234567, 1);
128 vacc0x4567 = vdotq_lane_s32(vacc0x4567, vb4567x4567, va0x01234567, 1);
129 vacc1x0123 = vdotq_lane_s32(vacc1x0123, vb4567x0123, va1x01234567, 1);
130 vacc1x4567 = vdotq_lane_s32(vacc1x4567, vb4567x4567, va1x01234567, 1);
131 vacc2x0123 = vdotq_lane_s32(vacc2x0123, vb4567x0123, va2x01234567, 1);
132 vacc2x4567 = vdotq_lane_s32(vacc2x4567, vb4567x4567, va2x01234567, 1);
133 vacc3x0123 = vdotq_lane_s32(vacc3x0123, vb4567x0123, va3x01234567, 1);
134 vacc3x4567 = vdotq_lane_s32(vacc3x4567, vb4567x4567, va3x01234567, 1);
135 vacc4x0123 = vdotq_lane_s32(vacc4x0123, vb4567x0123, va4x01234567, 1);
136 vacc4x4567 = vdotq_lane_s32(vacc4x4567, vb4567x4567, va4x01234567, 1);
137 vacc5x0123 = vdotq_lane_s32(vacc5x0123, vb4567x0123, va5x01234567, 1);
138 vacc5x4567 = vdotq_lane_s32(vacc5x4567, vb4567x4567, va5x01234567, 1);
139
140 k -= 8 * sizeof(int8_t);
141 }
142 // Handle up to 4 final positions of `k`
143 if XNN_UNLIKELY(k != 0) {
144 // Load a 6x4 block of activations.
145 const int8x8_t va0x01234567 = vld1_s8(a0); a0 += 4;
146 const int8x8_t va1x01234567 = vld1_s8(a1); a1 += 4;
147 const int8x8_t va2x01234567 = vld1_s8(a2); a2 += 4;
148 const int8x8_t va3x01234567 = vld1_s8(a3); a3 += 4;
149 const int8x8_t va4x01234567 = vld1_s8(a4); a4 += 4;
150 const int8x8_t va5x01234567 = vld1_s8(a5); a5 += 4;
151
152 // Load a 4x8 block of weights.
153 const int8x16_t vb0123x0123 = vld1q_s8(w); w = (const int8_t*) w + 16;
154 const int8x16_t vb0123x4567 = vld1q_s8(w); w = (const int8_t*) w + 16;
155
156 // Multiply-accumulate: 6x4 * 4x8 --> 6x8.
157 vacc0x0123 = vdotq_lane_s32(vacc0x0123, vb0123x0123, va0x01234567, 0);
158 vacc0x4567 = vdotq_lane_s32(vacc0x4567, vb0123x4567, va0x01234567, 0);
159 vacc1x0123 = vdotq_lane_s32(vacc1x0123, vb0123x0123, va1x01234567, 0);
160 vacc1x4567 = vdotq_lane_s32(vacc1x4567, vb0123x4567, va1x01234567, 0);
161 vacc2x0123 = vdotq_lane_s32(vacc2x0123, vb0123x0123, va2x01234567, 0);
162 vacc2x4567 = vdotq_lane_s32(vacc2x4567, vb0123x4567, va2x01234567, 0);
163 vacc3x0123 = vdotq_lane_s32(vacc3x0123, vb0123x0123, va3x01234567, 0);
164 vacc3x4567 = vdotq_lane_s32(vacc3x4567, vb0123x4567, va3x01234567, 0);
165 vacc4x0123 = vdotq_lane_s32(vacc4x0123, vb0123x0123, va4x01234567, 0);
166 vacc4x4567 = vdotq_lane_s32(vacc4x4567, vb0123x4567, va4x01234567, 0);
167 vacc5x0123 = vdotq_lane_s32(vacc5x0123, vb0123x0123, va5x01234567, 0);
168 vacc5x4567 = vdotq_lane_s32(vacc5x4567, vb0123x4567, va5x01234567, 0);
169 }
170
171 float32x4_t vout0x0123 = vcvtq_f32_s32(vacc0x0123);
172 float32x4_t vout0x4567 = vcvtq_f32_s32(vacc0x4567);
173 float32x4_t vout1x0123 = vcvtq_f32_s32(vacc1x0123);
174 float32x4_t vout1x4567 = vcvtq_f32_s32(vacc1x4567);
175 float32x4_t vout2x0123 = vcvtq_f32_s32(vacc2x0123);
176 float32x4_t vout2x4567 = vcvtq_f32_s32(vacc2x4567);
177 float32x4_t vout3x0123 = vcvtq_f32_s32(vacc3x0123);
178 float32x4_t vout3x4567 = vcvtq_f32_s32(vacc3x4567);
179 float32x4_t vout4x0123 = vcvtq_f32_s32(vacc4x0123);
180 float32x4_t vout4x4567 = vcvtq_f32_s32(vacc4x4567);
181 float32x4_t vout5x0123 = vcvtq_f32_s32(vacc5x0123);
182 float32x4_t vout5x4567 = vcvtq_f32_s32(vacc5x4567);
183 const float32x4_t vinput_scale01 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[0].zero_point));
184 vout0x0123 = vmulq_lane_f32(vout0x0123, vget_low_f32(vinput_scale01), 1);
185 vout1x0123 = vmulq_lane_f32(vout1x0123, vget_high_f32(vinput_scale01), 1);
186 vout0x4567 = vmulq_lane_f32(vout0x4567, vget_low_f32(vinput_scale01), 1);
187 vout1x4567 = vmulq_lane_f32(vout1x4567, vget_high_f32(vinput_scale01), 1);
188 const float32x4_t vinput_scale23 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[2].zero_point));
189 vout2x0123 = vmulq_lane_f32(vout2x0123, vget_low_f32(vinput_scale23), 1);
190 vout3x0123 = vmulq_lane_f32(vout3x0123, vget_high_f32(vinput_scale23), 1);
191 vout2x4567 = vmulq_lane_f32(vout2x4567, vget_low_f32(vinput_scale23), 1);
192 vout3x4567 = vmulq_lane_f32(vout3x4567, vget_high_f32(vinput_scale23), 1);
193 const float32x4_t vinput_scale45 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[4].zero_point));
194 vout4x0123 = vmulq_lane_f32(vout4x0123, vget_low_f32(vinput_scale45), 1);
195 vout5x0123 = vmulq_lane_f32(vout5x0123, vget_high_f32(vinput_scale45), 1);
196 vout4x4567 = vmulq_lane_f32(vout4x4567, vget_low_f32(vinput_scale45), 1);
197 vout5x4567 = vmulq_lane_f32(vout5x4567, vget_high_f32(vinput_scale45), 1);
198
199 const float32x4_t vfilter_output_scale0123 = vld1q_f32(w); w = (const float*) w + 4;
200 const float32x4_t vfilter_output_scale4567 = vld1q_f32(w); w = (const float*) w + 4;
201
202 const float32x4_t vbias0123 = vld1q_f32(w); w = (const float*) w + 4;
203 #if XNN_ARCH_ARM64
204 vout0x0123 = vfmaq_f32(vbias0123, vout0x0123, vfilter_output_scale0123);
205 vout1x0123 = vfmaq_f32(vbias0123, vout1x0123, vfilter_output_scale0123);
206 vout2x0123 = vfmaq_f32(vbias0123, vout2x0123, vfilter_output_scale0123);
207 vout3x0123 = vfmaq_f32(vbias0123, vout3x0123, vfilter_output_scale0123);
208 vout4x0123 = vfmaq_f32(vbias0123, vout4x0123, vfilter_output_scale0123);
209 vout5x0123 = vfmaq_f32(vbias0123, vout5x0123, vfilter_output_scale0123);
210 #else
211 vout0x0123 = vmlaq_f32(vbias0123, vout0x0123, vfilter_output_scale0123);
212 vout1x0123 = vmlaq_f32(vbias0123, vout1x0123, vfilter_output_scale0123);
213 vout2x0123 = vmlaq_f32(vbias0123, vout2x0123, vfilter_output_scale0123);
214 vout3x0123 = vmlaq_f32(vbias0123, vout3x0123, vfilter_output_scale0123);
215 vout4x0123 = vmlaq_f32(vbias0123, vout4x0123, vfilter_output_scale0123);
216 vout5x0123 = vmlaq_f32(vbias0123, vout5x0123, vfilter_output_scale0123);
217 #endif
218 const float32x4_t vbias4567 = vld1q_f32(w); w = (const float*) w + 4;
219 #if XNN_ARCH_ARM64
220 vout0x4567 = vfmaq_f32(vbias4567, vout0x4567, vfilter_output_scale4567);
221 vout1x4567 = vfmaq_f32(vbias4567, vout1x4567, vfilter_output_scale4567);
222 vout2x4567 = vfmaq_f32(vbias4567, vout2x4567, vfilter_output_scale4567);
223 vout3x4567 = vfmaq_f32(vbias4567, vout3x4567, vfilter_output_scale4567);
224 vout4x4567 = vfmaq_f32(vbias4567, vout4x4567, vfilter_output_scale4567);
225 vout5x4567 = vfmaq_f32(vbias4567, vout5x4567, vfilter_output_scale4567);
226 #else
227 vout0x4567 = vmlaq_f32(vbias4567, vout0x4567, vfilter_output_scale4567);
228 vout1x4567 = vmlaq_f32(vbias4567, vout1x4567, vfilter_output_scale4567);
229 vout2x4567 = vmlaq_f32(vbias4567, vout2x4567, vfilter_output_scale4567);
230 vout3x4567 = vmlaq_f32(vbias4567, vout3x4567, vfilter_output_scale4567);
231 vout4x4567 = vmlaq_f32(vbias4567, vout4x4567, vfilter_output_scale4567);
232 vout5x4567 = vmlaq_f32(vbias4567, vout5x4567, vfilter_output_scale4567);
233 #endif
234
235 float16x8_t vfp16out0x01234567 = vcombine_f16(vcvt_f16_f32(vout0x0123), vcvt_f16_f32(vout0x4567));
236 float16x8_t vfp16out1x01234567 = vcombine_f16(vcvt_f16_f32(vout1x0123), vcvt_f16_f32(vout1x4567));
237 float16x8_t vfp16out2x01234567 = vcombine_f16(vcvt_f16_f32(vout2x0123), vcvt_f16_f32(vout2x4567));
238 float16x8_t vfp16out3x01234567 = vcombine_f16(vcvt_f16_f32(vout3x0123), vcvt_f16_f32(vout3x4567));
239 float16x8_t vfp16out4x01234567 = vcombine_f16(vcvt_f16_f32(vout4x0123), vcvt_f16_f32(vout4x4567));
240 float16x8_t vfp16out5x01234567 = vcombine_f16(vcvt_f16_f32(vout5x0123), vcvt_f16_f32(vout5x4567));
241
242 const float16x8_t voutput_min = vreinterpretq_f16_u16(vld1q_dup_u16((const uint16_t*) &params->scalar.min));
243 vfp16out0x01234567 = vmaxq_f16(vfp16out0x01234567, voutput_min);
244 vfp16out1x01234567 = vmaxq_f16(vfp16out1x01234567, voutput_min);
245 vfp16out2x01234567 = vmaxq_f16(vfp16out2x01234567, voutput_min);
246 vfp16out3x01234567 = vmaxq_f16(vfp16out3x01234567, voutput_min);
247 vfp16out4x01234567 = vmaxq_f16(vfp16out4x01234567, voutput_min);
248 vfp16out5x01234567 = vmaxq_f16(vfp16out5x01234567, voutput_min);
249 const float16x8_t voutput_max = vreinterpretq_f16_u16(vld1q_dup_u16((const uint16_t*) &params->scalar.max));
250 vfp16out0x01234567 = vminq_f16(vfp16out0x01234567, voutput_max);
251 vfp16out1x01234567 = vminq_f16(vfp16out1x01234567, voutput_max);
252 vfp16out2x01234567 = vminq_f16(vfp16out2x01234567, voutput_max);
253 vfp16out3x01234567 = vminq_f16(vfp16out3x01234567, voutput_max);
254 vfp16out4x01234567 = vminq_f16(vfp16out4x01234567, voutput_max);
255 vfp16out5x01234567 = vminq_f16(vfp16out5x01234567, voutput_max);
256 if XNN_LIKELY(nc >= 8) {
257 vst1q_u16(c0, vreinterpretq_u16_f16(vfp16out0x01234567));
258 vst1q_u16(c1, vreinterpretq_u16_f16(vfp16out1x01234567));
259 vst1q_u16(c2, vreinterpretq_u16_f16(vfp16out2x01234567));
260 vst1q_u16(c3, vreinterpretq_u16_f16(vfp16out3x01234567));
261 vst1q_u16(c4, vreinterpretq_u16_f16(vfp16out4x01234567));
262 vst1q_u16(c5, vreinterpretq_u16_f16(vfp16out5x01234567));
263
264 a0 = (const int8_t*) ((uintptr_t) a0 - kc);
265 a1 = (const int8_t*) ((uintptr_t) a1 - kc);
266 a2 = (const int8_t*) ((uintptr_t) a2 - kc);
267 a3 = (const int8_t*) ((uintptr_t) a3 - kc);
268 a4 = (const int8_t*) ((uintptr_t) a4 - kc);
269 a5 = (const int8_t*) ((uintptr_t) a5 - kc);
270
271 c0 = (uint16_t*) ((uintptr_t) c0 + cn_stride);
272 c1 = (uint16_t*) ((uintptr_t) c1 + cn_stride);
273 c2 = (uint16_t*) ((uintptr_t) c2 + cn_stride);
274 c3 = (uint16_t*) ((uintptr_t) c3 + cn_stride);
275 c4 = (uint16_t*) ((uintptr_t) c4 + cn_stride);
276 c5 = (uint16_t*) ((uintptr_t) c5 + cn_stride);
277
278 nc -= 8;
279 } else {
280 float16x4_t vfp16out0x0123 = vget_low_f16(vfp16out0x01234567);
281 float16x4_t vfp16out1x0123 = vget_low_f16(vfp16out1x01234567);
282 float16x4_t vfp16out2x0123 = vget_low_f16(vfp16out2x01234567);
283 float16x4_t vfp16out3x0123 = vget_low_f16(vfp16out3x01234567);
284 float16x4_t vfp16out4x0123 = vget_low_f16(vfp16out4x01234567);
285 float16x4_t vfp16out5x0123 = vget_low_f16(vfp16out5x01234567);
286 if (nc & 4) {
287 vst1_u16(c0, vreinterpret_u16_f16(vfp16out0x0123)); c0 += 4;
288 vst1_u16(c1, vreinterpret_u16_f16(vfp16out1x0123)); c1 += 4;
289 vst1_u16(c2, vreinterpret_u16_f16(vfp16out2x0123)); c2 += 4;
290 vst1_u16(c3, vreinterpret_u16_f16(vfp16out3x0123)); c3 += 4;
291 vst1_u16(c4, vreinterpret_u16_f16(vfp16out4x0123)); c4 += 4;
292 vst1_u16(c5, vreinterpret_u16_f16(vfp16out5x0123)); c5 += 4;
293 vfp16out0x0123 = vget_high_f16(vfp16out0x01234567);
294 vfp16out1x0123 = vget_high_f16(vfp16out1x01234567);
295 vfp16out2x0123 = vget_high_f16(vfp16out2x01234567);
296 vfp16out3x0123 = vget_high_f16(vfp16out3x01234567);
297 vfp16out4x0123 = vget_high_f16(vfp16out4x01234567);
298 vfp16out5x0123 = vget_high_f16(vfp16out5x01234567);
299 }
300 if (nc & 2) {
301 vst1_lane_u32((void*) c0, vreinterpret_u32_f16(vfp16out0x0123), 0); c0 += 2;
302 vst1_lane_u32((void*) c1, vreinterpret_u32_f16(vfp16out1x0123), 0); c1 += 2;
303 vst1_lane_u32((void*) c2, vreinterpret_u32_f16(vfp16out2x0123), 0); c2 += 2;
304 vst1_lane_u32((void*) c3, vreinterpret_u32_f16(vfp16out3x0123), 0); c3 += 2;
305 vst1_lane_u32((void*) c4, vreinterpret_u32_f16(vfp16out4x0123), 0); c4 += 2;
306 vst1_lane_u32((void*) c5, vreinterpret_u32_f16(vfp16out5x0123), 0); c5 += 2;
307 vfp16out0x0123 = vext_f16(vfp16out0x0123, vfp16out0x0123, 2);
308 vfp16out1x0123 = vext_f16(vfp16out1x0123, vfp16out1x0123, 2);
309 vfp16out2x0123 = vext_f16(vfp16out2x0123, vfp16out2x0123, 2);
310 vfp16out3x0123 = vext_f16(vfp16out3x0123, vfp16out3x0123, 2);
311 vfp16out4x0123 = vext_f16(vfp16out4x0123, vfp16out4x0123, 2);
312 vfp16out5x0123 = vext_f16(vfp16out5x0123, vfp16out5x0123, 2);
313 }
314 if (nc & 1) {
315 vst1_lane_u16(c0, vreinterpret_u16_f16(vfp16out0x0123), 0);
316 vst1_lane_u16(c1, vreinterpret_u16_f16(vfp16out1x0123), 0);
317 vst1_lane_u16(c2, vreinterpret_u16_f16(vfp16out2x0123), 0);
318 vst1_lane_u16(c3, vreinterpret_u16_f16(vfp16out3x0123), 0);
319 vst1_lane_u16(c4, vreinterpret_u16_f16(vfp16out4x0123), 0);
320 vst1_lane_u16(c5, vreinterpret_u16_f16(vfp16out5x0123), 0);
321 }
322 nc = 0;
323 }
324 } while (nc != 0);
325 }