1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc < %s -mtriple=riscv32 -mattr=+v,+zvfbfmin -verify-machineinstrs | FileCheck %s
3 ; RUN: llc < %s -mtriple=riscv64 -mattr=+v,+zvfbfmin -verify-machineinstrs | FileCheck %s
5 define void @store_nxv1bf16(<vscale x 1 x bfloat> %v, ptr %p) {
6 ; CHECK-LABEL: store_nxv1bf16:
8 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
9 ; CHECK-NEXT: vse16.v v8, (a0)
11 store <vscale x 1 x bfloat> %v, ptr %p
15 define void @store_nxv2bf16(<vscale x 2 x bfloat> %v, ptr %p) {
16 ; CHECK-LABEL: store_nxv2bf16:
18 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
19 ; CHECK-NEXT: vse16.v v8, (a0)
21 store <vscale x 2 x bfloat> %v, ptr %p
25 define void @store_nxv4bf16(<vscale x 4 x bfloat> %v, ptr %p) {
26 ; CHECK-LABEL: store_nxv4bf16:
28 ; CHECK-NEXT: vs1r.v v8, (a0)
30 store <vscale x 4 x bfloat> %v, ptr %p
34 define void @store_nxv8bf16(<vscale x 8 x bfloat> %v, ptr %p) {
35 ; CHECK-LABEL: store_nxv8bf16:
37 ; CHECK-NEXT: vs2r.v v8, (a0)
39 store <vscale x 8 x bfloat> %v, ptr %p
43 define void @store_nxv16bf16(<vscale x 16 x bfloat> %v, ptr %p) {
44 ; CHECK-LABEL: store_nxv16bf16:
46 ; CHECK-NEXT: vs4r.v v8, (a0)
48 store <vscale x 16 x bfloat> %v, ptr %p
52 define void @store_nxv32bf32(<vscale x 32 x bfloat> %v, ptr %p) {
53 ; CHECK-LABEL: store_nxv32bf32:
55 ; CHECK-NEXT: vs8r.v v8, (a0)
57 store <vscale x 32 x bfloat> %v, ptr %p
61 define void @truncstore(<vscale x 4 x float> %v, ptr %p) {
62 ; CHECK-LABEL: truncstore:
64 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
65 ; CHECK-NEXT: vfncvtbf16.f.f.w v10, v8
66 ; CHECK-NEXT: vs1r.v v10, (a0)
68 %w = fptrunc <vscale x 4 x float> %v to <vscale x 4 x bfloat>
69 store <vscale x 4 x bfloat> %w, ptr %p