1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -target-abi=ilp32d -verify-machineinstrs < %s | FileCheck %s
3 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d -verify-machineinstrs < %s | FileCheck %s
5 define void @masked_store_nxv1f16(<vscale x 1 x half> %val, ptr %a, <vscale x 1 x i1> %mask) nounwind {
6 ; CHECK-LABEL: masked_store_nxv1f16:
8 ; CHECK-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
9 ; CHECK-NEXT: vse16.v v8, (a0), v0.t
11 call void @llvm.masked.store.nxv1f16.p0(<vscale x 1 x half> %val, ptr %a, i32 2, <vscale x 1 x i1> %mask)
14 declare void @llvm.masked.store.nxv1f16.p0(<vscale x 1 x half>, ptr, i32, <vscale x 1 x i1>)
16 define void @masked_store_nxv1f32(<vscale x 1 x float> %val, ptr %a, <vscale x 1 x i1> %mask) nounwind {
17 ; CHECK-LABEL: masked_store_nxv1f32:
19 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
20 ; CHECK-NEXT: vse32.v v8, (a0), v0.t
22 call void @llvm.masked.store.nxv1f32.p0(<vscale x 1 x float> %val, ptr %a, i32 4, <vscale x 1 x i1> %mask)
25 declare void @llvm.masked.store.nxv1f32.p0(<vscale x 1 x float>, ptr, i32, <vscale x 1 x i1>)
27 define void @masked_store_nxv1f64(<vscale x 1 x double> %val, ptr %a, <vscale x 1 x i1> %mask) nounwind {
28 ; CHECK-LABEL: masked_store_nxv1f64:
30 ; CHECK-NEXT: vsetvli a1, zero, e64, m1, ta, ma
31 ; CHECK-NEXT: vse64.v v8, (a0), v0.t
33 call void @llvm.masked.store.nxv1f64.p0(<vscale x 1 x double> %val, ptr %a, i32 8, <vscale x 1 x i1> %mask)
36 declare void @llvm.masked.store.nxv1f64.p0(<vscale x 1 x double>, ptr, i32, <vscale x 1 x i1>)
38 define void @masked_store_nxv2f16(<vscale x 2 x half> %val, ptr %a, <vscale x 2 x i1> %mask) nounwind {
39 ; CHECK-LABEL: masked_store_nxv2f16:
41 ; CHECK-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
42 ; CHECK-NEXT: vse16.v v8, (a0), v0.t
44 call void @llvm.masked.store.nxv2f16.p0(<vscale x 2 x half> %val, ptr %a, i32 2, <vscale x 2 x i1> %mask)
47 declare void @llvm.masked.store.nxv2f16.p0(<vscale x 2 x half>, ptr, i32, <vscale x 2 x i1>)
49 define void @masked_store_nxv2f32(<vscale x 2 x float> %val, ptr %a, <vscale x 2 x i1> %mask) nounwind {
50 ; CHECK-LABEL: masked_store_nxv2f32:
52 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
53 ; CHECK-NEXT: vse32.v v8, (a0), v0.t
55 call void @llvm.masked.store.nxv2f32.p0(<vscale x 2 x float> %val, ptr %a, i32 4, <vscale x 2 x i1> %mask)
58 declare void @llvm.masked.store.nxv2f32.p0(<vscale x 2 x float>, ptr, i32, <vscale x 2 x i1>)
60 define void @masked_store_nxv2f64(<vscale x 2 x double> %val, ptr %a, <vscale x 2 x i1> %mask) nounwind {
61 ; CHECK-LABEL: masked_store_nxv2f64:
63 ; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma
64 ; CHECK-NEXT: vse64.v v8, (a0), v0.t
66 call void @llvm.masked.store.nxv2f64.p0(<vscale x 2 x double> %val, ptr %a, i32 8, <vscale x 2 x i1> %mask)
69 declare void @llvm.masked.store.nxv2f64.p0(<vscale x 2 x double>, ptr, i32, <vscale x 2 x i1>)
71 define void @masked_store_nxv4f16(<vscale x 4 x half> %val, ptr %a, <vscale x 4 x i1> %mask) nounwind {
72 ; CHECK-LABEL: masked_store_nxv4f16:
74 ; CHECK-NEXT: vsetvli a1, zero, e16, m1, ta, ma
75 ; CHECK-NEXT: vse16.v v8, (a0), v0.t
77 call void @llvm.masked.store.nxv4f16.p0(<vscale x 4 x half> %val, ptr %a, i32 2, <vscale x 4 x i1> %mask)
80 declare void @llvm.masked.store.nxv4f16.p0(<vscale x 4 x half>, ptr, i32, <vscale x 4 x i1>)
82 define void @masked_store_nxv4f32(<vscale x 4 x float> %val, ptr %a, <vscale x 4 x i1> %mask) nounwind {
83 ; CHECK-LABEL: masked_store_nxv4f32:
85 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
86 ; CHECK-NEXT: vse32.v v8, (a0), v0.t
88 call void @llvm.masked.store.nxv4f32.p0(<vscale x 4 x float> %val, ptr %a, i32 4, <vscale x 4 x i1> %mask)
91 declare void @llvm.masked.store.nxv4f32.p0(<vscale x 4 x float>, ptr, i32, <vscale x 4 x i1>)
93 define void @masked_store_nxv4f64(<vscale x 4 x double> %val, ptr %a, <vscale x 4 x i1> %mask) nounwind {
94 ; CHECK-LABEL: masked_store_nxv4f64:
96 ; CHECK-NEXT: vsetvli a1, zero, e64, m4, ta, ma
97 ; CHECK-NEXT: vse64.v v8, (a0), v0.t
99 call void @llvm.masked.store.nxv4f64.p0(<vscale x 4 x double> %val, ptr %a, i32 8, <vscale x 4 x i1> %mask)
102 declare void @llvm.masked.store.nxv4f64.p0(<vscale x 4 x double>, ptr, i32, <vscale x 4 x i1>)
104 define void @masked_store_nxv8f16(<vscale x 8 x half> %val, ptr %a, <vscale x 8 x i1> %mask) nounwind {
105 ; CHECK-LABEL: masked_store_nxv8f16:
107 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
108 ; CHECK-NEXT: vse16.v v8, (a0), v0.t
110 call void @llvm.masked.store.nxv8f16.p0(<vscale x 8 x half> %val, ptr %a, i32 2, <vscale x 8 x i1> %mask)
113 declare void @llvm.masked.store.nxv8f16.p0(<vscale x 8 x half>, ptr, i32, <vscale x 8 x i1>)
115 define void @masked_store_nxv8f32(<vscale x 8 x float> %val, ptr %a, <vscale x 8 x i1> %mask) nounwind {
116 ; CHECK-LABEL: masked_store_nxv8f32:
118 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
119 ; CHECK-NEXT: vse32.v v8, (a0), v0.t
121 call void @llvm.masked.store.nxv8f32.p0(<vscale x 8 x float> %val, ptr %a, i32 4, <vscale x 8 x i1> %mask)
124 declare void @llvm.masked.store.nxv8f32.p0(<vscale x 8 x float>, ptr, i32, <vscale x 8 x i1>)
126 define void @masked_store_nxv8f64(<vscale x 8 x double> %val, ptr %a, <vscale x 8 x i1> %mask) nounwind {
127 ; CHECK-LABEL: masked_store_nxv8f64:
129 ; CHECK-NEXT: vsetvli a1, zero, e64, m8, ta, ma
130 ; CHECK-NEXT: vse64.v v8, (a0), v0.t
132 call void @llvm.masked.store.nxv8f64.p0(<vscale x 8 x double> %val, ptr %a, i32 8, <vscale x 8 x i1> %mask)
135 declare void @llvm.masked.store.nxv8f64.p0(<vscale x 8 x double>, ptr, i32, <vscale x 8 x i1>)
137 define void @masked_store_nxv16f16(<vscale x 16 x half> %val, ptr %a, <vscale x 16 x i1> %mask) nounwind {
138 ; CHECK-LABEL: masked_store_nxv16f16:
140 ; CHECK-NEXT: vsetvli a1, zero, e16, m4, ta, ma
141 ; CHECK-NEXT: vse16.v v8, (a0), v0.t
143 call void @llvm.masked.store.nxv16f16.p0(<vscale x 16 x half> %val, ptr %a, i32 2, <vscale x 16 x i1> %mask)
146 declare void @llvm.masked.store.nxv16f16.p0(<vscale x 16 x half>, ptr, i32, <vscale x 16 x i1>)
148 define void @masked_store_nxv16f32(<vscale x 16 x float> %val, ptr %a, <vscale x 16 x i1> %mask) nounwind {
149 ; CHECK-LABEL: masked_store_nxv16f32:
151 ; CHECK-NEXT: vsetvli a1, zero, e32, m8, ta, ma
152 ; CHECK-NEXT: vse32.v v8, (a0), v0.t
154 call void @llvm.masked.store.nxv16f32.p0(<vscale x 16 x float> %val, ptr %a, i32 4, <vscale x 16 x i1> %mask)
157 declare void @llvm.masked.store.nxv16f32.p0(<vscale x 16 x float>, ptr, i32, <vscale x 16 x i1>)
159 define void @masked_store_nxv32f16(<vscale x 32 x half> %val, ptr %a, <vscale x 32 x i1> %mask) nounwind {
160 ; CHECK-LABEL: masked_store_nxv32f16:
162 ; CHECK-NEXT: vsetvli a1, zero, e16, m8, ta, ma
163 ; CHECK-NEXT: vse16.v v8, (a0), v0.t
165 call void @llvm.masked.store.nxv32f16.p0(<vscale x 32 x half> %val, ptr %a, i32 2, <vscale x 32 x i1> %mask)
168 declare void @llvm.masked.store.nxv32f16.p0(<vscale x 32 x half>, ptr, i32, <vscale x 32 x i1>)