1*4bdc9457SAndroid Build Coastguard Worker// Copyright 2019 Google LLC 2*4bdc9457SAndroid Build Coastguard Worker// 3*4bdc9457SAndroid Build Coastguard Worker// This source code is licensed under the BSD-style license found in the 4*4bdc9457SAndroid Build Coastguard Worker// LICENSE file in the root directory of this source tree. 5*4bdc9457SAndroid Build Coastguard Worker 6*4bdc9457SAndroid Build Coastguard Worker$assert BATCH_TILE % 4 == 0 7*4bdc9457SAndroid Build Coastguard Worker$assert BATCH_TILE >= 4 8*4bdc9457SAndroid Build Coastguard Worker$assert DIV_ALGO in ["div", "nr2fma", "nr2recps", "nr1recps1fma"] 9*4bdc9457SAndroid Build Coastguard Worker$ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" 10*4bdc9457SAndroid Build Coastguard Worker$VMULADDQ_F32 = "vfmaq_f32" if FMA else "vmlaq_f32" 11*4bdc9457SAndroid Build Coastguard Worker#include <assert.h> 12*4bdc9457SAndroid Build Coastguard Worker 13*4bdc9457SAndroid Build Coastguard Worker#include <arm_neon.h> 14*4bdc9457SAndroid Build Coastguard Worker 15*4bdc9457SAndroid Build Coastguard Worker#include <xnnpack/common.h> 16*4bdc9457SAndroid Build Coastguard Worker#include <xnnpack/vunary.h> 17*4bdc9457SAndroid Build Coastguard Worker 18*4bdc9457SAndroid Build Coastguard Worker 19*4bdc9457SAndroid Build Coastguard Worker$PARAMS_STRUCT = "neonfma_rr1_p5" if FMA else "neon_rr2_p5" 20*4bdc9457SAndroid Build Coastguard Workervoid xnn_f32_vsigmoid_ukernel__${"neonfma" if FMA else "neon"}_rr${1 if FMA else 2}_p5_${DIV_ALGO}_x${BATCH_TILE}( 21*4bdc9457SAndroid Build Coastguard Worker size_t n, 22*4bdc9457SAndroid Build Coastguard Worker const float* x, 23*4bdc9457SAndroid Build Coastguard Worker float* y, 24*4bdc9457SAndroid Build Coastguard Worker const union xnn_f32_sigmoid_params params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS 25*4bdc9457SAndroid Build Coastguard Worker{ 26*4bdc9457SAndroid Build Coastguard Worker assert(n % sizeof(float) == 0); 27*4bdc9457SAndroid Build Coastguard Worker 28*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vmagic_bias = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.magic_bias); 29*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vminus_log2e = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.minus_log2e); 30*4bdc9457SAndroid Build Coastguard Worker $if FMA: 31*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vln2 = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.ln2); 32*4bdc9457SAndroid Build Coastguard Worker $else: 33*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vln2_hi = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.ln2_hi); 34*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vln2_lo = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.ln2_lo); 35*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vc5 = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.c5); 36*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vc4 = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.c4); 37*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vc3 = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.c3); 38*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vc2 = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.c2); 39*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vc1 = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.c1); 40*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vone = vmovq_n_f32(1.0f); 41*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vdenorm_cutoff = vld1q_dup_f32(¶ms->${PARAMS_STRUCT}.denorm_cutoff); 42*4bdc9457SAndroid Build Coastguard Worker 43*4bdc9457SAndroid Build Coastguard Worker $if BATCH_TILE > 4: 44*4bdc9457SAndroid Build Coastguard Worker for (; n >= ${BATCH_TILE} * sizeof(float); n -= ${BATCH_TILE} * sizeof(float)) { 45*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 46*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vx${ABC[N:N+4]} = vld1q_f32(x); x += 4; 47*4bdc9457SAndroid Build Coastguard Worker 48*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 49*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vz${ABC[N:N+4]} = vabsq_f32(vx${ABC[N:N+4]}); 50*4bdc9457SAndroid Build Coastguard Worker 51*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 52*4bdc9457SAndroid Build Coastguard Worker float32x4_t vn${ABC[N:N+4]} = ${VMULADDQ_F32}(vmagic_bias, vz${ABC[N:N+4]}, vminus_log2e); 53*4bdc9457SAndroid Build Coastguard Worker 54*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 55*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vs${ABC[N:N+4]} = vreinterpretq_f32_s32(vshlq_n_s32(vreinterpretq_s32_f32(vn${ABC[N:N+4]}), 23)); 56*4bdc9457SAndroid Build Coastguard Worker 57*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 58*4bdc9457SAndroid Build Coastguard Worker vn${ABC[N:N+4]} = vsubq_f32(vn${ABC[N:N+4]}, vmagic_bias); 59*4bdc9457SAndroid Build Coastguard Worker 60*4bdc9457SAndroid Build Coastguard Worker $if FMA: 61*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 62*4bdc9457SAndroid Build Coastguard Worker float32x4_t vt${ABC[N:N+4]} = ${VMULADDQ_F32}(vz${ABC[N:N+4]}, vn${ABC[N:N+4]}, vln2); 63*4bdc9457SAndroid Build Coastguard Worker $else: 64*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 65*4bdc9457SAndroid Build Coastguard Worker float32x4_t vt${ABC[N:N+4]} = ${VMULADDQ_F32}(vz${ABC[N:N+4]}, vn${ABC[N:N+4]}, vln2_hi); 66*4bdc9457SAndroid Build Coastguard Worker 67*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 68*4bdc9457SAndroid Build Coastguard Worker vt${ABC[N:N+4]} = ${VMULADDQ_F32}(vt${ABC[N:N+4]}, vn${ABC[N:N+4]}, vln2_lo); 69*4bdc9457SAndroid Build Coastguard Worker 70*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 71*4bdc9457SAndroid Build Coastguard Worker float32x4_t vp${ABC[N:N+4]} = ${VMULADDQ_F32}(vc4, vc5, vt${ABC[N:N+4]}); 72*4bdc9457SAndroid Build Coastguard Worker 73*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 74*4bdc9457SAndroid Build Coastguard Worker vp${ABC[N:N+4]} = ${VMULADDQ_F32}(vc3, vp${ABC[N:N+4]}, vt${ABC[N:N+4]}); 75*4bdc9457SAndroid Build Coastguard Worker 76*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 77*4bdc9457SAndroid Build Coastguard Worker vp${ABC[N:N+4]} = ${VMULADDQ_F32}(vc2, vp${ABC[N:N+4]}, vt${ABC[N:N+4]}); 78*4bdc9457SAndroid Build Coastguard Worker 79*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 80*4bdc9457SAndroid Build Coastguard Worker vp${ABC[N:N+4]} = ${VMULADDQ_F32}(vc1, vp${ABC[N:N+4]}, vt${ABC[N:N+4]}); 81*4bdc9457SAndroid Build Coastguard Worker 82*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 83*4bdc9457SAndroid Build Coastguard Worker vt${ABC[N:N+4]} = vmulq_f32(vt${ABC[N:N+4]}, vs${ABC[N:N+4]}); 84*4bdc9457SAndroid Build Coastguard Worker 85*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 86*4bdc9457SAndroid Build Coastguard Worker const float32x4_t ve${ABC[N:N+4]} = ${VMULADDQ_F32}(vs${ABC[N:N+4]}, vp${ABC[N:N+4]}, vt${ABC[N:N+4]}); 87*4bdc9457SAndroid Build Coastguard Worker 88*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 89*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vd${ABC[N:N+4]} = vaddq_f32(ve${ABC[N:N+4]}, vone); 90*4bdc9457SAndroid Build Coastguard Worker 91*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "div": 92*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 93*4bdc9457SAndroid Build Coastguard Worker float32x4_t vf${ABC[N:N+4]} = vdivq_f32(ve${ABC[N:N+4]}, vd${ABC[N:N+4]}); 94*4bdc9457SAndroid Build Coastguard Worker $else: 95*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 96*4bdc9457SAndroid Build Coastguard Worker float32x4_t vr${ABC[N:N+4]} = vrecpeq_f32(vd${ABC[N:N+4]}); 97*4bdc9457SAndroid Build Coastguard Worker 98*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "nr2fma": 99*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 100*4bdc9457SAndroid Build Coastguard Worker vr${ABC[N:N+4]} = vfmaq_f32(vr${ABC[N:N+4]}, vr${ABC[N:N+4]}, vfmsq_f32(vone, vr${ABC[N:N+4]}, vd${ABC[N:N+4]})); 101*4bdc9457SAndroid Build Coastguard Worker $else: 102*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 103*4bdc9457SAndroid Build Coastguard Worker vr${ABC[N:N+4]} = vmulq_f32(vr${ABC[N:N+4]}, vrecpsq_f32(vr${ABC[N:N+4]}, vd${ABC[N:N+4]})); 104*4bdc9457SAndroid Build Coastguard Worker 105*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "nr2recps": 106*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 107*4bdc9457SAndroid Build Coastguard Worker vr${ABC[N:N+4]} = vmulq_f32(vr${ABC[N:N+4]}, vrecpsq_f32(vr${ABC[N:N+4]}, vd${ABC[N:N+4]})); 108*4bdc9457SAndroid Build Coastguard Worker $else: 109*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 110*4bdc9457SAndroid Build Coastguard Worker vr${ABC[N:N+4]} = vfmaq_f32(vr${ABC[N:N+4]}, vr${ABC[N:N+4]}, vfmsq_f32(vone, vr${ABC[N:N+4]}, vd${ABC[N:N+4]})); 111*4bdc9457SAndroid Build Coastguard Worker 112*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 113*4bdc9457SAndroid Build Coastguard Worker float32x4_t vf${ABC[N:N+4]} = vmulq_f32(ve${ABC[N:N+4]}, vr${ABC[N:N+4]}); 114*4bdc9457SAndroid Build Coastguard Worker 115*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 116*4bdc9457SAndroid Build Coastguard Worker vf${ABC[N:N+4]} = vreinterpretq_f32_u32(vbicq_u32(vreinterpretq_u32_f32(vf${ABC[N:N+4]}), vcagtq_f32(vx${ABC[N:N+4]}, vdenorm_cutoff))); 117*4bdc9457SAndroid Build Coastguard Worker 118*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 119*4bdc9457SAndroid Build Coastguard Worker const uint32x4_t vm${ABC[N:N+4]} = vcltq_f32(vx${ABC[N:N+4]}, vmovq_n_f32(0.0f)); 120*4bdc9457SAndroid Build Coastguard Worker 121*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 122*4bdc9457SAndroid Build Coastguard Worker vf${ABC[N:N+4]} = vbslq_f32(vm${ABC[N:N+4]}, vf${ABC[N:N+4]}, vsubq_f32(vone, vf${ABC[N:N+4]})); 123*4bdc9457SAndroid Build Coastguard Worker 124*4bdc9457SAndroid Build Coastguard Worker $for N in range(0, BATCH_TILE, 4): 125*4bdc9457SAndroid Build Coastguard Worker vst1q_f32(y, vf${ABC[N:N+4]}); y += 4; 126*4bdc9457SAndroid Build Coastguard Worker } 127*4bdc9457SAndroid Build Coastguard Worker for (; n >= 4 * sizeof(float); n -= 4 * sizeof(float)) { 128*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vx = vld1q_f32(x); x += 4; 129*4bdc9457SAndroid Build Coastguard Worker 130*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vz = vabsq_f32(vx); 131*4bdc9457SAndroid Build Coastguard Worker 132*4bdc9457SAndroid Build Coastguard Worker float32x4_t vn = ${VMULADDQ_F32}(vmagic_bias, vz, vminus_log2e); 133*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vs = vreinterpretq_f32_s32(vshlq_n_s32(vreinterpretq_s32_f32(vn), 23)); 134*4bdc9457SAndroid Build Coastguard Worker vn = vsubq_f32(vn, vmagic_bias); 135*4bdc9457SAndroid Build Coastguard Worker $if FMA: 136*4bdc9457SAndroid Build Coastguard Worker float32x4_t vt = ${VMULADDQ_F32}(vz, vn, vln2); 137*4bdc9457SAndroid Build Coastguard Worker $else: 138*4bdc9457SAndroid Build Coastguard Worker float32x4_t vt = ${VMULADDQ_F32}(vz, vn, vln2_hi); 139*4bdc9457SAndroid Build Coastguard Worker vt = ${VMULADDQ_F32}(vt, vn, vln2_lo); 140*4bdc9457SAndroid Build Coastguard Worker 141*4bdc9457SAndroid Build Coastguard Worker float32x4_t vp = ${VMULADDQ_F32}(vc4, vc5, vt); 142*4bdc9457SAndroid Build Coastguard Worker vp = ${VMULADDQ_F32}(vc3, vp, vt); 143*4bdc9457SAndroid Build Coastguard Worker vp = ${VMULADDQ_F32}(vc2, vp, vt); 144*4bdc9457SAndroid Build Coastguard Worker vp = ${VMULADDQ_F32}(vc1, vp, vt); 145*4bdc9457SAndroid Build Coastguard Worker 146*4bdc9457SAndroid Build Coastguard Worker vt = vmulq_f32(vt, vs); 147*4bdc9457SAndroid Build Coastguard Worker const float32x4_t ve = ${VMULADDQ_F32}(vs, vp, vt); 148*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vd = vaddq_f32(ve, vone); 149*4bdc9457SAndroid Build Coastguard Worker 150*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "div": 151*4bdc9457SAndroid Build Coastguard Worker float32x4_t vf = vdivq_f32(ve, vd); 152*4bdc9457SAndroid Build Coastguard Worker $else: 153*4bdc9457SAndroid Build Coastguard Worker float32x4_t vr = vrecpeq_f32(vd); 154*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "nr2fma": 155*4bdc9457SAndroid Build Coastguard Worker vr = vfmaq_f32(vr, vr, vfmsq_f32(vone, vr, vd)); 156*4bdc9457SAndroid Build Coastguard Worker $else: 157*4bdc9457SAndroid Build Coastguard Worker vr = vmulq_f32(vr, vrecpsq_f32(vr, vd)); 158*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "nr2recps": 159*4bdc9457SAndroid Build Coastguard Worker vr = vmulq_f32(vr, vrecpsq_f32(vr, vd)); 160*4bdc9457SAndroid Build Coastguard Worker $else: 161*4bdc9457SAndroid Build Coastguard Worker vr = vfmaq_f32(vr, vr, vfmsq_f32(vone, vr, vd)); 162*4bdc9457SAndroid Build Coastguard Worker 163*4bdc9457SAndroid Build Coastguard Worker float32x4_t vf = vmulq_f32(ve, vr); 164*4bdc9457SAndroid Build Coastguard Worker vf = vreinterpretq_f32_u32(vbicq_u32(vreinterpretq_u32_f32(vf), vcagtq_f32(vx, vdenorm_cutoff))); 165*4bdc9457SAndroid Build Coastguard Worker const uint32x4_t vm = vcltq_f32(vx, vmovq_n_f32(0.0f)); 166*4bdc9457SAndroid Build Coastguard Worker vf = vbslq_f32(vm, vf, vsubq_f32(vone, vf)); 167*4bdc9457SAndroid Build Coastguard Worker 168*4bdc9457SAndroid Build Coastguard Worker vst1q_f32(y, vf); y += 4; 169*4bdc9457SAndroid Build Coastguard Worker } 170*4bdc9457SAndroid Build Coastguard Worker if XNN_UNLIKELY(n != 0) { 171*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vx = vld1q_f32(x); 172*4bdc9457SAndroid Build Coastguard Worker 173*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vz = vabsq_f32(vx); 174*4bdc9457SAndroid Build Coastguard Worker 175*4bdc9457SAndroid Build Coastguard Worker float32x4_t vn = ${VMULADDQ_F32}(vmagic_bias, vz, vminus_log2e); 176*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vs = vreinterpretq_f32_s32(vshlq_n_s32(vreinterpretq_s32_f32(vn), 23)); 177*4bdc9457SAndroid Build Coastguard Worker vn = vsubq_f32(vn, vmagic_bias); 178*4bdc9457SAndroid Build Coastguard Worker $if FMA: 179*4bdc9457SAndroid Build Coastguard Worker float32x4_t vt = ${VMULADDQ_F32}(vz, vn, vln2); 180*4bdc9457SAndroid Build Coastguard Worker $else: 181*4bdc9457SAndroid Build Coastguard Worker float32x4_t vt = ${VMULADDQ_F32}(vz, vn, vln2_hi); 182*4bdc9457SAndroid Build Coastguard Worker vt = ${VMULADDQ_F32}(vt, vn, vln2_lo); 183*4bdc9457SAndroid Build Coastguard Worker 184*4bdc9457SAndroid Build Coastguard Worker float32x4_t vp = ${VMULADDQ_F32}(vc4, vc5, vt); 185*4bdc9457SAndroid Build Coastguard Worker vp = ${VMULADDQ_F32}(vc3, vp, vt); 186*4bdc9457SAndroid Build Coastguard Worker vp = ${VMULADDQ_F32}(vc2, vp, vt); 187*4bdc9457SAndroid Build Coastguard Worker vp = ${VMULADDQ_F32}(vc1, vp, vt); 188*4bdc9457SAndroid Build Coastguard Worker 189*4bdc9457SAndroid Build Coastguard Worker vt = vmulq_f32(vt, vs); 190*4bdc9457SAndroid Build Coastguard Worker const float32x4_t ve = ${VMULADDQ_F32}(vs, vp, vt); 191*4bdc9457SAndroid Build Coastguard Worker const float32x4_t vd = vaddq_f32(ve, vone); 192*4bdc9457SAndroid Build Coastguard Worker 193*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "div": 194*4bdc9457SAndroid Build Coastguard Worker float32x4_t vf = vdivq_f32(ve, vd); 195*4bdc9457SAndroid Build Coastguard Worker $else: 196*4bdc9457SAndroid Build Coastguard Worker float32x4_t vr = vrecpeq_f32(vd); 197*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "nr2fma": 198*4bdc9457SAndroid Build Coastguard Worker vr = vfmaq_f32(vr, vr, vfmsq_f32(vone, vr, vd)); 199*4bdc9457SAndroid Build Coastguard Worker $else: 200*4bdc9457SAndroid Build Coastguard Worker vr = vmulq_f32(vr, vrecpsq_f32(vr, vd)); 201*4bdc9457SAndroid Build Coastguard Worker $if DIV_ALGO == "nr2recps": 202*4bdc9457SAndroid Build Coastguard Worker vr = vmulq_f32(vr, vrecpsq_f32(vr, vd)); 203*4bdc9457SAndroid Build Coastguard Worker $else: 204*4bdc9457SAndroid Build Coastguard Worker vr = vfmaq_f32(vr, vr, vfmsq_f32(vone, vr, vd)); 205*4bdc9457SAndroid Build Coastguard Worker 206*4bdc9457SAndroid Build Coastguard Worker float32x4_t vf = vmulq_f32(ve, vr); 207*4bdc9457SAndroid Build Coastguard Worker vf = vreinterpretq_f32_u32(vbicq_u32(vreinterpretq_u32_f32(vf), vcagtq_f32(vx, vdenorm_cutoff))); 208*4bdc9457SAndroid Build Coastguard Worker const uint32x4_t vm = vcltq_f32(vx, vmovq_n_f32(0.0f)); 209*4bdc9457SAndroid Build Coastguard Worker vf = vbslq_f32(vm, vf, vsubq_f32(vone, vf)); 210*4bdc9457SAndroid Build Coastguard Worker 211*4bdc9457SAndroid Build Coastguard Worker float32x2_t vf_lo = vget_low_f32(vf); 212*4bdc9457SAndroid Build Coastguard Worker if (n & (2 * sizeof(float))) { 213*4bdc9457SAndroid Build Coastguard Worker vst1_f32(y, vf_lo); y += 2; 214*4bdc9457SAndroid Build Coastguard Worker vf_lo = vget_high_f32(vf); 215*4bdc9457SAndroid Build Coastguard Worker } 216*4bdc9457SAndroid Build Coastguard Worker if (n & (1 * sizeof(float))) { 217*4bdc9457SAndroid Build Coastguard Worker vst1_lane_f32(y, vf_lo, 0); 218*4bdc9457SAndroid Build Coastguard Worker } 219*4bdc9457SAndroid Build Coastguard Worker } 220*4bdc9457SAndroid Build Coastguard Worker} 221