1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
4 declare i8 @llvm.riscv.vmv.x.s.nxv1i8(<vscale x 1 x i8>)
6 define signext i8 @intrinsic_vmv.x.s_s_nxv1i8(<vscale x 1 x i8> %0) nounwind {
7 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv1i8:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: vsetivli zero, 1, e8, m1, ta, ma
10 ; CHECK-NEXT: vmv.x.s a0, v8
13 %a = call i8 @llvm.riscv.vmv.x.s.nxv1i8(<vscale x 1 x i8> %0)
17 declare i8 @llvm.riscv.vmv.x.s.nxv2i8(<vscale x 2 x i8>)
19 define signext i8 @intrinsic_vmv.x.s_s_nxv2i8(<vscale x 2 x i8> %0) nounwind {
20 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv2i8:
21 ; CHECK: # %bb.0: # %entry
22 ; CHECK-NEXT: vsetivli zero, 1, e8, m1, ta, ma
23 ; CHECK-NEXT: vmv.x.s a0, v8
26 %a = call i8 @llvm.riscv.vmv.x.s.nxv2i8(<vscale x 2 x i8> %0)
30 declare i8 @llvm.riscv.vmv.x.s.nxv4i8(<vscale x 4 x i8>)
32 define signext i8 @intrinsic_vmv.x.s_s_nxv4i8(<vscale x 4 x i8> %0) nounwind {
33 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv4i8:
34 ; CHECK: # %bb.0: # %entry
35 ; CHECK-NEXT: vsetivli zero, 1, e8, m1, ta, ma
36 ; CHECK-NEXT: vmv.x.s a0, v8
39 %a = call i8 @llvm.riscv.vmv.x.s.nxv4i8(<vscale x 4 x i8> %0)
43 declare i8 @llvm.riscv.vmv.x.s.nxv8i8(<vscale x 8 x i8>)
45 define signext i8 @intrinsic_vmv.x.s_s_nxv8i8(<vscale x 8 x i8> %0) nounwind {
46 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv8i8:
47 ; CHECK: # %bb.0: # %entry
48 ; CHECK-NEXT: vsetivli zero, 1, e8, m1, ta, ma
49 ; CHECK-NEXT: vmv.x.s a0, v8
52 %a = call i8 @llvm.riscv.vmv.x.s.nxv8i8(<vscale x 8 x i8> %0)
56 declare i8 @llvm.riscv.vmv.x.s.nxv16i8(<vscale x 16 x i8>)
58 define signext i8 @intrinsic_vmv.x.s_s_nxv16i8(<vscale x 16 x i8> %0) nounwind {
59 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv16i8:
60 ; CHECK: # %bb.0: # %entry
61 ; CHECK-NEXT: vsetivli zero, 1, e8, m1, ta, ma
62 ; CHECK-NEXT: vmv.x.s a0, v8
65 %a = call i8 @llvm.riscv.vmv.x.s.nxv16i8(<vscale x 16 x i8> %0)
69 declare i8 @llvm.riscv.vmv.x.s.nxv32i8(<vscale x 32 x i8>)
71 define signext i8 @intrinsic_vmv.x.s_s_nxv32i8(<vscale x 32 x i8> %0) nounwind {
72 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv32i8:
73 ; CHECK: # %bb.0: # %entry
74 ; CHECK-NEXT: vsetivli zero, 1, e8, m1, ta, ma
75 ; CHECK-NEXT: vmv.x.s a0, v8
78 %a = call i8 @llvm.riscv.vmv.x.s.nxv32i8(<vscale x 32 x i8> %0)
82 declare i8 @llvm.riscv.vmv.x.s.nxv64i8(<vscale x 64 x i8>)
84 define signext i8 @intrinsic_vmv.x.s_s_nxv64i8(<vscale x 64 x i8> %0) nounwind {
85 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv64i8:
86 ; CHECK: # %bb.0: # %entry
87 ; CHECK-NEXT: vsetivli zero, 1, e8, m1, ta, ma
88 ; CHECK-NEXT: vmv.x.s a0, v8
91 %a = call i8 @llvm.riscv.vmv.x.s.nxv64i8(<vscale x 64 x i8> %0)
95 declare i16 @llvm.riscv.vmv.x.s.nxv1i16(<vscale x 1 x i16>)
97 define signext i16 @intrinsic_vmv.x.s_s_nxv1i16(<vscale x 1 x i16> %0) nounwind {
98 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv1i16:
99 ; CHECK: # %bb.0: # %entry
100 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
101 ; CHECK-NEXT: vmv.x.s a0, v8
104 %a = call i16 @llvm.riscv.vmv.x.s.nxv1i16(<vscale x 1 x i16> %0)
108 declare i16 @llvm.riscv.vmv.x.s.nxv2i16(<vscale x 2 x i16>)
110 define signext i16 @intrinsic_vmv.x.s_s_nxv2i16(<vscale x 2 x i16> %0) nounwind {
111 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv2i16:
112 ; CHECK: # %bb.0: # %entry
113 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
114 ; CHECK-NEXT: vmv.x.s a0, v8
117 %a = call i16 @llvm.riscv.vmv.x.s.nxv2i16(<vscale x 2 x i16> %0)
121 declare i16 @llvm.riscv.vmv.x.s.nxv4i16(<vscale x 4 x i16>)
123 define signext i16 @intrinsic_vmv.x.s_s_nxv4i16(<vscale x 4 x i16> %0) nounwind {
124 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv4i16:
125 ; CHECK: # %bb.0: # %entry
126 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
127 ; CHECK-NEXT: vmv.x.s a0, v8
130 %a = call i16 @llvm.riscv.vmv.x.s.nxv4i16(<vscale x 4 x i16> %0)
134 declare i16 @llvm.riscv.vmv.x.s.nxv8i16(<vscale x 8 x i16>)
136 define signext i16 @intrinsic_vmv.x.s_s_nxv8i16(<vscale x 8 x i16> %0) nounwind {
137 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv8i16:
138 ; CHECK: # %bb.0: # %entry
139 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
140 ; CHECK-NEXT: vmv.x.s a0, v8
143 %a = call i16 @llvm.riscv.vmv.x.s.nxv8i16(<vscale x 8 x i16> %0)
147 declare i16 @llvm.riscv.vmv.x.s.nxv16i16(<vscale x 16 x i16>)
149 define signext i16 @intrinsic_vmv.x.s_s_nxv16i16(<vscale x 16 x i16> %0) nounwind {
150 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv16i16:
151 ; CHECK: # %bb.0: # %entry
152 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
153 ; CHECK-NEXT: vmv.x.s a0, v8
156 %a = call i16 @llvm.riscv.vmv.x.s.nxv16i16( <vscale x 16 x i16> %0)
160 declare i16 @llvm.riscv.vmv.x.s.nxv32i16( <vscale x 32 x i16>)
162 define signext i16 @intrinsic_vmv.x.s_s_nxv32i16(<vscale x 32 x i16> %0) nounwind {
163 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv32i16:
164 ; CHECK: # %bb.0: # %entry
165 ; CHECK-NEXT: vsetivli zero, 1, e16, m1, ta, ma
166 ; CHECK-NEXT: vmv.x.s a0, v8
169 %a = call i16 @llvm.riscv.vmv.x.s.nxv32i16( <vscale x 32 x i16> %0)
173 declare i32 @llvm.riscv.vmv.x.s.nxv1i32( <vscale x 1 x i32>)
175 define i32 @intrinsic_vmv.x.s_s_nxv1i32(<vscale x 1 x i32> %0) nounwind {
176 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv1i32:
177 ; CHECK: # %bb.0: # %entry
178 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
179 ; CHECK-NEXT: vmv.x.s a0, v8
182 %a = call i32 @llvm.riscv.vmv.x.s.nxv1i32( <vscale x 1 x i32> %0)
186 declare i32 @llvm.riscv.vmv.x.s.nxv2i32( <vscale x 2 x i32>)
188 define i32 @intrinsic_vmv.x.s_s_nxv2i32(<vscale x 2 x i32> %0) nounwind {
189 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv2i32:
190 ; CHECK: # %bb.0: # %entry
191 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
192 ; CHECK-NEXT: vmv.x.s a0, v8
195 %a = call i32 @llvm.riscv.vmv.x.s.nxv2i32( <vscale x 2 x i32> %0)
199 declare i32 @llvm.riscv.vmv.x.s.nxv4i32( <vscale x 4 x i32>)
201 define i32 @intrinsic_vmv.x.s_s_nxv4i32(<vscale x 4 x i32> %0) nounwind {
202 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv4i32:
203 ; CHECK: # %bb.0: # %entry
204 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
205 ; CHECK-NEXT: vmv.x.s a0, v8
208 %a = call i32 @llvm.riscv.vmv.x.s.nxv4i32( <vscale x 4 x i32> %0)
212 declare i32 @llvm.riscv.vmv.x.s.nxv8i32( <vscale x 8 x i32>)
214 define i32 @intrinsic_vmv.x.s_s_nxv8i32(<vscale x 8 x i32> %0) nounwind {
215 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv8i32:
216 ; CHECK: # %bb.0: # %entry
217 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
218 ; CHECK-NEXT: vmv.x.s a0, v8
221 %a = call i32 @llvm.riscv.vmv.x.s.nxv8i32( <vscale x 8 x i32> %0)
225 declare i32 @llvm.riscv.vmv.x.s.nxv16i32( <vscale x 16 x i32>)
227 define i32 @intrinsic_vmv.x.s_s_nxv16i32(<vscale x 16 x i32> %0) nounwind {
228 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv16i32:
229 ; CHECK: # %bb.0: # %entry
230 ; CHECK-NEXT: vsetivli zero, 1, e32, m1, ta, ma
231 ; CHECK-NEXT: vmv.x.s a0, v8
234 %a = call i32 @llvm.riscv.vmv.x.s.nxv16i32( <vscale x 16 x i32> %0)
238 declare i64 @llvm.riscv.vmv.x.s.nxv1i64( <vscale x 1 x i64>)
240 define i64 @intrinsic_vmv.x.s_s_nxv1i64(<vscale x 1 x i64> %0) nounwind {
241 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv1i64:
242 ; CHECK: # %bb.0: # %entry
243 ; CHECK-NEXT: li a0, 32
244 ; CHECK-NEXT: vsetivli zero, 1, e64, m1, ta, ma
245 ; CHECK-NEXT: vsrl.vx v9, v8, a0
246 ; CHECK-NEXT: vmv.x.s a1, v9
247 ; CHECK-NEXT: vmv.x.s a0, v8
250 %a = call i64 @llvm.riscv.vmv.x.s.nxv1i64( <vscale x 1 x i64> %0)
254 declare i64 @llvm.riscv.vmv.x.s.nxv2i64( <vscale x 2 x i64>)
256 define i64 @intrinsic_vmv.x.s_s_nxv2i64(<vscale x 2 x i64> %0) nounwind {
257 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv2i64:
258 ; CHECK: # %bb.0: # %entry
259 ; CHECK-NEXT: li a0, 32
260 ; CHECK-NEXT: vsetivli zero, 1, e64, m2, ta, ma
261 ; CHECK-NEXT: vsrl.vx v10, v8, a0
262 ; CHECK-NEXT: vmv.x.s a1, v10
263 ; CHECK-NEXT: vmv.x.s a0, v8
266 %a = call i64 @llvm.riscv.vmv.x.s.nxv2i64( <vscale x 2 x i64> %0)
270 declare i64 @llvm.riscv.vmv.x.s.nxv4i64( <vscale x 4 x i64>)
272 define i64 @intrinsic_vmv.x.s_s_nxv4i64(<vscale x 4 x i64> %0) nounwind {
273 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv4i64:
274 ; CHECK: # %bb.0: # %entry
275 ; CHECK-NEXT: li a0, 32
276 ; CHECK-NEXT: vsetivli zero, 1, e64, m4, ta, ma
277 ; CHECK-NEXT: vsrl.vx v12, v8, a0
278 ; CHECK-NEXT: vmv.x.s a1, v12
279 ; CHECK-NEXT: vmv.x.s a0, v8
282 %a = call i64 @llvm.riscv.vmv.x.s.nxv4i64( <vscale x 4 x i64> %0)
286 declare i64 @llvm.riscv.vmv.x.s.nxv8i64(<vscale x 8 x i64>)
288 define i64 @intrinsic_vmv.x.s_s_nxv8i64(<vscale x 8 x i64> %0) nounwind {
289 ; CHECK-LABEL: intrinsic_vmv.x.s_s_nxv8i64:
290 ; CHECK: # %bb.0: # %entry
291 ; CHECK-NEXT: li a0, 32
292 ; CHECK-NEXT: vsetivli zero, 1, e64, m8, ta, ma
293 ; CHECK-NEXT: vsrl.vx v16, v8, a0
294 ; CHECK-NEXT: vmv.x.s a1, v16
295 ; CHECK-NEXT: vmv.x.s a0, v8
298 %a = call i64 @llvm.riscv.vmv.x.s.nxv8i64(<vscale x 8 x i64> %0)