11; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22; RUN: llc -mtriple=riscv32 -mattr=+m,+d,+v,+experimental-zfbfmin,+experimental-zvfbfmin -target-abi=ilp32d \
3- ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,CHECK-ZVFH
3+ ; RUN: -verify-machineinstrs < %s | FileCheck %s
44; RUN: llc -mtriple=riscv64 -mattr=+m,+d,+v,+experimental-zfbfmin,+experimental-zvfbfmin -target-abi=lp64d \
5- ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,CHECK-ZVFH
5+ ; RUN: -verify-machineinstrs < %s | FileCheck %s
66
77define <vscale x 1 x bfloat> @vfmerge_vv_nxv1bf16 (<vscale x 1 x bfloat> %va , <vscale x 1 x bfloat> %vb , <vscale x 1 x i1 > %cond ) {
88; CHECK-LABEL: vfmerge_vv_nxv1bf16:
@@ -23,14 +23,6 @@ define <vscale x 1 x bfloat> @vfmerge_fv_nxv1bf16(<vscale x 1 x bfloat> %va, bfl
2323; CHECK-NEXT: vsetvli zero, zero, e16, mf4, ta, mu
2424; CHECK-NEXT: vfncvtbf16.f.f.w v8, v9, v0.t
2525; CHECK-NEXT: ret
26- ; CHECK-ZVFHMIN-LABEL: vfmerge_fv_nxv1bf16:
27- ; CHECK-ZVFHMIN: # %bb.0:
28- ; CHECK-ZVFHMIN-NEXT: fcvt.s.bf16 fa5, fa0
29- ; CHECK-ZVFHMIN-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
30- ; CHECK-ZVFHMIN-NEXT: vfmv.v.f v9, fa5
31- ; CHECK-ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, mu
32- ; CHECK-ZVFHMIN-NEXT: vfncvtbf16.f.f.w v8, v9, v0.t
33- ; CHECK-ZVFHMIN-NEXT: ret
3426 %head = insertelement <vscale x 1 x bfloat> poison, bfloat %b , i32 0
3527 %splat = shufflevector <vscale x 1 x bfloat> %head , <vscale x 1 x bfloat> poison, <vscale x 1 x i32 > zeroinitializer
3628 %vc = select <vscale x 1 x i1 > %cond , <vscale x 1 x bfloat> %splat , <vscale x 1 x bfloat> %va
@@ -56,14 +48,6 @@ define <vscale x 2 x bfloat> @vfmerge_fv_nxv2bf16(<vscale x 2 x bfloat> %va, bfl
5648; CHECK-NEXT: vsetvli zero, zero, e16, mf2, ta, mu
5749; CHECK-NEXT: vfncvtbf16.f.f.w v8, v9, v0.t
5850; CHECK-NEXT: ret
59- ; CHECK-ZVFHMIN-LABEL: vfmerge_fv_nxv2bf16:
60- ; CHECK-ZVFHMIN: # %bb.0:
61- ; CHECK-ZVFHMIN-NEXT: fcvt.s.bf16 fa5, fa0
62- ; CHECK-ZVFHMIN-NEXT: vsetvli a0, zero, e32, m1, ta, ma
63- ; CHECK-ZVFHMIN-NEXT: vfmv.v.f v9, fa5
64- ; CHECK-ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, mu
65- ; CHECK-ZVFHMIN-NEXT: vfncvtbf16.f.f.w v8, v9, v0.t
66- ; CHECK-ZVFHMIN-NEXT: ret
6751 %head = insertelement <vscale x 2 x bfloat> poison, bfloat %b , i32 0
6852 %splat = shufflevector <vscale x 2 x bfloat> %head , <vscale x 2 x bfloat> poison, <vscale x 2 x i32 > zeroinitializer
6953 %vc = select <vscale x 2 x i1 > %cond , <vscale x 2 x bfloat> %splat , <vscale x 2 x bfloat> %va
@@ -89,14 +73,6 @@ define <vscale x 4 x bfloat> @vfmerge_fv_nxv4bf16(<vscale x 4 x bfloat> %va, bfl
8973; CHECK-NEXT: vsetvli zero, zero, e16, m1, ta, mu
9074; CHECK-NEXT: vfncvtbf16.f.f.w v8, v10, v0.t
9175; CHECK-NEXT: ret
92- ; CHECK-ZVFHMIN-LABEL: vfmerge_fv_nxv4bf16:
93- ; CHECK-ZVFHMIN: # %bb.0:
94- ; CHECK-ZVFHMIN-NEXT: fcvt.s.bf16 fa5, fa0
95- ; CHECK-ZVFHMIN-NEXT: vsetvli a0, zero, e32, m2, ta, ma
96- ; CHECK-ZVFHMIN-NEXT: vfmv.v.f v10, fa5
97- ; CHECK-ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, mu
98- ; CHECK-ZVFHMIN-NEXT: vfncvtbf16.f.f.w v8, v10, v0.t
99- ; CHECK-ZVFHMIN-NEXT: ret
10076 %head = insertelement <vscale x 4 x bfloat> poison, bfloat %b , i32 0
10177 %splat = shufflevector <vscale x 4 x bfloat> %head , <vscale x 4 x bfloat> poison, <vscale x 4 x i32 > zeroinitializer
10278 %vc = select <vscale x 4 x i1 > %cond , <vscale x 4 x bfloat> %splat , <vscale x 4 x bfloat> %va
@@ -122,14 +98,6 @@ define <vscale x 8 x bfloat> @vfmerge_fv_nxv8bf16(<vscale x 8 x bfloat> %va, bfl
12298; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, mu
12399; CHECK-NEXT: vfncvtbf16.f.f.w v8, v12, v0.t
124100; CHECK-NEXT: ret
125- ; CHECK-ZVFHMIN-LABEL: vfmerge_fv_nxv8bf16:
126- ; CHECK-ZVFHMIN: # %bb.0:
127- ; CHECK-ZVFHMIN-NEXT: fcvt.s.bf16 fa5, fa0
128- ; CHECK-ZVFHMIN-NEXT: vsetvli a0, zero, e32, m4, ta, ma
129- ; CHECK-ZVFHMIN-NEXT: vfmv.v.f v12, fa5
130- ; CHECK-ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, mu
131- ; CHECK-ZVFHMIN-NEXT: vfncvtbf16.f.f.w v8, v12, v0.t
132- ; CHECK-ZVFHMIN-NEXT: ret
133101 %head = insertelement <vscale x 8 x bfloat> poison, bfloat %b , i32 0
134102 %splat = shufflevector <vscale x 8 x bfloat> %head , <vscale x 8 x bfloat> poison, <vscale x 8 x i32 > zeroinitializer
135103 %vc = select <vscale x 8 x i1 > %cond , <vscale x 8 x bfloat> %splat , <vscale x 8 x bfloat> %va
@@ -182,14 +150,6 @@ define <vscale x 16 x bfloat> @vfmerge_fv_nxv16bf16(<vscale x 16 x bfloat> %va,
182150; CHECK-NEXT: vsetvli zero, zero, e16, m4, ta, mu
183151; CHECK-NEXT: vfncvtbf16.f.f.w v8, v16, v0.t
184152; CHECK-NEXT: ret
185- ; CHECK-ZVFHMIN-LABEL: vfmerge_fv_nxv16bf16:
186- ; CHECK-ZVFHMIN: # %bb.0:
187- ; CHECK-ZVFHMIN-NEXT: fcvt.s.bf16 fa5, fa0
188- ; CHECK-ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
189- ; CHECK-ZVFHMIN-NEXT: vfmv.v.f v16, fa5
190- ; CHECK-ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, mu
191- ; CHECK-ZVFHMIN-NEXT: vfncvtbf16.f.f.w v8, v16, v0.t
192- ; CHECK-ZVFHMIN-NEXT: ret
193153 %head = insertelement <vscale x 16 x bfloat> poison, bfloat %b , i32 0
194154 %splat = shufflevector <vscale x 16 x bfloat> %head , <vscale x 16 x bfloat> poison, <vscale x 16 x i32 > zeroinitializer
195155 %vc = select <vscale x 16 x i1 > %cond , <vscale x 16 x bfloat> %splat , <vscale x 16 x bfloat> %va
@@ -218,21 +178,8 @@ define <vscale x 32 x bfloat> @vfmerge_fv_nxv32bf16(<vscale x 32 x bfloat> %va,
218178; CHECK-NEXT: vsetvli a0, zero, e16, m8, ta, ma
219179; CHECK-NEXT: vmerge.vvm v8, v8, v24, v0
220180; CHECK-NEXT: ret
221- ; CHECK-ZVFHMIN-LABEL: vfmerge_fv_nxv32bf16:
222- ; CHECK-ZVFHMIN: # %bb.0:
223- ; CHECK-ZVFHMIN-NEXT: fcvt.s.bf16 fa5, fa0
224- ; CHECK-ZVFHMIN-NEXT: vsetvli a0, zero, e32, m8, ta, ma
225- ; CHECK-ZVFHMIN-NEXT: vfmv.v.f v16, fa5
226- ; CHECK-ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
227- ; CHECK-ZVFHMIN-NEXT: vfncvtbf16.f.f.w v24, v16
228- ; CHECK-ZVFHMIN-NEXT: vmv.v.v v28, v24
229- ; CHECK-ZVFHMIN-NEXT: vsetvli a0, zero, e16, m8, ta, ma
230- ; CHECK-ZVFHMIN-NEXT: vmerge.vvm v8, v8, v24, v0
231- ; CHECK-ZVFHMIN-NEXT: ret
232181 %head = insertelement <vscale x 32 x bfloat> poison, bfloat %b , i32 0
233182 %splat = shufflevector <vscale x 32 x bfloat> %head , <vscale x 32 x bfloat> poison, <vscale x 32 x i32 > zeroinitializer
234183 %vc = select <vscale x 32 x i1 > %cond , <vscale x 32 x bfloat> %splat , <vscale x 32 x bfloat> %va
235184 ret <vscale x 32 x bfloat> %vc
236185}
237- ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
238- ; CHECK-ZVFH: {{.*}}
0 commit comments