diff options
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_bf16fp32_mmla_6x4VL/generic.cpp')
-rw-r--r-- | src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_bf16fp32_mmla_6x4VL/generic.cpp | 2227 |
1 files changed, 2227 insertions, 0 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_bf16fp32_mmla_6x4VL/generic.cpp b/src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_bf16fp32_mmla_6x4VL/generic.cpp new file mode 100644 index 0000000000..9136e32567 --- /dev/null +++ b/src/core/NEON/kernels/arm_gemm/kernels/sve_ffhybrid_bf16fp32_mmla_6x4VL/generic.cpp @@ -0,0 +1,2227 @@ +/* + * Copyright (c) 2022-2023 Arm Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#ifdef ARM_COMPUTE_ENABLE_SVE + +#include "arm_gemm.hpp" +#include "../../utils.hpp" +#include "../../bfloat.hpp" + +#include <cassert> +#include <limits> + +namespace arm_gemm { + +void sve_ffhybrid_bf16fp32_mmla_6x4VL ( + unsigned int num_strings, const unsigned int *string_lengths, IndirectInputArg<bfloat16> A_arg, + size_t M, size_t N, const bfloat16 *B_ptr, size_t B_stride, IndirectOutputArg<float> output_arg, + const float *bias, Activation act, bool accumulate +) +{ + struct KernelArgs { + float maxval = static_cast<float>(std::numeric_limits<float>::infinity()); + float minval = - static_cast<float>(std::numeric_limits<float>::infinity()); + unsigned int num_strings = {}; + const unsigned int *string_lengths = {}; + size_t N = {}; + const bfloat16 *B_ptr = {}; + const bfloat16 *cur_B_ptr = {}; + size_t B_stride = {}; + size_t output_offset = {}; + size_t input_initial_col = {}; + size_t input_offset = {}; + } ka; + + unsigned long flags=0; + void *output_ptr; + void *input_ptr; + + if (output_arg.is_indirect) { + output_ptr=(void *)(output_arg.indirect.ptr); + ka.output_offset=output_arg.indirect.offset; + flags |= 0x4; + } else { + output_ptr=(void *)(output_arg.direct.base); + ka.output_offset=output_arg.direct.stride; + } + + if (A_arg.is_indirect) { + input_ptr=(void *)(A_arg.indirect.ptr); + ka.input_offset=A_arg.indirect.start_row; + ka.input_initial_col=A_arg.indirect.start_col; + flags |= 0x8; + } else { + assert(num_strings==1); + input_ptr=(void *)(A_arg.direct.base); + ka.input_offset=A_arg.direct.stride; + } + if (accumulate) { + flags |= 0x1; + } + ka.num_strings = num_strings; + ka.string_lengths = string_lengths; + ka.N = N; + ka.B_ptr = B_ptr; + ka.B_stride = B_stride; + switch(act.type) { + default: + case Activation::Type::None: + break; + case Activation::Type::BoundedReLU: + ka.maxval = static_cast<float>(act.param1); + /* fall through */ + case Activation::Type::ReLU: + ka.minval = 0; + flags |= 0x2; + break; + } + __asm__ __volatile__( + "ptrue p5.b\n" + "1:" // Row loop + "cmp %x[M], #0x6\n" + "bge 71f\n" + "cmp %x[M], #0x4\n" + "bgt 57f\n" + "beq 43f\n" + "cmp %x[M], #0x2\n" + "bgt 29f\n" + "beq 15f\n" + "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" + "mov x15, %x[bias]\n" + "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "mov x13, %x[output_ptr]\n" + "2:" // Height 1: Column loop + "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" + "add x11, x12, x20, LSL #1\n" + "cntw x21, ALL, MUL #3\n" + "add x10, x11, x20, LSL #1\n" + "add x9, x10, x20, LSL #1\n" + "add x20, x9, x20, LSL #1\n" + "cmp x14, x21\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "bgt 3f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x9, x12\n" + "bgt 3f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x10, x12\n" + "bgt 3f\n" + "mov x11, x12\n" + "3:" // Height 1: B setup done + "mov x20, #0x0\n" + "whilelt p4.s, x20, x14\n" + "incw x20\n" + "whilelt p3.s, x20, x14\n" + "incw x20\n" + "whilelt p2.s, x20, x14\n" + "incw x20\n" + "whilelt p1.s, x20, x14\n" + "cbz x15, 4f\n" + "ld1w { z8.s }, p5/Z, [x15]\n" + "ld1w { z9.s }, p5/Z, [x15, #1, MUL VL]\n" + "zip2 z12.d, z8.d, z8.d\n" + "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p5/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p5/Z, [x15, #3, MUL VL]\n" + "zip2 z13.d, z9.d, z9.d\n" + "zip1 z9.d, z9.d, z9.d\n" + "zip2 z14.d, z10.d, z10.d\n" + "zip1 z10.d, z10.d, z10.d\n" + "addvl x15, x15, #4\n" + "zip2 z15.d, z11.d, z11.d\n" + "zip1 z11.d, z11.d, z11.d\n" + "b 6f\n" + "4:" // Height 1: no bias + "tbz %x[flags], #0, 5f\n" + "ld1w { z16.s }, p4/Z, [x13]\n" + "ld1w { z18.s }, p3/Z, [x13, #1, MUL VL]\n" + "zip1 z8.d, z16.d, z12.d\n" + "zip2 z12.d, z16.d, z12.d\n" + "ld1w { z17.s }, p2/Z, [x13, #2, MUL VL]\n" + "ld1w { z16.s }, p1/Z, [x13, #3, MUL VL]\n" + "zip1 z9.d, z18.d, z13.d\n" + "zip2 z13.d, z18.d, z13.d\n" + "zip1 z10.d, z17.d, z14.d\n" + "zip2 z14.d, z17.d, z14.d\n" + "zip1 z11.d, z16.d, z15.d\n" + "zip2 z15.d, z16.d, z15.d\n" + "b 6f\n" + "5:" // Height 1: no accumulate + "mov z8.b, #0x0\n" + "mov z9.b, #0x0\n" + "mov z10.b, #0x0\n" + "mov z11.b, #0x0\n" + "mov z12.b, #0x0\n" + "mov z13.b, #0x0\n" + "mov z14.b, #0x0\n" + "mov z15.b, #0x0\n" + "6:" // Height 1: setup done + "mov x28, #0x0\n" + "7:" // Height 1: String loop + "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" + "ldr w27, [x20, x28, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" + "tbz %x[flags], #3, 8f\n" + "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n" + "add x20, x20, x21, LSL #3\n" + "ldr x26, [x20, #0x0]\n" + "cbnz x28, 9f\n" + "ldr x20, [%x[args_ptr], %[offsetof_input_initial_col]]\n" + "add x26, x26, x20, LSL #1\n" + "b 9f\n" + "8:" // Height 1: setup direct input + "mov x26, %x[input_ptr]\n" + "9:" // Height 1: input setup done + "cmp x27, #0x8\n" + "ble 11f\n" + "10:" // Height 1: Multiply loop: Main loop head + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z20.h }, p0/Z, [x26]\n" + "trn1 z18.d, z20.d, z19.d\n" + "ld1h { z17.h }, p5/Z, [x12]\n" + "ld1h { z16.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6471e648 // bfmmla z8.s, z18.h, z17.h\n" + ".inst 0x6470e64c // bfmmla z12.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x11]\n" + "ld1h { z16.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6471e649 // bfmmla z9.s, z18.h, z17.h\n" + ".inst 0x6470e64d // bfmmla z13.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x10]\n" + "ld1h { z16.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6471e64a // bfmmla z10.s, z18.h, z17.h\n" + ".inst 0x6470e64e // bfmmla z14.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x9]\n" + "ld1h { z16.h }, p5/Z, [x9, #1, MUL VL]\n" + "trn2 z20.d, z20.d, z19.d\n" + ".inst 0x6471e64b // bfmmla z11.s, z18.h, z17.h\n" + ".inst 0x6470e64f // bfmmla z15.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x12, #2, MUL VL]\n" + "ld1h { z16.h }, p5/Z, [x12, #3, MUL VL]\n" + ".inst 0x6471e688 // bfmmla z8.s, z20.h, z17.h\n" + ".inst 0x6470e68c // bfmmla z12.s, z20.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x11, #2, MUL VL]\n" + "ld1h { z16.h }, p5/Z, [x11, #3, MUL VL]\n" + ".inst 0x6471e689 // bfmmla z9.s, z20.h, z17.h\n" + ".inst 0x6470e68d // bfmmla z13.s, z20.h, z16.h\n" + "ld1h { z16.h }, p5/Z, [x10, #2, MUL VL]\n" + "ld1h { z17.h }, p5/Z, [x10, #3, MUL VL]\n" + ".inst 0x6470e68a // bfmmla z10.s, z20.h, z16.h\n" + ".inst 0x6471e68e // bfmmla z14.s, z20.h, z17.h\n" + "ld1h { z17.h }, p5/Z, [x9, #2, MUL VL]\n" + "ld1h { z16.h }, p5/Z, [x9, #3, MUL VL]\n" + "sub x27, x27, #0x8\n" + "cmp x27, #0x8\n" + ".inst 0x6471e68b // bfmmla z11.s, z20.h, z17.h\n" + ".inst 0x6470e68f // bfmmla z15.s, z20.h, z16.h\n" + "add x26, x26, #0x10\n" + "addvl x12, x12, #4\n" + "addvl x11, x11, #4\n" + "addvl x10, x10, #4\n" + "addvl x9, x9, #4\n" + "bgt 10b\n" + "11:" // Height 1: Multiply loop: Single iteration only + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z1.h }, p0/Z, [x26]\n" + "trn1 z18.d, z1.d, z19.d\n" + "ld1h { z17.h }, p5/Z, [x12]\n" + "ld1h { z16.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6471e648 // bfmmla z8.s, z18.h, z17.h\n" + ".inst 0x6470e64c // bfmmla z12.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x11]\n" + "ld1h { z16.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6471e649 // bfmmla z9.s, z18.h, z17.h\n" + ".inst 0x6470e64d // bfmmla z13.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x10]\n" + "ld1h { z16.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6471e64a // bfmmla z10.s, z18.h, z17.h\n" + ".inst 0x6470e64e // bfmmla z14.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x9]\n" + "ld1h { z16.h }, p5/Z, [x9, #1, MUL VL]\n" + "subs x27, x27, #0x4\n" + "trn2 z1.d, z1.d, z19.d\n" + ".inst 0x6471e64b // bfmmla z11.s, z18.h, z17.h\n" + ".inst 0x6470e64f // bfmmla z15.s, z18.h, z16.h\n" + "addvl x12, x12, #2\n" + "addvl x11, x11, #2\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + "ble 12f\n" + "ld1h { z17.h }, p5/Z, [x12]\n" + "ld1h { z16.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6471e428 // bfmmla z8.s, z1.h, z17.h\n" + ".inst 0x6470e42c // bfmmla z12.s, z1.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x11]\n" + "ld1h { z16.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6471e429 // bfmmla z9.s, z1.h, z17.h\n" + ".inst 0x6470e42d // bfmmla z13.s, z1.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x10]\n" + "ld1h { z16.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6471e42a // bfmmla z10.s, z1.h, z17.h\n" + ".inst 0x6470e42e // bfmmla z14.s, z1.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x9]\n" + "ld1h { z16.h }, p5/Z, [x9, #1, MUL VL]\n" + ".inst 0x6471e42b // bfmmla z11.s, z1.h, z17.h\n" + ".inst 0x6470e42f // bfmmla z15.s, z1.h, z16.h\n" + "addvl x12, x12, #2\n" + "addvl x11, x11, #2\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + "12:" // Height 1: Multiply loop: multiply skip + "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" + "add x28, x28, #0x1\n" + "cmp x28, x20\n" + "bne 7b\n" + "uzp1 z8.d, z8.d, z12.d\n" + "uzp1 z9.d, z9.d, z13.d\n" + "uzp1 z10.d, z10.d, z14.d\n" + "uzp1 z11.d, z11.d, z15.d\n" + "tbz %x[flags], #1, 13f\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z21.s }, p5/Z, [x20]\n" + "add x20, %x[args_ptr], %[offset_min]\n" + "ld1rw { z16.s }, p5/Z, [x20]\n" + "fmin z8.s, p5/M, z8.s, z21.s\n" + "fmin z9.s, p5/M, z9.s, z21.s\n" + "fmin z10.s, p5/M, z10.s, z21.s\n" + "fmin z11.s, p5/M, z11.s, z21.s\n" + "fmax z8.s, p5/M, z8.s, z16.s\n" + "fmax z9.s, p5/M, z9.s, z16.s\n" + "fmax z10.s, p5/M, z10.s, z16.s\n" + "fmax z11.s, p5/M, z11.s, z16.s\n" + "13:" // Height 1: No activation + "st1w { z8.s }, p4, [x13]\n" + "st1w { z9.s }, p3, [x13, #1, MUL VL]\n" + "st1w { z10.s }, p2, [x13, #2, MUL VL]\n" + "st1w { z11.s }, p1, [x13, #3, MUL VL]\n" + "addvl x13, x13, #4\n" + "14:" // Height 1: Writeback done + "decw x14, ALL, MUL #4\n" + "cmp x14, XZR\n" + "bgt 2b\n" + "b 86f\n" + "15:" // Height 2 + "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" + "mov x15, %x[bias]\n" + "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "mov x13, %x[output_ptr]\n" + "16:" // Height 2: Column loop + "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" + "add x11, x12, x20, LSL #1\n" + "cntw x21, ALL, MUL #3\n" + "add x10, x11, x20, LSL #1\n" + "add x9, x10, x20, LSL #1\n" + "add x20, x9, x20, LSL #1\n" + "cmp x14, x21\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "bgt 17f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x9, x12\n" + "bgt 17f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x10, x12\n" + "bgt 17f\n" + "mov x11, x12\n" + "17:" // Height 2: B setup done + "mov x20, #0x0\n" + "whilelt p4.s, x20, x14\n" + "incw x20\n" + "whilelt p3.s, x20, x14\n" + "incw x20\n" + "whilelt p2.s, x20, x14\n" + "incw x20\n" + "whilelt p1.s, x20, x14\n" + "cbz x15, 18f\n" + "ld1w { z8.s }, p5/Z, [x15]\n" + "ld1w { z9.s }, p5/Z, [x15, #1, MUL VL]\n" + "zip2 z12.d, z8.d, z8.d\n" + "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p5/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p5/Z, [x15, #3, MUL VL]\n" + "zip2 z13.d, z9.d, z9.d\n" + "zip1 z9.d, z9.d, z9.d\n" + "zip2 z14.d, z10.d, z10.d\n" + "zip1 z10.d, z10.d, z10.d\n" + "addvl x15, x15, #4\n" + "zip2 z15.d, z11.d, z11.d\n" + "zip1 z11.d, z11.d, z11.d\n" + "b 20f\n" + "18:" // Height 2: no bias + "tbz %x[flags], #0, 19f\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x20, x13, x20, LSL #2\n" + "ld1w { z19.s }, p4/Z, [x13]\n" + "ld1w { z18.s }, p3/Z, [x13, #1, MUL VL]\n" + "ld1w { z17.s }, p2/Z, [x13, #2, MUL VL]\n" + "ld1w { z16.s }, p1/Z, [x13, #3, MUL VL]\n" + "ld1w { z12.s }, p4/Z, [x20]\n" + "zip1 z8.d, z19.d, z12.d\n" + "zip2 z12.d, z19.d, z12.d\n" + "ld1w { z13.s }, p3/Z, [x20, #1, MUL VL]\n" + "ld1w { z14.s }, p2/Z, [x20, #2, MUL VL]\n" + "zip1 z9.d, z18.d, z13.d\n" + "zip2 z13.d, z18.d, z13.d\n" + "ld1w { z15.s }, p1/Z, [x20, #3, MUL VL]\n" + "zip1 z10.d, z17.d, z14.d\n" + "zip2 z14.d, z17.d, z14.d\n" + "zip1 z11.d, z16.d, z15.d\n" + "zip2 z15.d, z16.d, z15.d\n" + "b 20f\n" + "19:" // Height 2: no accumulate + "mov z8.b, #0x0\n" + "mov z9.b, #0x0\n" + "mov z10.b, #0x0\n" + "mov z11.b, #0x0\n" + "mov z12.b, #0x0\n" + "mov z13.b, #0x0\n" + "mov z14.b, #0x0\n" + "mov z15.b, #0x0\n" + "20:" // Height 2: setup done + "mov x28, #0x0\n" + "21:" // Height 2: String loop + "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" + "ldr w27, [x20, x28, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" + "tbz %x[flags], #3, 22f\n" + "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n" + "add x20, x20, x21, LSL #3\n" + "ldr x26, [x20, #0x0]\n" + "ldr x25, [x20, #0x8]\n" + "cbnz x28, 23f\n" + "ldr x20, [%x[args_ptr], %[offsetof_input_initial_col]]\n" + "add x26, x26, x20, LSL #1\n" + "add x25, x25, x20, LSL #1\n" + "b 23f\n" + "22:" // Height 2: setup direct input + "mov x26, %x[input_ptr]\n" + "add x25, x26, x21, LSL #1\n" + "23:" // Height 2: input setup done + "cmp x27, #0x8\n" + "ble 25f\n" + "24:" // Height 2: Multiply loop: Main loop head + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z20.h }, p0/Z, [x26]\n" + "ld1rqh { z19.h }, p0/Z, [x25]\n" + "trn1 z18.d, z20.d, z19.d\n" + "ld1h { z17.h }, p5/Z, [x12]\n" + "ld1h { z16.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6471e648 // bfmmla z8.s, z18.h, z17.h\n" + ".inst 0x6470e64c // bfmmla z12.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x11]\n" + "ld1h { z16.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6471e649 // bfmmla z9.s, z18.h, z17.h\n" + ".inst 0x6470e64d // bfmmla z13.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x10]\n" + "ld1h { z16.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6471e64a // bfmmla z10.s, z18.h, z17.h\n" + ".inst 0x6470e64e // bfmmla z14.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x9]\n" + "ld1h { z16.h }, p5/Z, [x9, #1, MUL VL]\n" + "trn2 z20.d, z20.d, z19.d\n" + ".inst 0x6471e64b // bfmmla z11.s, z18.h, z17.h\n" + ".inst 0x6470e64f // bfmmla z15.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x12, #2, MUL VL]\n" + "ld1h { z16.h }, p5/Z, [x12, #3, MUL VL]\n" + ".inst 0x6471e688 // bfmmla z8.s, z20.h, z17.h\n" + ".inst 0x6470e68c // bfmmla z12.s, z20.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x11, #2, MUL VL]\n" + "ld1h { z16.h }, p5/Z, [x11, #3, MUL VL]\n" + ".inst 0x6471e689 // bfmmla z9.s, z20.h, z17.h\n" + ".inst 0x6470e68d // bfmmla z13.s, z20.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x10, #2, MUL VL]\n" + "ld1h { z16.h }, p5/Z, [x10, #3, MUL VL]\n" + ".inst 0x6471e68a // bfmmla z10.s, z20.h, z17.h\n" + ".inst 0x6470e68e // bfmmla z14.s, z20.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x9, #2, MUL VL]\n" + "ld1h { z16.h }, p5/Z, [x9, #3, MUL VL]\n" + "sub x27, x27, #0x8\n" + "cmp x27, #0x8\n" + ".inst 0x6471e68b // bfmmla z11.s, z20.h, z17.h\n" + ".inst 0x6470e68f // bfmmla z15.s, z20.h, z16.h\n" + "add x26, x26, #0x10\n" + "add x25, x25, #0x10\n" + "addvl x12, x12, #4\n" + "addvl x11, x11, #4\n" + "addvl x10, x10, #4\n" + "addvl x9, x9, #4\n" + "bgt 24b\n" + "25:" // Height 2: Multiply loop: Single iteration only + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z1.h }, p0/Z, [x26]\n" + "ld1rqh { z19.h }, p0/Z, [x25]\n" + "trn1 z18.d, z1.d, z19.d\n" + "ld1h { z17.h }, p5/Z, [x12]\n" + "ld1h { z16.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6471e648 // bfmmla z8.s, z18.h, z17.h\n" + ".inst 0x6470e64c // bfmmla z12.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x11]\n" + "ld1h { z16.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6471e649 // bfmmla z9.s, z18.h, z17.h\n" + ".inst 0x6470e64d // bfmmla z13.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x10]\n" + "ld1h { z16.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6471e64a // bfmmla z10.s, z18.h, z17.h\n" + ".inst 0x6470e64e // bfmmla z14.s, z18.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x9]\n" + "ld1h { z16.h }, p5/Z, [x9, #1, MUL VL]\n" + "subs x27, x27, #0x4\n" + "trn2 z1.d, z1.d, z19.d\n" + ".inst 0x6471e64b // bfmmla z11.s, z18.h, z17.h\n" + ".inst 0x6470e64f // bfmmla z15.s, z18.h, z16.h\n" + "addvl x12, x12, #2\n" + "addvl x11, x11, #2\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + "ble 26f\n" + "ld1h { z17.h }, p5/Z, [x12]\n" + "ld1h { z16.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6471e428 // bfmmla z8.s, z1.h, z17.h\n" + ".inst 0x6470e42c // bfmmla z12.s, z1.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x11]\n" + "ld1h { z16.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6471e429 // bfmmla z9.s, z1.h, z17.h\n" + ".inst 0x6470e42d // bfmmla z13.s, z1.h, z16.h\n" + "ld1h { z17.h }, p5/Z, [x10]\n" + "ld1h { z16.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6471e42a // bfmmla z10.s, z1.h, z17.h\n" + ".inst 0x6470e42e // bfmmla z14.s, z1.h, z16.h\n" + "ld1h { z22.h }, p5/Z, [x9]\n" + "ld1h { z16.h }, p5/Z, [x9, #1, MUL VL]\n" + ".inst 0x6476e42b // bfmmla z11.s, z1.h, z22.h\n" + ".inst 0x6470e42f // bfmmla z15.s, z1.h, z16.h\n" + "addvl x12, x12, #2\n" + "addvl x11, x11, #2\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + "26:" // Height 2: Multiply loop: multiply skip + "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" + "add x28, x28, #0x1\n" + "cmp x28, x20\n" + "bne 21b\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "uzp1 z7.d, z8.d, z12.d\n" + "uzp2 z8.d, z8.d, z12.d\n" + "add x25, x13, x20, LSL #2\n" + "uzp1 z12.d, z9.d, z13.d\n" + "uzp2 z9.d, z9.d, z13.d\n" + "uzp1 z13.d, z10.d, z14.d\n" + "uzp2 z10.d, z10.d, z14.d\n" + "uzp1 z14.d, z11.d, z15.d\n" + "uzp2 z11.d, z11.d, z15.d\n" + "tbz %x[flags], #1, 27f\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z17.s }, p5/Z, [x20]\n" + "add x20, %x[args_ptr], %[offset_min]\n" + "ld1rw { z16.s }, p5/Z, [x20]\n" + "fmin z7.s, p5/M, z7.s, z17.s\n" + "fmin z12.s, p5/M, z12.s, z17.s\n" + "fmin z13.s, p5/M, z13.s, z17.s\n" + "fmin z14.s, p5/M, z14.s, z17.s\n" + "fmin z8.s, p5/M, z8.s, z17.s\n" + "fmin z9.s, p5/M, z9.s, z17.s\n" + "fmin z10.s, p5/M, z10.s, z17.s\n" + "fmin z11.s, p5/M, z11.s, z17.s\n" + "fmax z7.s, p5/M, z7.s, z16.s\n" + "fmax z12.s, p5/M, z12.s, z16.s\n" + "fmax z13.s, p5/M, z13.s, z16.s\n" + "fmax z14.s, p5/M, z14.s, z16.s\n" + "fmax z8.s, p5/M, z8.s, z16.s\n" + "fmax z9.s, p5/M, z9.s, z16.s\n" + "fmax z10.s, p5/M, z10.s, z16.s\n" + "fmax z11.s, p5/M, z11.s, z16.s\n" + "27:" // Height 2: No activation + "st1w { z7.s }, p4, [x13]\n" + "st1w { z12.s }, p3, [x13, #1, MUL VL]\n" + "st1w { z13.s }, p2, [x13, #2, MUL VL]\n" + "st1w { z14.s }, p1, [x13, #3, MUL VL]\n" + "addvl x13, x13, #4\n" + "st1w { z8.s }, p4, [x25]\n" + "st1w { z9.s }, p3, [x25, #1, MUL VL]\n" + "st1w { z10.s }, p2, [x25, #2, MUL VL]\n" + "st1w { z11.s }, p1, [x25, #3, MUL VL]\n" + "28:" // Height 2: Writeback done + "decw x14, ALL, MUL #4\n" + "cmp x14, XZR\n" + "bgt 16b\n" + "b 86f\n" + "29:" // Height 3 + "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" + "mov x15, %x[bias]\n" + "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "mov x13, %x[output_ptr]\n" + "30:" // Height 3: Column loop + "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" + "add x11, x12, x20, LSL #1\n" + "cntw x21, ALL, MUL #3\n" + "add x10, x11, x20, LSL #1\n" + "add x9, x10, x20, LSL #1\n" + "add x20, x9, x20, LSL #1\n" + "cmp x14, x21\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "bgt 31f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x9, x12\n" + "bgt 31f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x10, x12\n" + "bgt 31f\n" + "mov x11, x12\n" + "31:" // Height 3: B setup done + "mov x20, #0x0\n" + "whilelt p4.s, x20, x14\n" + "incw x20\n" + "whilelt p3.s, x20, x14\n" + "incw x20\n" + "whilelt p2.s, x20, x14\n" + "incw x20\n" + "whilelt p1.s, x20, x14\n" + "cbz x15, 32f\n" + "ld1w { z8.s }, p5/Z, [x15]\n" + "ld1w { z9.s }, p5/Z, [x15, #1, MUL VL]\n" + "zip2 z12.d, z8.d, z8.d\n" + "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p5/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p5/Z, [x15, #3, MUL VL]\n" + "zip2 z13.d, z9.d, z9.d\n" + "zip1 z9.d, z9.d, z9.d\n" + "zip2 z14.d, z10.d, z10.d\n" + "zip1 z10.d, z10.d, z10.d\n" + "addvl x15, x15, #4\n" + "zip2 z15.d, z11.d, z11.d\n" + "zip1 z11.d, z11.d, z11.d\n" + "mov z16.d, z8.d\n" + "mov z20.d, z12.d\n" + "mov z17.d, z9.d\n" + "mov z21.d, z13.d\n" + "mov z18.d, z10.d\n" + "mov z22.d, z14.d\n" + "mov z19.d, z11.d\n" + "mov z23.d, z15.d\n" + "b 34f\n" + "32:" // Height 3: no bias + "tbz %x[flags], #0, 33f\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x21, x13, x20, LSL #2\n" + "add x20, x21, x20, LSL #2\n" + "ld1w { z19.s }, p4/Z, [x13]\n" + "ld1w { z17.s }, p3/Z, [x13, #1, MUL VL]\n" + "ld1w { z18.s }, p2/Z, [x13, #2, MUL VL]\n" + "ld1w { z16.s }, p1/Z, [x13, #3, MUL VL]\n" + "ld1w { z12.s }, p4/Z, [x21]\n" + "zip1 z8.d, z19.d, z12.d\n" + "zip2 z12.d, z19.d, z12.d\n" + "ld1w { z13.s }, p3/Z, [x21, #1, MUL VL]\n" + "ld1w { z14.s }, p2/Z, [x21, #2, MUL VL]\n" + "zip1 z9.d, z17.d, z13.d\n" + "zip2 z13.d, z17.d, z13.d\n" + "ld1w { z15.s }, p1/Z, [x21, #3, MUL VL]\n" + "ld1w { z17.s }, p4/Z, [x20]\n" + "zip1 z10.d, z18.d, z14.d\n" + "zip2 z14.d, z18.d, z14.d\n" + "ld1w { z18.s }, p3/Z, [x20, #1, MUL VL]\n" + "ld1w { z19.s }, p2/Z, [x20, #2, MUL VL]\n" + "zip1 z11.d, z16.d, z15.d\n" + "zip2 z15.d, z16.d, z15.d\n" + "ld1w { z24.s }, p1/Z, [x20, #3, MUL VL]\n" + "zip1 z16.d, z17.d, z20.d\n" + "zip2 z20.d, z17.d, z20.d\n" + "zip1 z17.d, z18.d, z21.d\n" + "zip2 z21.d, z18.d, z21.d\n" + "zip1 z18.d, z19.d, z22.d\n" + "zip2 z22.d, z19.d, z22.d\n" + "zip1 z19.d, z24.d, z23.d\n" + "zip2 z23.d, z24.d, z23.d\n" + "b 34f\n" + "33:" // Height 3: no accumulate + "mov z8.b, #0x0\n" + "mov z9.b, #0x0\n" + "mov z10.b, #0x0\n" + "mov z11.b, #0x0\n" + "mov z12.b, #0x0\n" + "mov z13.b, #0x0\n" + "mov z14.b, #0x0\n" + "mov z15.b, #0x0\n" + "mov z16.b, #0x0\n" + "mov z17.b, #0x0\n" + "mov z18.b, #0x0\n" + "mov z19.b, #0x0\n" + "mov z20.b, #0x0\n" + "mov z21.b, #0x0\n" + "mov z22.b, #0x0\n" + "mov z23.b, #0x0\n" + "34:" // Height 3: setup done + "mov x28, #0x0\n" + "35:" // Height 3: String loop + "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" + "ldr w27, [x20, x28, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" + "tbz %x[flags], #3, 36f\n" + "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n" + "add x20, x20, x21, LSL #3\n" + "ldr x26, [x20, #0x0]\n" + "ldr x25, [x20, #0x8]\n" + "ldr x24, [x20, #0x10]\n" + "cbnz x28, 37f\n" + "ldr x20, [%x[args_ptr], %[offsetof_input_initial_col]]\n" + "add x26, x26, x20, LSL #1\n" + "add x25, x25, x20, LSL #1\n" + "add x24, x24, x20, LSL #1\n" + "b 37f\n" + "36:" // Height 3: setup direct input + "mov x26, %x[input_ptr]\n" + "add x25, x26, x21, LSL #1\n" + "add x24, x25, x21, LSL #1\n" + "37:" // Height 3: input setup done + "cmp x27, #0x8\n" + "ble 39f\n" + "38:" // Height 3: Multiply loop: Main loop head + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z30.h }, p0/Z, [x26]\n" + "ld1rqh { z24.h }, p0/Z, [x25]\n" + "ld1rqh { z28.h }, p0/Z, [x24]\n" + "trn1 z27.d, z30.d, z24.d\n" + "trn2 z30.d, z30.d, z24.d\n" + "ld1h { z25.h }, p5/Z, [x12]\n" + "trn1 z26.d, z28.d, z29.d\n" + "ld1h { z24.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6479e768 // bfmmla z8.s, z27.h, z25.h\n" + ".inst 0x6479e750 // bfmmla z16.s, z26.h, z25.h\n" + ".inst 0x6478e76c // bfmmla z12.s, z27.h, z24.h\n" + ".inst 0x6478e754 // bfmmla z20.s, z26.h, z24.h\n" + "ld1h { z25.h }, p5/Z, [x11]\n" + "ld1h { z24.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6479e769 // bfmmla z9.s, z27.h, z25.h\n" + ".inst 0x6479e751 // bfmmla z17.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x10]\n" + "trn2 z28.d, z28.d, z29.d\n" + ".inst 0x6478e76d // bfmmla z13.s, z27.h, z24.h\n" + ".inst 0x6478e755 // bfmmla z21.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x10, #1, MUL VL]\n" + "sub x27, x27, #0x8\n" + ".inst 0x6479e76a // bfmmla z10.s, z27.h, z25.h\n" + ".inst 0x6479e752 // bfmmla z18.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x9]\n" + "cmp x27, #0x8\n" + ".inst 0x6478e76e // bfmmla z14.s, z27.h, z24.h\n" + ".inst 0x6478e756 // bfmmla z22.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x9, #1, MUL VL]\n" + "add x26, x26, #0x10\n" + ".inst 0x6479e76b // bfmmla z11.s, z27.h, z25.h\n" + ".inst 0x6479e753 // bfmmla z19.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x12, #2, MUL VL]\n" + "add x25, x25, #0x10\n" + ".inst 0x6478e76f // bfmmla z15.s, z27.h, z24.h\n" + ".inst 0x6478e757 // bfmmla z23.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x12, #3, MUL VL]\n" + "add x24, x24, #0x10\n" + ".inst 0x6479e7c8 // bfmmla z8.s, z30.h, z25.h\n" + ".inst 0x6479e790 // bfmmla z16.s, z28.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x11, #2, MUL VL]\n" + "addvl x12, x12, #4\n" + ".inst 0x6478e7cc // bfmmla z12.s, z30.h, z24.h\n" + ".inst 0x6478e794 // bfmmla z20.s, z28.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x11, #3, MUL VL]\n" + "addvl x11, x11, #4\n" + ".inst 0x6479e7c9 // bfmmla z9.s, z30.h, z25.h\n" + ".inst 0x6479e791 // bfmmla z17.s, z28.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x10, #2, MUL VL]\n" + ".inst 0x6478e7cd // bfmmla z13.s, z30.h, z24.h\n" + ".inst 0x6478e795 // bfmmla z21.s, z28.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x10, #3, MUL VL]\n" + "addvl x10, x10, #4\n" + ".inst 0x6479e7ca // bfmmla z10.s, z30.h, z25.h\n" + ".inst 0x6479e792 // bfmmla z18.s, z28.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x9, #2, MUL VL]\n" + ".inst 0x6478e7ce // bfmmla z14.s, z30.h, z24.h\n" + ".inst 0x6478e796 // bfmmla z22.s, z28.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x9, #3, MUL VL]\n" + "addvl x9, x9, #4\n" + ".inst 0x6479e7cb // bfmmla z11.s, z30.h, z25.h\n" + ".inst 0x6479e793 // bfmmla z19.s, z28.h, z25.h\n" + ".inst 0x6478e7cf // bfmmla z15.s, z30.h, z24.h\n" + ".inst 0x6478e797 // bfmmla z23.s, z28.h, z24.h\n" + "bgt 38b\n" + "39:" // Height 3: Multiply loop: Single iteration only + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z1.h }, p0/Z, [x26]\n" + "ld1rqh { z24.h }, p0/Z, [x25]\n" + "ld1rqh { z3.h }, p0/Z, [x24]\n" + "trn1 z27.d, z1.d, z24.d\n" + "trn2 z1.d, z1.d, z24.d\n" + "ld1h { z25.h }, p5/Z, [x12]\n" + "trn1 z26.d, z3.d, z28.d\n" + "ld1h { z24.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6479e768 // bfmmla z8.s, z27.h, z25.h\n" + ".inst 0x6479e750 // bfmmla z16.s, z26.h, z25.h\n" + ".inst 0x6478e76c // bfmmla z12.s, z27.h, z24.h\n" + ".inst 0x6478e754 // bfmmla z20.s, z26.h, z24.h\n" + "ld1h { z25.h }, p5/Z, [x11]\n" + "ld1h { z24.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6479e769 // bfmmla z9.s, z27.h, z25.h\n" + ".inst 0x6479e751 // bfmmla z17.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x10]\n" + "subs x27, x27, #0x4\n" + ".inst 0x6478e76d // bfmmla z13.s, z27.h, z24.h\n" + ".inst 0x6478e755 // bfmmla z21.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x10, #1, MUL VL]\n" + "trn2 z3.d, z3.d, z28.d\n" + ".inst 0x6479e76a // bfmmla z10.s, z27.h, z25.h\n" + ".inst 0x6479e752 // bfmmla z18.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x9]\n" + "addvl x12, x12, #2\n" + ".inst 0x6478e76e // bfmmla z14.s, z27.h, z24.h\n" + ".inst 0x6478e756 // bfmmla z22.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x9, #1, MUL VL]\n" + "addvl x11, x11, #2\n" + ".inst 0x6479e76b // bfmmla z11.s, z27.h, z25.h\n" + ".inst 0x6479e753 // bfmmla z19.s, z26.h, z25.h\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + ".inst 0x6478e76f // bfmmla z15.s, z27.h, z24.h\n" + ".inst 0x6478e757 // bfmmla z23.s, z26.h, z24.h\n" + "ble 40f\n" + "ld1h { z25.h }, p5/Z, [x12]\n" + "ld1h { z24.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6479e428 // bfmmla z8.s, z1.h, z25.h\n" + ".inst 0x6479e470 // bfmmla z16.s, z3.h, z25.h\n" + ".inst 0x6478e42c // bfmmla z12.s, z1.h, z24.h\n" + ".inst 0x6478e474 // bfmmla z20.s, z3.h, z24.h\n" + "ld1h { z25.h }, p5/Z, [x11]\n" + "ld1h { z24.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6479e429 // bfmmla z9.s, z1.h, z25.h\n" + ".inst 0x6479e471 // bfmmla z17.s, z3.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x10]\n" + "addvl x12, x12, #2\n" + ".inst 0x6478e42d // bfmmla z13.s, z1.h, z24.h\n" + ".inst 0x6478e475 // bfmmla z21.s, z3.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x10, #1, MUL VL]\n" + "addvl x11, x11, #2\n" + ".inst 0x6479e42a // bfmmla z10.s, z1.h, z25.h\n" + ".inst 0x6479e472 // bfmmla z18.s, z3.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x9]\n" + "addvl x10, x10, #2\n" + ".inst 0x6478e42e // bfmmla z14.s, z1.h, z24.h\n" + ".inst 0x6478e476 // bfmmla z22.s, z3.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x9, #1, MUL VL]\n" + "addvl x9, x9, #2\n" + ".inst 0x6479e42b // bfmmla z11.s, z1.h, z25.h\n" + ".inst 0x6479e473 // bfmmla z19.s, z3.h, z25.h\n" + ".inst 0x6478e42f // bfmmla z15.s, z1.h, z24.h\n" + ".inst 0x6478e477 // bfmmla z23.s, z3.h, z24.h\n" + "40:" // Height 3: Multiply loop: multiply skip + "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" + "add x28, x28, #0x1\n" + "cmp x28, x20\n" + "bne 35b\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x25, x13, x20, LSL #2\n" + "uzp1 z7.d, z8.d, z12.d\n" + "uzp2 z8.d, z8.d, z12.d\n" + "uzp1 z12.d, z9.d, z13.d\n" + "uzp2 z9.d, z9.d, z13.d\n" + "add x24, x25, x20, LSL #2\n" + "uzp1 z13.d, z10.d, z14.d\n" + "uzp2 z10.d, z10.d, z14.d\n" + "uzp1 z14.d, z11.d, z15.d\n" + "uzp2 z11.d, z11.d, z15.d\n" + "uzp1 z16.d, z16.d, z20.d\n" + "uzp1 z17.d, z17.d, z21.d\n" + "uzp1 z18.d, z18.d, z22.d\n" + "uzp1 z19.d, z19.d, z23.d\n" + "tbz %x[flags], #1, 41f\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z25.s }, p5/Z, [x20]\n" + "add x20, %x[args_ptr], %[offset_min]\n" + "ld1rw { z24.s }, p5/Z, [x20]\n" + "fmin z7.s, p5/M, z7.s, z25.s\n" + "fmin z12.s, p5/M, z12.s, z25.s\n" + "fmin z13.s, p5/M, z13.s, z25.s\n" + "fmin z14.s, p5/M, z14.s, z25.s\n" + "fmin z8.s, p5/M, z8.s, z25.s\n" + "fmin z9.s, p5/M, z9.s, z25.s\n" + "fmin z10.s, p5/M, z10.s, z25.s\n" + "fmin z11.s, p5/M, z11.s, z25.s\n" + "fmin z16.s, p5/M, z16.s, z25.s\n" + "fmin z17.s, p5/M, z17.s, z25.s\n" + "fmin z18.s, p5/M, z18.s, z25.s\n" + "fmin z19.s, p5/M, z19.s, z25.s\n" + "fmax z7.s, p5/M, z7.s, z24.s\n" + "fmax z12.s, p5/M, z12.s, z24.s\n" + "fmax z13.s, p5/M, z13.s, z24.s\n" + "fmax z14.s, p5/M, z14.s, z24.s\n" + "fmax z8.s, p5/M, z8.s, z24.s\n" + "fmax z9.s, p5/M, z9.s, z24.s\n" + "fmax z10.s, p5/M, z10.s, z24.s\n" + "fmax z11.s, p5/M, z11.s, z24.s\n" + "fmax z16.s, p5/M, z16.s, z24.s\n" + "fmax z17.s, p5/M, z17.s, z24.s\n" + "fmax z18.s, p5/M, z18.s, z24.s\n" + "fmax z19.s, p5/M, z19.s, z24.s\n" + "41:" // Height 3: No activation + "st1w { z7.s }, p4, [x13]\n" + "st1w { z12.s }, p3, [x13, #1, MUL VL]\n" + "st1w { z13.s }, p2, [x13, #2, MUL VL]\n" + "st1w { z14.s }, p1, [x13, #3, MUL VL]\n" + "addvl x13, x13, #4\n" + "st1w { z8.s }, p4, [x25]\n" + "st1w { z9.s }, p3, [x25, #1, MUL VL]\n" + "st1w { z10.s }, p2, [x25, #2, MUL VL]\n" + "st1w { z11.s }, p1, [x25, #3, MUL VL]\n" + "st1w { z16.s }, p4, [x24]\n" + "st1w { z17.s }, p3, [x24, #1, MUL VL]\n" + "st1w { z18.s }, p2, [x24, #2, MUL VL]\n" + "st1w { z19.s }, p1, [x24, #3, MUL VL]\n" + "42:" // Height 3: Writeback done + "decw x14, ALL, MUL #4\n" + "cmp x14, XZR\n" + "bgt 30b\n" + "b 86f\n" + "43:" // Height 4 + "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" + "mov x15, %x[bias]\n" + "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "mov x13, %x[output_ptr]\n" + "44:" // Height 4: Column loop + "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" + "add x11, x12, x20, LSL #1\n" + "cntw x21, ALL, MUL #3\n" + "add x10, x11, x20, LSL #1\n" + "add x9, x10, x20, LSL #1\n" + "add x20, x9, x20, LSL #1\n" + "cmp x14, x21\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "bgt 45f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x9, x12\n" + "bgt 45f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x10, x12\n" + "bgt 45f\n" + "mov x11, x12\n" + "45:" // Height 4: B setup done + "mov x20, #0x0\n" + "whilelt p4.s, x20, x14\n" + "incw x20\n" + "whilelt p3.s, x20, x14\n" + "incw x20\n" + "whilelt p2.s, x20, x14\n" + "incw x20\n" + "whilelt p1.s, x20, x14\n" + "cbz x15, 46f\n" + "ld1w { z8.s }, p5/Z, [x15]\n" + "ld1w { z9.s }, p5/Z, [x15, #1, MUL VL]\n" + "zip2 z12.d, z8.d, z8.d\n" + "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p5/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p5/Z, [x15, #3, MUL VL]\n" + "zip2 z13.d, z9.d, z9.d\n" + "zip1 z9.d, z9.d, z9.d\n" + "zip2 z14.d, z10.d, z10.d\n" + "zip1 z10.d, z10.d, z10.d\n" + "addvl x15, x15, #4\n" + "zip2 z15.d, z11.d, z11.d\n" + "zip1 z11.d, z11.d, z11.d\n" + "mov z16.d, z8.d\n" + "mov z20.d, z12.d\n" + "mov z17.d, z9.d\n" + "mov z21.d, z13.d\n" + "mov z18.d, z10.d\n" + "mov z22.d, z14.d\n" + "mov z19.d, z11.d\n" + "mov z23.d, z15.d\n" + "b 48f\n" + "46:" // Height 4: no bias + "tbz %x[flags], #0, 47f\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x22, x13, x20, LSL #2\n" + "add x21, x22, x20, LSL #2\n" + "ld1w { z19.s }, p4/Z, [x13]\n" + "add x20, x21, x20, LSL #2\n" + "ld1w { z17.s }, p3/Z, [x13, #1, MUL VL]\n" + "ld1w { z18.s }, p2/Z, [x13, #2, MUL VL]\n" + "ld1w { z16.s }, p1/Z, [x13, #3, MUL VL]\n" + "ld1w { z12.s }, p4/Z, [x22]\n" + "zip1 z8.d, z19.d, z12.d\n" + "zip2 z12.d, z19.d, z12.d\n" + "ld1w { z13.s }, p3/Z, [x22, #1, MUL VL]\n" + "ld1w { z14.s }, p2/Z, [x22, #2, MUL VL]\n" + "zip1 z9.d, z17.d, z13.d\n" + "zip2 z13.d, z17.d, z13.d\n" + "ld1w { z15.s }, p1/Z, [x22, #3, MUL VL]\n" + "ld1w { z17.s }, p4/Z, [x21]\n" + "zip1 z10.d, z18.d, z14.d\n" + "zip2 z14.d, z18.d, z14.d\n" + "ld1w { z18.s }, p3/Z, [x21, #1, MUL VL]\n" + "ld1w { z19.s }, p2/Z, [x21, #2, MUL VL]\n" + "zip1 z11.d, z16.d, z15.d\n" + "zip2 z15.d, z16.d, z15.d\n" + "ld1w { z24.s }, p1/Z, [x21, #3, MUL VL]\n" + "ld1w { z20.s }, p4/Z, [x20]\n" + "zip1 z16.d, z17.d, z20.d\n" + "zip2 z20.d, z17.d, z20.d\n" + "ld1w { z21.s }, p3/Z, [x20, #1, MUL VL]\n" + "ld1w { z22.s }, p2/Z, [x20, #2, MUL VL]\n" + "zip1 z17.d, z18.d, z21.d\n" + "zip2 z21.d, z18.d, z21.d\n" + "ld1w { z23.s }, p1/Z, [x20, #3, MUL VL]\n" + "zip1 z18.d, z19.d, z22.d\n" + "zip2 z22.d, z19.d, z22.d\n" + "zip1 z19.d, z24.d, z23.d\n" + "zip2 z23.d, z24.d, z23.d\n" + "b 48f\n" + "47:" // Height 4: no accumulate + "mov z8.b, #0x0\n" + "mov z9.b, #0x0\n" + "mov z10.b, #0x0\n" + "mov z11.b, #0x0\n" + "mov z12.b, #0x0\n" + "mov z13.b, #0x0\n" + "mov z14.b, #0x0\n" + "mov z15.b, #0x0\n" + "mov z16.b, #0x0\n" + "mov z17.b, #0x0\n" + "mov z18.b, #0x0\n" + "mov z19.b, #0x0\n" + "mov z20.b, #0x0\n" + "mov z21.b, #0x0\n" + "mov z22.b, #0x0\n" + "mov z23.b, #0x0\n" + "48:" // Height 4: setup done + "mov x28, #0x0\n" + "49:" // Height 4: String loop + "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" + "ldr w27, [x20, x28, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" + "tbz %x[flags], #3, 50f\n" + "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n" + "add x20, x20, x21, LSL #3\n" + "ldr x26, [x20, #0x0]\n" + "ldr x25, [x20, #0x8]\n" + "ldr x24, [x20, #0x10]\n" + "ldr x23, [x20, #0x18]\n" + "cbnz x28, 51f\n" + "ldr x20, [%x[args_ptr], %[offsetof_input_initial_col]]\n" + "add x26, x26, x20, LSL #1\n" + "add x25, x25, x20, LSL #1\n" + "add x24, x24, x20, LSL #1\n" + "add x23, x23, x20, LSL #1\n" + "b 51f\n" + "50:" // Height 4: setup direct input + "mov x26, %x[input_ptr]\n" + "add x25, x26, x21, LSL #1\n" + "add x24, x25, x21, LSL #1\n" + "add x23, x24, x21, LSL #1\n" + "51:" // Height 4: input setup done + "cmp x27, #0x8\n" + "ble 53f\n" + "52:" // Height 4: Multiply loop: Main loop head + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z30.h }, p0/Z, [x26]\n" + "ld1rqh { z24.h }, p0/Z, [x25]\n" + "trn1 z29.d, z30.d, z24.d\n" + "ld1rqh { z28.h }, p0/Z, [x24]\n" + "ld1rqh { z27.h }, p0/Z, [x23]\n" + "trn2 z30.d, z30.d, z24.d\n" + "trn1 z26.d, z28.d, z27.d\n" + "ld1h { z25.h }, p5/Z, [x12]\n" + "ld1h { z24.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6479e7a8 // bfmmla z8.s, z29.h, z25.h\n" + ".inst 0x6479e750 // bfmmla z16.s, z26.h, z25.h\n" + ".inst 0x6478e7ac // bfmmla z12.s, z29.h, z24.h\n" + ".inst 0x6478e754 // bfmmla z20.s, z26.h, z24.h\n" + "ld1h { z25.h }, p5/Z, [x11]\n" + "ld1h { z24.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6479e7a9 // bfmmla z9.s, z29.h, z25.h\n" + ".inst 0x6479e751 // bfmmla z17.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x10]\n" + "trn2 z28.d, z28.d, z27.d\n" + ".inst 0x6478e7ad // bfmmla z13.s, z29.h, z24.h\n" + ".inst 0x6478e755 // bfmmla z21.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x10, #1, MUL VL]\n" + "sub x27, x27, #0x8\n" + ".inst 0x6479e7aa // bfmmla z10.s, z29.h, z25.h\n" + ".inst 0x6479e752 // bfmmla z18.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x9]\n" + "cmp x27, #0x8\n" + ".inst 0x6478e7ae // bfmmla z14.s, z29.h, z24.h\n" + ".inst 0x6478e756 // bfmmla z22.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x9, #1, MUL VL]\n" + "add x26, x26, #0x10\n" + ".inst 0x6479e7ab // bfmmla z11.s, z29.h, z25.h\n" + ".inst 0x6479e753 // bfmmla z19.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x12, #2, MUL VL]\n" + "add x25, x25, #0x10\n" + ".inst 0x6478e7af // bfmmla z15.s, z29.h, z24.h\n" + ".inst 0x6478e757 // bfmmla z23.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x12, #3, MUL VL]\n" + "add x24, x24, #0x10\n" + ".inst 0x6479e7c8 // bfmmla z8.s, z30.h, z25.h\n" + ".inst 0x6479e790 // bfmmla z16.s, z28.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x11, #2, MUL VL]\n" + "add x23, x23, #0x10\n" + ".inst 0x6478e7cc // bfmmla z12.s, z30.h, z24.h\n" + ".inst 0x6478e794 // bfmmla z20.s, z28.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x11, #3, MUL VL]\n" + "addvl x12, x12, #4\n" + ".inst 0x6479e7c9 // bfmmla z9.s, z30.h, z25.h\n" + ".inst 0x6479e791 // bfmmla z17.s, z28.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x10, #2, MUL VL]\n" + "addvl x11, x11, #4\n" + ".inst 0x6478e7cd // bfmmla z13.s, z30.h, z24.h\n" + ".inst 0x6478e795 // bfmmla z21.s, z28.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x10, #3, MUL VL]\n" + "addvl x10, x10, #4\n" + ".inst 0x6479e7ca // bfmmla z10.s, z30.h, z25.h\n" + ".inst 0x6479e792 // bfmmla z18.s, z28.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x9, #2, MUL VL]\n" + ".inst 0x6478e7ce // bfmmla z14.s, z30.h, z24.h\n" + ".inst 0x6478e796 // bfmmla z22.s, z28.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x9, #3, MUL VL]\n" + "addvl x9, x9, #4\n" + ".inst 0x6479e7cb // bfmmla z11.s, z30.h, z25.h\n" + ".inst 0x6479e793 // bfmmla z19.s, z28.h, z25.h\n" + ".inst 0x6478e7cf // bfmmla z15.s, z30.h, z24.h\n" + ".inst 0x6478e797 // bfmmla z23.s, z28.h, z24.h\n" + "bgt 52b\n" + "53:" // Height 4: Multiply loop: Single iteration only + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z1.h }, p0/Z, [x26]\n" + "ld1rqh { z24.h }, p0/Z, [x25]\n" + "trn1 z28.d, z1.d, z24.d\n" + "ld1rqh { z3.h }, p0/Z, [x24]\n" + "ld1rqh { z27.h }, p0/Z, [x23]\n" + "trn2 z1.d, z1.d, z24.d\n" + "trn1 z26.d, z3.d, z27.d\n" + "ld1h { z25.h }, p5/Z, [x12]\n" + "ld1h { z24.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6479e788 // bfmmla z8.s, z28.h, z25.h\n" + ".inst 0x6479e750 // bfmmla z16.s, z26.h, z25.h\n" + ".inst 0x6478e78c // bfmmla z12.s, z28.h, z24.h\n" + ".inst 0x6478e754 // bfmmla z20.s, z26.h, z24.h\n" + "ld1h { z25.h }, p5/Z, [x11]\n" + "ld1h { z24.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6479e789 // bfmmla z9.s, z28.h, z25.h\n" + ".inst 0x6479e751 // bfmmla z17.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x10]\n" + "subs x27, x27, #0x4\n" + ".inst 0x6478e78d // bfmmla z13.s, z28.h, z24.h\n" + ".inst 0x6478e755 // bfmmla z21.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x10, #1, MUL VL]\n" + "trn2 z3.d, z3.d, z27.d\n" + ".inst 0x6479e78a // bfmmla z10.s, z28.h, z25.h\n" + ".inst 0x6479e752 // bfmmla z18.s, z26.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x9]\n" + "addvl x12, x12, #2\n" + ".inst 0x6478e78e // bfmmla z14.s, z28.h, z24.h\n" + ".inst 0x6478e756 // bfmmla z22.s, z26.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x9, #1, MUL VL]\n" + "addvl x11, x11, #2\n" + ".inst 0x6479e78b // bfmmla z11.s, z28.h, z25.h\n" + ".inst 0x6479e753 // bfmmla z19.s, z26.h, z25.h\n" + "addvl x10, x10, #2\n" + "addvl x9, x9, #2\n" + ".inst 0x6478e78f // bfmmla z15.s, z28.h, z24.h\n" + ".inst 0x6478e757 // bfmmla z23.s, z26.h, z24.h\n" + "ble 54f\n" + "ld1h { z25.h }, p5/Z, [x12]\n" + "ld1h { z24.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6479e428 // bfmmla z8.s, z1.h, z25.h\n" + ".inst 0x6479e470 // bfmmla z16.s, z3.h, z25.h\n" + ".inst 0x6478e42c // bfmmla z12.s, z1.h, z24.h\n" + ".inst 0x6478e474 // bfmmla z20.s, z3.h, z24.h\n" + "ld1h { z25.h }, p5/Z, [x11]\n" + "ld1h { z24.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6479e429 // bfmmla z9.s, z1.h, z25.h\n" + ".inst 0x6479e471 // bfmmla z17.s, z3.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x10]\n" + "addvl x12, x12, #2\n" + ".inst 0x6478e42d // bfmmla z13.s, z1.h, z24.h\n" + ".inst 0x6478e475 // bfmmla z21.s, z3.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x10, #1, MUL VL]\n" + "addvl x11, x11, #2\n" + ".inst 0x6479e42a // bfmmla z10.s, z1.h, z25.h\n" + ".inst 0x6479e472 // bfmmla z18.s, z3.h, z25.h\n" + "ld1h { z25.h }, p5/Z, [x9]\n" + "addvl x10, x10, #2\n" + ".inst 0x6478e42e // bfmmla z14.s, z1.h, z24.h\n" + ".inst 0x6478e476 // bfmmla z22.s, z3.h, z24.h\n" + "ld1h { z24.h }, p5/Z, [x9, #1, MUL VL]\n" + "addvl x9, x9, #2\n" + ".inst 0x6479e42b // bfmmla z11.s, z1.h, z25.h\n" + ".inst 0x6479e473 // bfmmla z19.s, z3.h, z25.h\n" + ".inst 0x6478e42f // bfmmla z15.s, z1.h, z24.h\n" + ".inst 0x6478e477 // bfmmla z23.s, z3.h, z24.h\n" + "54:" // Height 4: Multiply loop: multiply skip + "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" + "add x28, x28, #0x1\n" + "cmp x28, x20\n" + "bne 49b\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x25, x13, x20, LSL #2\n" + "add x24, x25, x20, LSL #2\n" + "uzp1 z7.d, z8.d, z12.d\n" + "uzp2 z8.d, z8.d, z12.d\n" + "uzp1 z12.d, z9.d, z13.d\n" + "add x23, x24, x20, LSL #2\n" + "uzp2 z9.d, z9.d, z13.d\n" + "uzp1 z13.d, z10.d, z14.d\n" + "uzp2 z10.d, z10.d, z14.d\n" + "uzp1 z14.d, z11.d, z15.d\n" + "uzp2 z11.d, z11.d, z15.d\n" + "uzp1 z15.d, z16.d, z20.d\n" + "uzp2 z16.d, z16.d, z20.d\n" + "uzp1 z20.d, z17.d, z21.d\n" + "uzp2 z17.d, z17.d, z21.d\n" + "uzp1 z21.d, z18.d, z22.d\n" + "uzp2 z18.d, z18.d, z22.d\n" + "uzp1 z22.d, z19.d, z23.d\n" + "uzp2 z19.d, z19.d, z23.d\n" + "tbz %x[flags], #1, 55f\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z24.s }, p5/Z, [x20]\n" + "add x20, %x[args_ptr], %[offset_min]\n" + "ld1rw { z23.s }, p5/Z, [x20]\n" + "fmin z7.s, p5/M, z7.s, z24.s\n" + "fmin z12.s, p5/M, z12.s, z24.s\n" + "fmin z13.s, p5/M, z13.s, z24.s\n" + "fmin z14.s, p5/M, z14.s, z24.s\n" + "fmin z8.s, p5/M, z8.s, z24.s\n" + "fmin z9.s, p5/M, z9.s, z24.s\n" + "fmin z10.s, p5/M, z10.s, z24.s\n" + "fmin z11.s, p5/M, z11.s, z24.s\n" + "fmin z15.s, p5/M, z15.s, z24.s\n" + "fmin z20.s, p5/M, z20.s, z24.s\n" + "fmin z21.s, p5/M, z21.s, z24.s\n" + "fmin z22.s, p5/M, z22.s, z24.s\n" + "fmin z16.s, p5/M, z16.s, z24.s\n" + "fmin z17.s, p5/M, z17.s, z24.s\n" + "fmin z18.s, p5/M, z18.s, z24.s\n" + "fmin z19.s, p5/M, z19.s, z24.s\n" + "fmax z7.s, p5/M, z7.s, z23.s\n" + "fmax z12.s, p5/M, z12.s, z23.s\n" + "fmax z13.s, p5/M, z13.s, z23.s\n" + "fmax z14.s, p5/M, z14.s, z23.s\n" + "fmax z8.s, p5/M, z8.s, z23.s\n" + "fmax z9.s, p5/M, z9.s, z23.s\n" + "fmax z10.s, p5/M, z10.s, z23.s\n" + "fmax z11.s, p5/M, z11.s, z23.s\n" + "fmax z15.s, p5/M, z15.s, z23.s\n" + "fmax z20.s, p5/M, z20.s, z23.s\n" + "fmax z21.s, p5/M, z21.s, z23.s\n" + "fmax z22.s, p5/M, z22.s, z23.s\n" + "fmax z16.s, p5/M, z16.s, z23.s\n" + "fmax z17.s, p5/M, z17.s, z23.s\n" + "fmax z18.s, p5/M, z18.s, z23.s\n" + "fmax z19.s, p5/M, z19.s, z23.s\n" + "55:" // Height 4: No activation + "st1w { z7.s }, p4, [x13]\n" + "st1w { z12.s }, p3, [x13, #1, MUL VL]\n" + "st1w { z13.s }, p2, [x13, #2, MUL VL]\n" + "st1w { z14.s }, p1, [x13, #3, MUL VL]\n" + "addvl x13, x13, #4\n" + "st1w { z8.s }, p4, [x25]\n" + "st1w { z9.s }, p3, [x25, #1, MUL VL]\n" + "st1w { z10.s }, p2, [x25, #2, MUL VL]\n" + "st1w { z11.s }, p1, [x25, #3, MUL VL]\n" + "st1w { z15.s }, p4, [x24]\n" + "st1w { z20.s }, p3, [x24, #1, MUL VL]\n" + "st1w { z21.s }, p2, [x24, #2, MUL VL]\n" + "st1w { z22.s }, p1, [x24, #3, MUL VL]\n" + "st1w { z16.s }, p4, [x23]\n" + "st1w { z17.s }, p3, [x23, #1, MUL VL]\n" + "st1w { z18.s }, p2, [x23, #2, MUL VL]\n" + "st1w { z19.s }, p1, [x23, #3, MUL VL]\n" + "56:" // Height 4: Writeback done + "decw x14, ALL, MUL #4\n" + "cmp x14, XZR\n" + "bgt 44b\n" + "b 86f\n" + "57:" // Height 5 + "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" + "mov x15, %x[bias]\n" + "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "mov x13, %x[output_ptr]\n" + "58:" // Height 5: Column loop + "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" + "add x11, x12, x20, LSL #1\n" + "cntw x21, ALL, MUL #3\n" + "add x10, x11, x20, LSL #1\n" + "add x9, x10, x20, LSL #1\n" + "add x20, x9, x20, LSL #1\n" + "cmp x14, x21\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "bgt 59f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x9, x12\n" + "bgt 59f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x10, x12\n" + "bgt 59f\n" + "mov x11, x12\n" + "59:" // Height 5: B setup done + "mov x20, #0x0\n" + "whilelt p4.s, x20, x14\n" + "incw x20\n" + "whilelt p3.s, x20, x14\n" + "incw x20\n" + "whilelt p2.s, x20, x14\n" + "incw x20\n" + "whilelt p1.s, x20, x14\n" + "cbz x15, 60f\n" + "ld1w { z8.s }, p5/Z, [x15]\n" + "ld1w { z9.s }, p5/Z, [x15, #1, MUL VL]\n" + "zip2 z12.d, z8.d, z8.d\n" + "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p5/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p5/Z, [x15, #3, MUL VL]\n" + "zip2 z13.d, z9.d, z9.d\n" + "zip1 z9.d, z9.d, z9.d\n" + "zip2 z14.d, z10.d, z10.d\n" + "zip1 z10.d, z10.d, z10.d\n" + "addvl x15, x15, #4\n" + "zip2 z15.d, z11.d, z11.d\n" + "zip1 z11.d, z11.d, z11.d\n" + "mov z16.d, z8.d\n" + "mov z20.d, z12.d\n" + "mov z17.d, z9.d\n" + "mov z21.d, z13.d\n" + "mov z18.d, z10.d\n" + "mov z22.d, z14.d\n" + "mov z19.d, z11.d\n" + "mov z23.d, z15.d\n" + "mov z24.d, z8.d\n" + "mov z28.d, z12.d\n" + "mov z25.d, z9.d\n" + "mov z29.d, z13.d\n" + "mov z26.d, z10.d\n" + "mov z30.d, z14.d\n" + "mov z27.d, z11.d\n" + "mov z31.d, z15.d\n" + "b 62f\n" + "60:" // Height 5: no bias + "tbz %x[flags], #0, 61f\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x23, x13, x20, LSL #2\n" + "add x22, x23, x20, LSL #2\n" + "ld1w { z19.s }, p4/Z, [x13]\n" + "add x21, x22, x20, LSL #2\n" + "add x20, x21, x20, LSL #2\n" + "ld1w { z17.s }, p3/Z, [x13, #1, MUL VL]\n" + "ld1w { z18.s }, p2/Z, [x13, #2, MUL VL]\n" + "ld1w { z16.s }, p1/Z, [x13, #3, MUL VL]\n" + "ld1w { z12.s }, p4/Z, [x23]\n" + "zip1 z8.d, z19.d, z12.d\n" + "zip2 z12.d, z19.d, z12.d\n" + "ld1w { z13.s }, p3/Z, [x23, #1, MUL VL]\n" + "ld1w { z14.s }, p2/Z, [x23, #2, MUL VL]\n" + "zip1 z9.d, z17.d, z13.d\n" + "zip2 z13.d, z17.d, z13.d\n" + "ld1w { z15.s }, p1/Z, [x23, #3, MUL VL]\n" + "ld1w { z17.s }, p4/Z, [x22]\n" + "zip1 z10.d, z18.d, z14.d\n" + "zip2 z14.d, z18.d, z14.d\n" + "ld1w { z18.s }, p3/Z, [x22, #1, MUL VL]\n" + "ld1w { z19.s }, p2/Z, [x22, #2, MUL VL]\n" + "zip1 z11.d, z16.d, z15.d\n" + "zip2 z15.d, z16.d, z15.d\n" + "ld1w { z24.s }, p1/Z, [x22, #3, MUL VL]\n" + "ld1w { z20.s }, p4/Z, [x21]\n" + "zip1 z16.d, z17.d, z20.d\n" + "zip2 z20.d, z17.d, z20.d\n" + "ld1w { z21.s }, p3/Z, [x21, #1, MUL VL]\n" + "ld1w { z22.s }, p2/Z, [x21, #2, MUL VL]\n" + "zip1 z17.d, z18.d, z21.d\n" + "zip2 z21.d, z18.d, z21.d\n" + "ld1w { z23.s }, p1/Z, [x21, #3, MUL VL]\n" + "ld1w { z25.s }, p4/Z, [x20]\n" + "zip1 z18.d, z19.d, z22.d\n" + "zip2 z22.d, z19.d, z22.d\n" + "ld1w { z26.s }, p3/Z, [x20, #1, MUL VL]\n" + "ld1w { z27.s }, p2/Z, [x20, #2, MUL VL]\n" + "zip1 z19.d, z24.d, z23.d\n" + "zip2 z23.d, z24.d, z23.d\n" + "ld1w { z0.s }, p1/Z, [x20, #3, MUL VL]\n" + "zip1 z24.d, z25.d, z28.d\n" + "zip2 z28.d, z25.d, z28.d\n" + "zip1 z25.d, z26.d, z29.d\n" + "zip2 z29.d, z26.d, z29.d\n" + "zip1 z26.d, z27.d, z30.d\n" + "zip2 z30.d, z27.d, z30.d\n" + "zip1 z27.d, z0.d, z31.d\n" + "zip2 z31.d, z0.d, z31.d\n" + "b 62f\n" + "61:" // Height 5: no accumulate + "mov z8.b, #0x0\n" + "mov z9.b, #0x0\n" + "mov z10.b, #0x0\n" + "mov z11.b, #0x0\n" + "mov z12.b, #0x0\n" + "mov z13.b, #0x0\n" + "mov z14.b, #0x0\n" + "mov z15.b, #0x0\n" + "mov z16.b, #0x0\n" + "mov z17.b, #0x0\n" + "mov z18.b, #0x0\n" + "mov z19.b, #0x0\n" + "mov z20.b, #0x0\n" + "mov z21.b, #0x0\n" + "mov z22.b, #0x0\n" + "mov z23.b, #0x0\n" + "mov z24.b, #0x0\n" + "mov z25.b, #0x0\n" + "mov z26.b, #0x0\n" + "mov z27.b, #0x0\n" + "mov z28.b, #0x0\n" + "mov z29.b, #0x0\n" + "mov z30.b, #0x0\n" + "mov z31.b, #0x0\n" + "62:" // Height 5: setup done + "mov x28, #0x0\n" + "63:" // Height 5: String loop + "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" + "ldr w27, [x20, x28, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" + "tbz %x[flags], #3, 64f\n" + "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n" + "add x20, x20, x21, LSL #3\n" + "ldr x26, [x20, #0x0]\n" + "ldr x25, [x20, #0x8]\n" + "ldr x24, [x20, #0x10]\n" + "ldr x23, [x20, #0x18]\n" + "ldr x22, [x20, #0x20]\n" + "cbnz x28, 65f\n" + "ldr x20, [%x[args_ptr], %[offsetof_input_initial_col]]\n" + "add x26, x26, x20, LSL #1\n" + "add x25, x25, x20, LSL #1\n" + "add x24, x24, x20, LSL #1\n" + "add x23, x23, x20, LSL #1\n" + "add x22, x22, x20, LSL #1\n" + "b 65f\n" + "64:" // Height 5: setup direct input + "mov x26, %x[input_ptr]\n" + "add x25, x26, x21, LSL #1\n" + "add x24, x25, x21, LSL #1\n" + "add x23, x24, x21, LSL #1\n" + "add x22, x23, x21, LSL #1\n" + "65:" // Height 5: input setup done + "cmp x27, #0x8\n" + "ble 67f\n" + "66:" // Height 5: Multiply loop: Main loop head + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z6.h }, p0/Z, [x26]\n" + "ld1rqh { z1.h }, p0/Z, [x25]\n" + "ld1rqh { z7.h }, p0/Z, [x24]\n" + "ld1rqh { z2.h }, p0/Z, [x23]\n" + "trn1 z5.d, z6.d, z1.d\n" + "trn2 z6.d, z6.d, z1.d\n" + "ld1rqh { z4.h }, p0/Z, [x22]\n" + "trn1 z3.d, z7.d, z2.d\n" + "trn2 z7.d, z7.d, z2.d\n" + "ld1h { z1.h }, p5/Z, [x12]\n" + "trn1 z2.d, z4.d, z0.d\n" + "trn2 z4.d, z4.d, z0.d\n" + "ld1h { z0.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6461e4a8 // bfmmla z8.s, z5.h, z1.h\n" + ".inst 0x6461e470 // bfmmla z16.s, z3.h, z1.h\n" + ".inst 0x6461e458 // bfmmla z24.s, z2.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x11]\n" + "sub x27, x27, #0x8\n" + ".inst 0x6460e4ac // bfmmla z12.s, z5.h, z0.h\n" + ".inst 0x6460e474 // bfmmla z20.s, z3.h, z0.h\n" + "cmp x27, #0x8\n" + "add x26, x26, #0x10\n" + ".inst 0x6460e45c // bfmmla z28.s, z2.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6461e4a9 // bfmmla z9.s, z5.h, z1.h\n" + "add x25, x25, #0x10\n" + ".inst 0x6461e471 // bfmmla z17.s, z3.h, z1.h\n" + ".inst 0x6461e459 // bfmmla z25.s, z2.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x10]\n" + "add x24, x24, #0x10\n" + ".inst 0x6460e4ad // bfmmla z13.s, z5.h, z0.h\n" + ".inst 0x6460e475 // bfmmla z21.s, z3.h, z0.h\n" + "add x23, x23, #0x10\n" + "add x22, x22, #0x10\n" + ".inst 0x6460e45d // bfmmla z29.s, z2.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6461e4aa // bfmmla z10.s, z5.h, z1.h\n" + ".inst 0x6461e472 // bfmmla z18.s, z3.h, z1.h\n" + ".inst 0x6461e45a // bfmmla z26.s, z2.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x9]\n" + ".inst 0x6460e4ae // bfmmla z14.s, z5.h, z0.h\n" + ".inst 0x6460e476 // bfmmla z22.s, z3.h, z0.h\n" + ".inst 0x6460e45e // bfmmla z30.s, z2.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x9, #1, MUL VL]\n" + ".inst 0x6461e4ab // bfmmla z11.s, z5.h, z1.h\n" + ".inst 0x6461e473 // bfmmla z19.s, z3.h, z1.h\n" + ".inst 0x6461e45b // bfmmla z27.s, z2.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x12, #2, MUL VL]\n" + ".inst 0x6460e4af // bfmmla z15.s, z5.h, z0.h\n" + ".inst 0x6460e477 // bfmmla z23.s, z3.h, z0.h\n" + ".inst 0x6460e45f // bfmmla z31.s, z2.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x12, #3, MUL VL]\n" + ".inst 0x6461e4c8 // bfmmla z8.s, z6.h, z1.h\n" + "addvl x12, x12, #4\n" + ".inst 0x6461e4f0 // bfmmla z16.s, z7.h, z1.h\n" + ".inst 0x6461e498 // bfmmla z24.s, z4.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x11, #2, MUL VL]\n" + ".inst 0x6460e4cc // bfmmla z12.s, z6.h, z0.h\n" + ".inst 0x6460e4f4 // bfmmla z20.s, z7.h, z0.h\n" + ".inst 0x6460e49c // bfmmla z28.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x11, #3, MUL VL]\n" + ".inst 0x6461e4c9 // bfmmla z9.s, z6.h, z1.h\n" + "addvl x11, x11, #4\n" + ".inst 0x6461e4f1 // bfmmla z17.s, z7.h, z1.h\n" + ".inst 0x6461e499 // bfmmla z25.s, z4.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x10, #2, MUL VL]\n" + ".inst 0x6460e4cd // bfmmla z13.s, z6.h, z0.h\n" + ".inst 0x6460e4f5 // bfmmla z21.s, z7.h, z0.h\n" + ".inst 0x6460e49d // bfmmla z29.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x10, #3, MUL VL]\n" + ".inst 0x6461e4ca // bfmmla z10.s, z6.h, z1.h\n" + "addvl x10, x10, #4\n" + ".inst 0x6461e4f2 // bfmmla z18.s, z7.h, z1.h\n" + ".inst 0x6461e49a // bfmmla z26.s, z4.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x9, #2, MUL VL]\n" + ".inst 0x6460e4ce // bfmmla z14.s, z6.h, z0.h\n" + ".inst 0x6460e4f6 // bfmmla z22.s, z7.h, z0.h\n" + ".inst 0x6460e49e // bfmmla z30.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x9, #3, MUL VL]\n" + ".inst 0x6461e4cb // bfmmla z11.s, z6.h, z1.h\n" + "addvl x9, x9, #4\n" + ".inst 0x6461e4f3 // bfmmla z19.s, z7.h, z1.h\n" + ".inst 0x6461e49b // bfmmla z27.s, z4.h, z1.h\n" + ".inst 0x6460e4cf // bfmmla z15.s, z6.h, z0.h\n" + ".inst 0x6460e4f7 // bfmmla z23.s, z7.h, z0.h\n" + ".inst 0x6460e49f // bfmmla z31.s, z4.h, z0.h\n" + "bgt 66b\n" + "67:" // Height 5: Multiply loop: Single iteration only + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z1.h }, p0/Z, [x26]\n" + "ld1rqh { z4.h }, p0/Z, [x25]\n" + "ld1rqh { z3.h }, p0/Z, [x24]\n" + "ld1rqh { z2.h }, p0/Z, [x23]\n" + "trn1 z7.d, z1.d, z4.d\n" + "trn2 z1.d, z1.d, z4.d\n" + "ld1rqh { z5.h }, p0/Z, [x22]\n" + "trn1 z6.d, z3.d, z2.d\n" + "trn2 z3.d, z3.d, z2.d\n" + "ld1h { z2.h }, p5/Z, [x12]\n" + "trn1 z4.d, z5.d, z0.d\n" + "trn2 z5.d, z5.d, z0.d\n" + "ld1h { z0.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6462e4e8 // bfmmla z8.s, z7.h, z2.h\n" + ".inst 0x6462e4d0 // bfmmla z16.s, z6.h, z2.h\n" + ".inst 0x6462e498 // bfmmla z24.s, z4.h, z2.h\n" + "ld1h { z2.h }, p5/Z, [x11]\n" + "subs x27, x27, #0x4\n" + ".inst 0x6460e4ec // bfmmla z12.s, z7.h, z0.h\n" + ".inst 0x6460e4d4 // bfmmla z20.s, z6.h, z0.h\n" + "addvl x12, x12, #2\n" + ".inst 0x6460e49c // bfmmla z28.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6462e4e9 // bfmmla z9.s, z7.h, z2.h\n" + "addvl x11, x11, #2\n" + ".inst 0x6462e4d1 // bfmmla z17.s, z6.h, z2.h\n" + ".inst 0x6462e499 // bfmmla z25.s, z4.h, z2.h\n" + "ld1h { z2.h }, p5/Z, [x10]\n" + ".inst 0x6460e4ed // bfmmla z13.s, z7.h, z0.h\n" + ".inst 0x6460e4d5 // bfmmla z21.s, z6.h, z0.h\n" + ".inst 0x6460e49d // bfmmla z29.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6462e4ea // bfmmla z10.s, z7.h, z2.h\n" + "addvl x10, x10, #2\n" + ".inst 0x6462e4d2 // bfmmla z18.s, z6.h, z2.h\n" + ".inst 0x6462e49a // bfmmla z26.s, z4.h, z2.h\n" + "ld1h { z2.h }, p5/Z, [x9]\n" + ".inst 0x6460e4ee // bfmmla z14.s, z7.h, z0.h\n" + ".inst 0x6460e4d6 // bfmmla z22.s, z6.h, z0.h\n" + ".inst 0x6460e49e // bfmmla z30.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x9, #1, MUL VL]\n" + ".inst 0x6462e4eb // bfmmla z11.s, z7.h, z2.h\n" + "addvl x9, x9, #2\n" + ".inst 0x6462e4d3 // bfmmla z19.s, z6.h, z2.h\n" + ".inst 0x6462e49b // bfmmla z27.s, z4.h, z2.h\n" + ".inst 0x6460e4ef // bfmmla z15.s, z7.h, z0.h\n" + ".inst 0x6460e4d7 // bfmmla z23.s, z6.h, z0.h\n" + ".inst 0x6460e49f // bfmmla z31.s, z4.h, z0.h\n" + "ble 68f\n" + "ld1h { z2.h }, p5/Z, [x12]\n" + "ld1h { z0.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6462e428 // bfmmla z8.s, z1.h, z2.h\n" + ".inst 0x6462e470 // bfmmla z16.s, z3.h, z2.h\n" + ".inst 0x6462e4b8 // bfmmla z24.s, z5.h, z2.h\n" + ".inst 0x6460e42c // bfmmla z12.s, z1.h, z0.h\n" + "ld1h { z2.h }, p5/Z, [x11]\n" + "addvl x12, x12, #2\n" + ".inst 0x6460e474 // bfmmla z20.s, z3.h, z0.h\n" + ".inst 0x6460e4bc // bfmmla z28.s, z5.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x11, #1, MUL VL]\n" + "addvl x11, x11, #2\n" + ".inst 0x6462e429 // bfmmla z9.s, z1.h, z2.h\n" + ".inst 0x6462e471 // bfmmla z17.s, z3.h, z2.h\n" + ".inst 0x6462e4b9 // bfmmla z25.s, z5.h, z2.h\n" + ".inst 0x6460e42d // bfmmla z13.s, z1.h, z0.h\n" + "ld1h { z2.h }, p5/Z, [x10]\n" + ".inst 0x6460e475 // bfmmla z21.s, z3.h, z0.h\n" + ".inst 0x6460e4bd // bfmmla z29.s, z5.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x10, #1, MUL VL]\n" + "addvl x10, x10, #2\n" + ".inst 0x6462e42a // bfmmla z10.s, z1.h, z2.h\n" + ".inst 0x6462e472 // bfmmla z18.s, z3.h, z2.h\n" + ".inst 0x6462e4ba // bfmmla z26.s, z5.h, z2.h\n" + ".inst 0x6460e42e // bfmmla z14.s, z1.h, z0.h\n" + "ld1h { z2.h }, p5/Z, [x9]\n" + ".inst 0x6460e476 // bfmmla z22.s, z3.h, z0.h\n" + ".inst 0x6460e4be // bfmmla z30.s, z5.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x9, #1, MUL VL]\n" + "addvl x9, x9, #2\n" + ".inst 0x6462e42b // bfmmla z11.s, z1.h, z2.h\n" + ".inst 0x6462e473 // bfmmla z19.s, z3.h, z2.h\n" + ".inst 0x6462e4bb // bfmmla z27.s, z5.h, z2.h\n" + ".inst 0x6460e42f // bfmmla z15.s, z1.h, z0.h\n" + ".inst 0x6460e477 // bfmmla z23.s, z3.h, z0.h\n" + ".inst 0x6460e4bf // bfmmla z31.s, z5.h, z0.h\n" + "68:" // Height 5: Multiply loop: multiply skip + "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" + "add x28, x28, #0x1\n" + "cmp x28, x20\n" + "bne 63b\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x25, x13, x20, LSL #2\n" + "add x24, x25, x20, LSL #2\n" + "uzp1 z7.d, z8.d, z12.d\n" + "add x23, x24, x20, LSL #2\n" + "uzp2 z8.d, z8.d, z12.d\n" + "uzp1 z12.d, z9.d, z13.d\n" + "add x22, x23, x20, LSL #2\n" + "uzp2 z9.d, z9.d, z13.d\n" + "uzp1 z13.d, z10.d, z14.d\n" + "uzp2 z10.d, z10.d, z14.d\n" + "uzp1 z14.d, z11.d, z15.d\n" + "uzp2 z11.d, z11.d, z15.d\n" + "uzp1 z15.d, z16.d, z20.d\n" + "uzp2 z16.d, z16.d, z20.d\n" + "uzp1 z20.d, z17.d, z21.d\n" + "uzp2 z17.d, z17.d, z21.d\n" + "uzp1 z21.d, z18.d, z22.d\n" + "uzp2 z18.d, z18.d, z22.d\n" + "uzp1 z22.d, z19.d, z23.d\n" + "uzp2 z19.d, z19.d, z23.d\n" + "uzp1 z24.d, z24.d, z28.d\n" + "uzp1 z25.d, z25.d, z29.d\n" + "uzp1 z26.d, z26.d, z30.d\n" + "uzp1 z27.d, z27.d, z31.d\n" + "tbz %x[flags], #1, 69f\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z0.s }, p5/Z, [x20]\n" + "add x20, %x[args_ptr], %[offset_min]\n" + "ld1rw { z23.s }, p5/Z, [x20]\n" + "fmin z7.s, p5/M, z7.s, z0.s\n" + "fmin z12.s, p5/M, z12.s, z0.s\n" + "fmin z13.s, p5/M, z13.s, z0.s\n" + "fmin z14.s, p5/M, z14.s, z0.s\n" + "fmin z8.s, p5/M, z8.s, z0.s\n" + "fmin z9.s, p5/M, z9.s, z0.s\n" + "fmin z10.s, p5/M, z10.s, z0.s\n" + "fmin z11.s, p5/M, z11.s, z0.s\n" + "fmin z15.s, p5/M, z15.s, z0.s\n" + "fmin z20.s, p5/M, z20.s, z0.s\n" + "fmin z21.s, p5/M, z21.s, z0.s\n" + "fmin z22.s, p5/M, z22.s, z0.s\n" + "fmin z16.s, p5/M, z16.s, z0.s\n" + "fmin z17.s, p5/M, z17.s, z0.s\n" + "fmin z18.s, p5/M, z18.s, z0.s\n" + "fmin z19.s, p5/M, z19.s, z0.s\n" + "fmin z24.s, p5/M, z24.s, z0.s\n" + "fmin z25.s, p5/M, z25.s, z0.s\n" + "fmin z26.s, p5/M, z26.s, z0.s\n" + "fmin z27.s, p5/M, z27.s, z0.s\n" + "fmax z7.s, p5/M, z7.s, z23.s\n" + "fmax z12.s, p5/M, z12.s, z23.s\n" + "fmax z13.s, p5/M, z13.s, z23.s\n" + "fmax z14.s, p5/M, z14.s, z23.s\n" + "fmax z8.s, p5/M, z8.s, z23.s\n" + "fmax z9.s, p5/M, z9.s, z23.s\n" + "fmax z10.s, p5/M, z10.s, z23.s\n" + "fmax z11.s, p5/M, z11.s, z23.s\n" + "fmax z15.s, p5/M, z15.s, z23.s\n" + "fmax z20.s, p5/M, z20.s, z23.s\n" + "fmax z21.s, p5/M, z21.s, z23.s\n" + "fmax z22.s, p5/M, z22.s, z23.s\n" + "fmax z16.s, p5/M, z16.s, z23.s\n" + "fmax z17.s, p5/M, z17.s, z23.s\n" + "fmax z18.s, p5/M, z18.s, z23.s\n" + "fmax z19.s, p5/M, z19.s, z23.s\n" + "fmax z24.s, p5/M, z24.s, z23.s\n" + "fmax z25.s, p5/M, z25.s, z23.s\n" + "fmax z26.s, p5/M, z26.s, z23.s\n" + "fmax z27.s, p5/M, z27.s, z23.s\n" + "69:" // Height 5: No activation + "st1w { z7.s }, p4, [x13]\n" + "st1w { z12.s }, p3, [x13, #1, MUL VL]\n" + "st1w { z13.s }, p2, [x13, #2, MUL VL]\n" + "st1w { z14.s }, p1, [x13, #3, MUL VL]\n" + "addvl x13, x13, #4\n" + "st1w { z8.s }, p4, [x25]\n" + "st1w { z9.s }, p3, [x25, #1, MUL VL]\n" + "st1w { z10.s }, p2, [x25, #2, MUL VL]\n" + "st1w { z11.s }, p1, [x25, #3, MUL VL]\n" + "st1w { z15.s }, p4, [x24]\n" + "st1w { z20.s }, p3, [x24, #1, MUL VL]\n" + "st1w { z21.s }, p2, [x24, #2, MUL VL]\n" + "st1w { z22.s }, p1, [x24, #3, MUL VL]\n" + "st1w { z16.s }, p4, [x23]\n" + "st1w { z17.s }, p3, [x23, #1, MUL VL]\n" + "st1w { z18.s }, p2, [x23, #2, MUL VL]\n" + "st1w { z19.s }, p1, [x23, #3, MUL VL]\n" + "st1w { z24.s }, p4, [x22]\n" + "st1w { z25.s }, p3, [x22, #1, MUL VL]\n" + "st1w { z26.s }, p2, [x22, #2, MUL VL]\n" + "st1w { z27.s }, p1, [x22, #3, MUL VL]\n" + "70:" // Height 5: Writeback done + "decw x14, ALL, MUL #4\n" + "cmp x14, XZR\n" + "bgt 58b\n" + "b 86f\n" + "71:" // Height 6 + "ldr x20, [%x[args_ptr], %[offsetof_B_ptr]]\n" + "ldr x14, [%x[args_ptr], %[offsetof_N]]\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "mov x21, #0x18\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "mov x15, %x[bias]\n" + "mov x13, %x[output_ptr]\n" + "madd %x[output_ptr], x20, x21, %x[output_ptr]\n" + "72:" // Height 6: Column loop + "ldr x12, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "ldr x20, [%x[args_ptr], %[offsetof_B_stride]]\n" + "add x11, x12, x20, LSL #1\n" + "cntw x21, ALL, MUL #3\n" + "add x10, x11, x20, LSL #1\n" + "add x9, x10, x20, LSL #1\n" + "add x20, x9, x20, LSL #1\n" + "cmp x14, x21\n" + "str x20, [%x[args_ptr], %[offsetof_cur_B_ptr]]\n" + "bgt 73f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x9, x12\n" + "bgt 73f\n" + "decw x21\n" + "cmp x14, x21\n" + "mov x10, x12\n" + "bgt 73f\n" + "mov x11, x12\n" + "73:" // Height 6: B setup done + "mov x20, #0x0\n" + "whilelt p4.s, x20, x14\n" + "incw x20\n" + "whilelt p3.s, x20, x14\n" + "incw x20\n" + "whilelt p2.s, x20, x14\n" + "incw x20\n" + "whilelt p1.s, x20, x14\n" + "cbz x15, 74f\n" + "ld1w { z8.s }, p5/Z, [x15]\n" + "ld1w { z9.s }, p5/Z, [x15, #1, MUL VL]\n" + "zip2 z12.d, z8.d, z8.d\n" + "zip1 z8.d, z8.d, z8.d\n" + "ld1w { z10.s }, p5/Z, [x15, #2, MUL VL]\n" + "ld1w { z11.s }, p5/Z, [x15, #3, MUL VL]\n" + "zip2 z13.d, z9.d, z9.d\n" + "zip1 z9.d, z9.d, z9.d\n" + "zip2 z14.d, z10.d, z10.d\n" + "zip1 z10.d, z10.d, z10.d\n" + "addvl x15, x15, #4\n" + "zip2 z15.d, z11.d, z11.d\n" + "zip1 z11.d, z11.d, z11.d\n" + "mov z16.d, z8.d\n" + "mov z20.d, z12.d\n" + "mov z17.d, z9.d\n" + "mov z21.d, z13.d\n" + "mov z18.d, z10.d\n" + "mov z22.d, z14.d\n" + "mov z19.d, z11.d\n" + "mov z23.d, z15.d\n" + "mov z24.d, z8.d\n" + "mov z28.d, z12.d\n" + "mov z25.d, z9.d\n" + "mov z29.d, z13.d\n" + "mov z26.d, z10.d\n" + "mov z30.d, z14.d\n" + "mov z27.d, z11.d\n" + "mov z31.d, z15.d\n" + "b 76f\n" + "74:" // Height 6: no bias + "tbz %x[flags], #0, 75f\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x24, x13, x20, LSL #2\n" + "add x23, x24, x20, LSL #2\n" + "ld1w { z17.s }, p4/Z, [x13]\n" + "add x22, x23, x20, LSL #2\n" + "add x21, x22, x20, LSL #2\n" + "ld1w { z18.s }, p3/Z, [x13, #1, MUL VL]\n" + "ld1w { z20.s }, p2/Z, [x13, #2, MUL VL]\n" + "add x20, x21, x20, LSL #2\n" + "ld1w { z16.s }, p1/Z, [x13, #3, MUL VL]\n" + "ld1w { z12.s }, p4/Z, [x24]\n" + "zip1 z8.d, z17.d, z12.d\n" + "ld1w { z13.s }, p3/Z, [x24, #1, MUL VL]\n" + "ld1w { z14.s }, p2/Z, [x24, #2, MUL VL]\n" + "zip2 z12.d, z17.d, z12.d\n" + "zip1 z9.d, z18.d, z13.d\n" + "ld1w { z15.s }, p1/Z, [x24, #3, MUL VL]\n" + "ld1w { z17.s }, p4/Z, [x23]\n" + "zip2 z13.d, z18.d, z13.d\n" + "zip1 z10.d, z20.d, z14.d\n" + "ld1w { z18.s }, p3/Z, [x23, #1, MUL VL]\n" + "ld1w { z19.s }, p2/Z, [x23, #2, MUL VL]\n" + "zip2 z14.d, z20.d, z14.d\n" + "zip1 z11.d, z16.d, z15.d\n" + "ld1w { z24.s }, p1/Z, [x23, #3, MUL VL]\n" + "ld1w { z20.s }, p4/Z, [x22]\n" + "zip2 z15.d, z16.d, z15.d\n" + "zip1 z16.d, z17.d, z20.d\n" + "ld1w { z21.s }, p3/Z, [x22, #1, MUL VL]\n" + "ld1w { z22.s }, p2/Z, [x22, #2, MUL VL]\n" + "zip2 z20.d, z17.d, z20.d\n" + "zip1 z17.d, z18.d, z21.d\n" + "ld1w { z23.s }, p1/Z, [x22, #3, MUL VL]\n" + "ld1w { z25.s }, p4/Z, [x21]\n" + "zip2 z21.d, z18.d, z21.d\n" + "zip1 z18.d, z19.d, z22.d\n" + "ld1w { z26.s }, p3/Z, [x21, #1, MUL VL]\n" + "ld1w { z27.s }, p2/Z, [x21, #2, MUL VL]\n" + "zip2 z22.d, z19.d, z22.d\n" + "zip1 z19.d, z24.d, z23.d\n" + "ld1w { z0.s }, p1/Z, [x21, #3, MUL VL]\n" + "ld1w { z28.s }, p4/Z, [x20]\n" + "zip2 z23.d, z24.d, z23.d\n" + "zip1 z24.d, z25.d, z28.d\n" + "ld1w { z29.s }, p3/Z, [x20, #1, MUL VL]\n" + "ld1w { z30.s }, p2/Z, [x20, #2, MUL VL]\n" + "zip2 z28.d, z25.d, z28.d\n" + "zip1 z25.d, z26.d, z29.d\n" + "ld1w { z31.s }, p1/Z, [x20, #3, MUL VL]\n" + "zip2 z29.d, z26.d, z29.d\n" + "zip1 z26.d, z27.d, z30.d\n" + "zip2 z30.d, z27.d, z30.d\n" + "zip1 z27.d, z0.d, z31.d\n" + "zip2 z31.d, z0.d, z31.d\n" + "b 76f\n" + "75:" // Height 6: no accumulate + "mov z8.b, #0x0\n" + "mov z9.b, #0x0\n" + "mov z10.b, #0x0\n" + "mov z11.b, #0x0\n" + "mov z12.b, #0x0\n" + "mov z13.b, #0x0\n" + "mov z14.b, #0x0\n" + "mov z15.b, #0x0\n" + "mov z16.b, #0x0\n" + "mov z17.b, #0x0\n" + "mov z18.b, #0x0\n" + "mov z19.b, #0x0\n" + "mov z20.b, #0x0\n" + "mov z21.b, #0x0\n" + "mov z22.b, #0x0\n" + "mov z23.b, #0x0\n" + "mov z24.b, #0x0\n" + "mov z25.b, #0x0\n" + "mov z26.b, #0x0\n" + "mov z27.b, #0x0\n" + "mov z28.b, #0x0\n" + "mov z29.b, #0x0\n" + "mov z30.b, #0x0\n" + "mov z31.b, #0x0\n" + "76:" // Height 6: setup done + "mov x28, #0x0\n" + "77:" // Height 6: String loop + "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n" + "ldr w27, [x20, x28, LSL #0x2]\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" + "tbz %x[flags], #3, 78f\n" + "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n" + "add x20, x20, x21, LSL #3\n" + "ldr x26, [x20, #0x0]\n" + "ldr x25, [x20, #0x8]\n" + "ldr x24, [x20, #0x10]\n" + "ldr x23, [x20, #0x18]\n" + "ldr x22, [x20, #0x20]\n" + "ldr x21, [x20, #0x28]\n" + "cbnz x28, 79f\n" + "ldr x20, [%x[args_ptr], %[offsetof_input_initial_col]]\n" + "add x26, x26, x20, LSL #1\n" + "add x25, x25, x20, LSL #1\n" + "add x24, x24, x20, LSL #1\n" + "add x23, x23, x20, LSL #1\n" + "add x22, x22, x20, LSL #1\n" + "add x21, x21, x20, LSL #1\n" + "b 79f\n" + "78:" // Height 6: setup direct input + "mov x26, %x[input_ptr]\n" + "add x25, x26, x21, LSL #1\n" + "add x24, x25, x21, LSL #1\n" + "add x23, x24, x21, LSL #1\n" + "add x22, x23, x21, LSL #1\n" + "add x21, x22, x21, LSL #1\n" + "79:" // Height 6: input setup done + "cmp x27, #0x8\n" + "ble 81f\n" + "80:" // Height 6: Multiply loop: Main loop head + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z7.h }, p0/Z, [x26]\n" + "ld1rqh { z0.h }, p0/Z, [x25]\n" + "trn1 z6.d, z7.d, z0.d\n" + "ld1rqh { z5.h }, p0/Z, [x24]\n" + "ld1rqh { z1.h }, p0/Z, [x23]\n" + "trn2 z7.d, z7.d, z0.d\n" + "trn1 z4.d, z5.d, z1.d\n" + "ld1rqh { z3.h }, p0/Z, [x22]\n" + "ld1rqh { z0.h }, p0/Z, [x21]\n" + "trn2 z5.d, z5.d, z1.d\n" + "trn1 z2.d, z3.d, z0.d\n" + "trn2 z3.d, z3.d, z0.d\n" + "ld1h { z1.h }, p5/Z, [x12]\n" + "ld1h { z0.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6461e4c8 // bfmmla z8.s, z6.h, z1.h\n" + ".inst 0x6461e490 // bfmmla z16.s, z4.h, z1.h\n" + ".inst 0x6461e458 // bfmmla z24.s, z2.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x11]\n" + "sub x27, x27, #0x8\n" + ".inst 0x6460e4cc // bfmmla z12.s, z6.h, z0.h\n" + ".inst 0x6460e494 // bfmmla z20.s, z4.h, z0.h\n" + "cmp x27, #0x8\n" + "add x26, x26, #0x10\n" + ".inst 0x6460e45c // bfmmla z28.s, z2.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6461e4c9 // bfmmla z9.s, z6.h, z1.h\n" + "add x25, x25, #0x10\n" + ".inst 0x6461e491 // bfmmla z17.s, z4.h, z1.h\n" + ".inst 0x6461e459 // bfmmla z25.s, z2.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x10]\n" + "add x24, x24, #0x10\n" + ".inst 0x6460e4cd // bfmmla z13.s, z6.h, z0.h\n" + ".inst 0x6460e495 // bfmmla z21.s, z4.h, z0.h\n" + "add x23, x23, #0x10\n" + "add x22, x22, #0x10\n" + ".inst 0x6460e45d // bfmmla z29.s, z2.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6461e4ca // bfmmla z10.s, z6.h, z1.h\n" + "add x21, x21, #0x10\n" + ".inst 0x6461e492 // bfmmla z18.s, z4.h, z1.h\n" + ".inst 0x6461e45a // bfmmla z26.s, z2.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x9]\n" + ".inst 0x6460e4ce // bfmmla z14.s, z6.h, z0.h\n" + ".inst 0x6460e496 // bfmmla z22.s, z4.h, z0.h\n" + ".inst 0x6460e45e // bfmmla z30.s, z2.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x9, #1, MUL VL]\n" + ".inst 0x6461e4cb // bfmmla z11.s, z6.h, z1.h\n" + ".inst 0x6461e493 // bfmmla z19.s, z4.h, z1.h\n" + ".inst 0x6461e45b // bfmmla z27.s, z2.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x12, #2, MUL VL]\n" + ".inst 0x6460e4cf // bfmmla z15.s, z6.h, z0.h\n" + ".inst 0x6460e497 // bfmmla z23.s, z4.h, z0.h\n" + ".inst 0x6460e45f // bfmmla z31.s, z2.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x12, #3, MUL VL]\n" + ".inst 0x6461e4e8 // bfmmla z8.s, z7.h, z1.h\n" + "addvl x12, x12, #4\n" + ".inst 0x6461e4b0 // bfmmla z16.s, z5.h, z1.h\n" + ".inst 0x6461e478 // bfmmla z24.s, z3.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x11, #2, MUL VL]\n" + ".inst 0x6460e4ec // bfmmla z12.s, z7.h, z0.h\n" + ".inst 0x6460e4b4 // bfmmla z20.s, z5.h, z0.h\n" + ".inst 0x6460e47c // bfmmla z28.s, z3.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x11, #3, MUL VL]\n" + ".inst 0x6461e4e9 // bfmmla z9.s, z7.h, z1.h\n" + "addvl x11, x11, #4\n" + ".inst 0x6461e4b1 // bfmmla z17.s, z5.h, z1.h\n" + ".inst 0x6461e479 // bfmmla z25.s, z3.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x10, #2, MUL VL]\n" + ".inst 0x6460e4ed // bfmmla z13.s, z7.h, z0.h\n" + ".inst 0x6460e4b5 // bfmmla z21.s, z5.h, z0.h\n" + ".inst 0x6460e47d // bfmmla z29.s, z3.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x10, #3, MUL VL]\n" + ".inst 0x6461e4ea // bfmmla z10.s, z7.h, z1.h\n" + "addvl x10, x10, #4\n" + ".inst 0x6461e4b2 // bfmmla z18.s, z5.h, z1.h\n" + ".inst 0x6461e47a // bfmmla z26.s, z3.h, z1.h\n" + "ld1h { z1.h }, p5/Z, [x9, #2, MUL VL]\n" + ".inst 0x6460e4ee // bfmmla z14.s, z7.h, z0.h\n" + ".inst 0x6460e4b6 // bfmmla z22.s, z5.h, z0.h\n" + ".inst 0x6460e47e // bfmmla z30.s, z3.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x9, #3, MUL VL]\n" + ".inst 0x6461e4eb // bfmmla z11.s, z7.h, z1.h\n" + "addvl x9, x9, #4\n" + ".inst 0x6461e4b3 // bfmmla z19.s, z5.h, z1.h\n" + ".inst 0x6461e47b // bfmmla z27.s, z3.h, z1.h\n" + ".inst 0x6460e4ef // bfmmla z15.s, z7.h, z0.h\n" + ".inst 0x6460e4b7 // bfmmla z23.s, z5.h, z0.h\n" + ".inst 0x6460e47f // bfmmla z31.s, z3.h, z0.h\n" + "bgt 80b\n" + "81:" // Height 6: Multiply loop: Single iteration only + "whilelt p0.h, XZR, x27\n" + "ld1rqh { z1.h }, p0/Z, [x26]\n" + "ld1rqh { z0.h }, p0/Z, [x25]\n" + "trn1 z7.d, z1.d, z0.d\n" + "ld1rqh { z3.h }, p0/Z, [x24]\n" + "ld1rqh { z2.h }, p0/Z, [x23]\n" + "trn2 z1.d, z1.d, z0.d\n" + "trn1 z6.d, z3.d, z2.d\n" + "ld1rqh { z5.h }, p0/Z, [x22]\n" + "ld1rqh { z0.h }, p0/Z, [x21]\n" + "trn2 z3.d, z3.d, z2.d\n" + "trn1 z4.d, z5.d, z0.d\n" + "trn2 z5.d, z5.d, z0.d\n" + "ld1h { z2.h }, p5/Z, [x12]\n" + "ld1h { z0.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6462e4e8 // bfmmla z8.s, z7.h, z2.h\n" + ".inst 0x6462e4d0 // bfmmla z16.s, z6.h, z2.h\n" + ".inst 0x6462e498 // bfmmla z24.s, z4.h, z2.h\n" + "ld1h { z2.h }, p5/Z, [x11]\n" + "subs x27, x27, #0x4\n" + ".inst 0x6460e4ec // bfmmla z12.s, z7.h, z0.h\n" + ".inst 0x6460e4d4 // bfmmla z20.s, z6.h, z0.h\n" + "addvl x12, x12, #2\n" + ".inst 0x6460e49c // bfmmla z28.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x11, #1, MUL VL]\n" + ".inst 0x6462e4e9 // bfmmla z9.s, z7.h, z2.h\n" + "addvl x11, x11, #2\n" + ".inst 0x6462e4d1 // bfmmla z17.s, z6.h, z2.h\n" + ".inst 0x6462e499 // bfmmla z25.s, z4.h, z2.h\n" + "ld1h { z2.h }, p5/Z, [x10]\n" + ".inst 0x6460e4ed // bfmmla z13.s, z7.h, z0.h\n" + ".inst 0x6460e4d5 // bfmmla z21.s, z6.h, z0.h\n" + ".inst 0x6460e49d // bfmmla z29.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x10, #1, MUL VL]\n" + ".inst 0x6462e4ea // bfmmla z10.s, z7.h, z2.h\n" + "addvl x10, x10, #2\n" + ".inst 0x6462e4d2 // bfmmla z18.s, z6.h, z2.h\n" + ".inst 0x6462e49a // bfmmla z26.s, z4.h, z2.h\n" + "ld1h { z2.h }, p5/Z, [x9]\n" + ".inst 0x6460e4ee // bfmmla z14.s, z7.h, z0.h\n" + ".inst 0x6460e4d6 // bfmmla z22.s, z6.h, z0.h\n" + ".inst 0x6460e49e // bfmmla z30.s, z4.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x9, #1, MUL VL]\n" + ".inst 0x6462e4eb // bfmmla z11.s, z7.h, z2.h\n" + "addvl x9, x9, #2\n" + ".inst 0x6462e4d3 // bfmmla z19.s, z6.h, z2.h\n" + ".inst 0x6462e49b // bfmmla z27.s, z4.h, z2.h\n" + ".inst 0x6460e4ef // bfmmla z15.s, z7.h, z0.h\n" + ".inst 0x6460e4d7 // bfmmla z23.s, z6.h, z0.h\n" + ".inst 0x6460e49f // bfmmla z31.s, z4.h, z0.h\n" + "ble 82f\n" + "ld1h { z2.h }, p5/Z, [x12]\n" + "ld1h { z0.h }, p5/Z, [x12, #1, MUL VL]\n" + ".inst 0x6462e428 // bfmmla z8.s, z1.h, z2.h\n" + ".inst 0x6462e470 // bfmmla z16.s, z3.h, z2.h\n" + ".inst 0x6462e4b8 // bfmmla z24.s, z5.h, z2.h\n" + ".inst 0x6460e42c // bfmmla z12.s, z1.h, z0.h\n" + "ld1h { z2.h }, p5/Z, [x11]\n" + "addvl x12, x12, #2\n" + ".inst 0x6460e474 // bfmmla z20.s, z3.h, z0.h\n" + ".inst 0x6460e4bc // bfmmla z28.s, z5.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x11, #1, MUL VL]\n" + "addvl x11, x11, #2\n" + ".inst 0x6462e429 // bfmmla z9.s, z1.h, z2.h\n" + ".inst 0x6462e471 // bfmmla z17.s, z3.h, z2.h\n" + ".inst 0x6462e4b9 // bfmmla z25.s, z5.h, z2.h\n" + ".inst 0x6460e42d // bfmmla z13.s, z1.h, z0.h\n" + "ld1h { z2.h }, p5/Z, [x10]\n" + ".inst 0x6460e475 // bfmmla z21.s, z3.h, z0.h\n" + ".inst 0x6460e4bd // bfmmla z29.s, z5.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x10, #1, MUL VL]\n" + "addvl x10, x10, #2\n" + ".inst 0x6462e42a // bfmmla z10.s, z1.h, z2.h\n" + ".inst 0x6462e472 // bfmmla z18.s, z3.h, z2.h\n" + ".inst 0x6462e4ba // bfmmla z26.s, z5.h, z2.h\n" + ".inst 0x6460e42e // bfmmla z14.s, z1.h, z0.h\n" + "ld1h { z2.h }, p5/Z, [x9]\n" + ".inst 0x6460e476 // bfmmla z22.s, z3.h, z0.h\n" + ".inst 0x6460e4be // bfmmla z30.s, z5.h, z0.h\n" + "ld1h { z0.h }, p5/Z, [x9, #1, MUL VL]\n" + "addvl x9, x9, #2\n" + ".inst 0x6462e42b // bfmmla z11.s, z1.h, z2.h\n" + ".inst 0x6462e473 // bfmmla z19.s, z3.h, z2.h\n" + ".inst 0x6462e4bb // bfmmla z27.s, z5.h, z2.h\n" + ".inst 0x6460e42f // bfmmla z15.s, z1.h, z0.h\n" + ".inst 0x6460e477 // bfmmla z23.s, z3.h, z0.h\n" + ".inst 0x6460e4bf // bfmmla z31.s, z5.h, z0.h\n" + "82:" // Height 6: Multiply loop: multiply skip + "ldr w20, [%x[args_ptr], %[offsetof_num_strings]]\n" + "add x28, x28, #0x1\n" + "cmp x28, x20\n" + "bne 77b\n" + "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n" + "add x25, x13, x20, LSL #2\n" + "add x24, x25, x20, LSL #2\n" + "uzp1 z7.d, z8.d, z12.d\n" + "add x23, x24, x20, LSL #2\n" + "add x22, x23, x20, LSL #2\n" + "uzp2 z8.d, z8.d, z12.d\n" + "uzp1 z12.d, z9.d, z13.d\n" + "uzp2 z9.d, z9.d, z13.d\n" + "uzp1 z13.d, z10.d, z14.d\n" + "add x21, x22, x20, LSL #2\n" + "uzp2 z10.d, z10.d, z14.d\n" + "uzp1 z14.d, z11.d, z15.d\n" + "uzp2 z11.d, z11.d, z15.d\n" + "uzp1 z15.d, z16.d, z20.d\n" + "uzp2 z16.d, z16.d, z20.d\n" + "uzp1 z20.d, z17.d, z21.d\n" + "uzp2 z17.d, z17.d, z21.d\n" + "uzp1 z21.d, z18.d, z22.d\n" + "uzp2 z18.d, z18.d, z22.d\n" + "uzp1 z22.d, z19.d, z23.d\n" + "uzp2 z19.d, z19.d, z23.d\n" + "uzp1 z23.d, z24.d, z28.d\n" + "uzp2 z24.d, z24.d, z28.d\n" + "uzp1 z28.d, z25.d, z29.d\n" + "uzp2 z25.d, z25.d, z29.d\n" + "uzp1 z29.d, z26.d, z30.d\n" + "uzp2 z26.d, z26.d, z30.d\n" + "uzp1 z30.d, z27.d, z31.d\n" + "uzp2 z27.d, z27.d, z31.d\n" + "tbz %x[flags], #1, 83f\n" + "add x20, %x[args_ptr], %[offset_max]\n" + "ld1rw { z1.s }, p5/Z, [x20]\n" + "add x20, %x[args_ptr], %[offset_min]\n" + "ld1rw { z0.s }, p5/Z, [x20]\n" + "fmin z7.s, p5/M, z7.s, z1.s\n" + "fmin z12.s, p5/M, z12.s, z1.s\n" + "fmin z13.s, p5/M, z13.s, z1.s\n" + "fmin z14.s, p5/M, z14.s, z1.s\n" + "fmin z8.s, p5/M, z8.s, z1.s\n" + "fmin z9.s, p5/M, z9.s, z1.s\n" + "fmin z10.s, p5/M, z10.s, z1.s\n" + "fmin z11.s, p5/M, z11.s, z1.s\n" + "fmin z15.s, p5/M, z15.s, z1.s\n" + "fmin z20.s, p5/M, z20.s, z1.s\n" + "fmin z21.s, p5/M, z21.s, z1.s\n" + "fmin z22.s, p5/M, z22.s, z1.s\n" + "fmin z16.s, p5/M, z16.s, z1.s\n" + "fmin z17.s, p5/M, z17.s, z1.s\n" + "fmin z18.s, p5/M, z18.s, z1.s\n" + "fmin z19.s, p5/M, z19.s, z1.s\n" + "fmin z23.s, p5/M, z23.s, z1.s\n" + "fmin z28.s, p5/M, z28.s, z1.s\n" + "fmin z29.s, p5/M, z29.s, z1.s\n" + "fmin z30.s, p5/M, z30.s, z1.s\n" + "fmin z24.s, p5/M, z24.s, z1.s\n" + "fmin z25.s, p5/M, z25.s, z1.s\n" + "fmin z26.s, p5/M, z26.s, z1.s\n" + "fmin z27.s, p5/M, z27.s, z1.s\n" + "fmax z7.s, p5/M, z7.s, z0.s\n" + "fmax z12.s, p5/M, z12.s, z0.s\n" + "fmax z13.s, p5/M, z13.s, z0.s\n" + "fmax z14.s, p5/M, z14.s, z0.s\n" + "fmax z8.s, p5/M, z8.s, z0.s\n" + "fmax z9.s, p5/M, z9.s, z0.s\n" + "fmax z10.s, p5/M, z10.s, z0.s\n" + "fmax z11.s, p5/M, z11.s, z0.s\n" + "fmax z15.s, p5/M, z15.s, z0.s\n" + "fmax z20.s, p5/M, z20.s, z0.s\n" + "fmax z21.s, p5/M, z21.s, z0.s\n" + "fmax z22.s, p5/M, z22.s, z0.s\n" + "fmax z16.s, p5/M, z16.s, z0.s\n" + "fmax z17.s, p5/M, z17.s, z0.s\n" + "fmax z18.s, p5/M, z18.s, z0.s\n" + "fmax z19.s, p5/M, z19.s, z0.s\n" + "fmax z23.s, p5/M, z23.s, z0.s\n" + "fmax z28.s, p5/M, z28.s, z0.s\n" + "fmax z29.s, p5/M, z29.s, z0.s\n" + "fmax z30.s, p5/M, z30.s, z0.s\n" + "fmax z24.s, p5/M, z24.s, z0.s\n" + "fmax z25.s, p5/M, z25.s, z0.s\n" + "fmax z26.s, p5/M, z26.s, z0.s\n" + "fmax z27.s, p5/M, z27.s, z0.s\n" + "83:" // Height 6: No activation + "st1w { z7.s }, p4, [x13]\n" + "st1w { z12.s }, p3, [x13, #1, MUL VL]\n" + "st1w { z13.s }, p2, [x13, #2, MUL VL]\n" + "st1w { z14.s }, p1, [x13, #3, MUL VL]\n" + "addvl x13, x13, #4\n" + "st1w { z8.s }, p4, [x25]\n" + "st1w { z9.s }, p3, [x25, #1, MUL VL]\n" + "st1w { z10.s }, p2, [x25, #2, MUL VL]\n" + "st1w { z11.s }, p1, [x25, #3, MUL VL]\n" + "st1w { z15.s }, p4, [x24]\n" + "st1w { z20.s }, p3, [x24, #1, MUL VL]\n" + "st1w { z21.s }, p2, [x24, #2, MUL VL]\n" + "st1w { z22.s }, p1, [x24, #3, MUL VL]\n" + "st1w { z16.s }, p4, [x23]\n" + "st1w { z17.s }, p3, [x23, #1, MUL VL]\n" + "st1w { z18.s }, p2, [x23, #2, MUL VL]\n" + "st1w { z19.s }, p1, [x23, #3, MUL VL]\n" + "st1w { z23.s }, p4, [x22]\n" + "st1w { z28.s }, p3, [x22, #1, MUL VL]\n" + "st1w { z29.s }, p2, [x22, #2, MUL VL]\n" + "st1w { z30.s }, p1, [x22, #3, MUL VL]\n" + "st1w { z24.s }, p4, [x21]\n" + "st1w { z25.s }, p3, [x21, #1, MUL VL]\n" + "st1w { z26.s }, p2, [x21, #2, MUL VL]\n" + "st1w { z27.s }, p1, [x21, #3, MUL VL]\n" + "84:" // Height 6: Writeback done + "decw x14, ALL, MUL #4\n" + "cmp x14, XZR\n" + "bgt 72b\n" + "subs %x[M], %x[M], #0x6\n" + "beq 86f\n" + "ldr x21, [%x[args_ptr], %[offsetof_input_offset]]\n" + "tbz %x[flags], #3, 85f\n" + "add x21, x21, #0x6\n" + "str x21, [%x[args_ptr], %[offsetof_input_offset]]\n" + "b 1b\n" + "85:" // Update direct input + "mov x20, #0xc\n" + "madd %x[input_ptr], x20, x21, %x[input_ptr]\n" + "b 1b\n" + "86:" // Exit + : [M] "+&r" (M), [input_ptr] "+&r" (input_ptr), [output_ptr] "+&r" (output_ptr) + : [args_ptr] "r" (&ka), [bias] "r" (bias), [flags] "r" (flags), [offset_max] "I" (offsetof(KernelArgs, maxval)), [offset_min] "I" (offsetof(KernelArgs, minval)), [offsetof_B_ptr] "I" (offsetof(KernelArgs, B_ptr)), [offsetof_B_stride] "I" (offsetof(KernelArgs, B_stride)), [offsetof_N] "I" (offsetof(KernelArgs, N)), [offsetof_cur_B_ptr] "I" (offsetof(KernelArgs, cur_B_ptr)), [offsetof_input_initial_col] "I" (offsetof(KernelArgs, input_initial_col)), [offsetof_input_offset] "I" (offsetof(KernelArgs, input_offset)), [offsetof_num_strings] "I" (offsetof(KernelArgs, num_strings)), [offsetof_output_offset] "I" (offsetof(KernelArgs, output_offset)), [offsetof_string_lengths] "I" (offsetof(KernelArgs, string_lengths)) + : "cc", "memory", "p0", "p1", "p2", "p3", "p4", "p5", "x9", "x10", "x11", "x12", "x13", "x14", "x15", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "z0", "z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8", "z9", "z10", "z11", "z12", "z13", "z14", "z15", "z16", "z17", "z18", "z19", "z20", "z21", "z22", "z23", "z24", "z25", "z26", "z27", "z28", "z29", "z30", "z31" + ); +} + +} // namespace arm_gemm +#endif // ARM_COMPUTE_ENABLE_SVE |