1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: sed 's/iXLen/i32/g' %s | llc -mtriple=riscv32 -mattr=+v,+xsfvqmaccdod \
3 ; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK
4 ; RUN: sed 's/iXLen/i64/g' %s | llc -mtriple=riscv64 -mattr=+v,+xsfvqmaccdod \
5 ; RUN: -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK
7 declare <vscale x 2 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv2i32.nxv8i8.nxv8i8(
13 define <vscale x 2 x i32> @intrinsic_vqmaccus_2x8x2_tu_i32m1(<vscale x 2 x i32> %0, <vscale x 8 x i8> %1, <vscale x 8 x i8> %2, iXLen %3) nounwind {
14 ; CHECK-LABEL: intrinsic_vqmaccus_2x8x2_tu_i32m1:
15 ; CHECK: # %bb.0: # %entry
16 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, tu, ma
17 ; CHECK-NEXT: sf.vqmaccus.2x8x2 v8, v9, v10
20 %a = call <vscale x 2 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv2i32.nxv8i8.nxv8i8(
21 <vscale x 2 x i32> %0,
26 ret <vscale x 2 x i32> %a
29 define <vscale x 2 x i32> @intrinsic_vqmaccus_2x8x2_ta_i32m1(<vscale x 2 x i32> %0, <vscale x 8 x i8> %1, <vscale x 8 x i8> %2, iXLen %3) nounwind {
30 ; CHECK-LABEL: intrinsic_vqmaccus_2x8x2_ta_i32m1:
31 ; CHECK: # %bb.0: # %entry
32 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
33 ; CHECK-NEXT: sf.vqmaccus.2x8x2 v8, v9, v10
36 %a = call <vscale x 2 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv2i32.nxv8i8.nxv8i8(
37 <vscale x 2 x i32> %0,
42 ret <vscale x 2 x i32> %a
45 declare <vscale x 4 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv4i32.nxv8i8.nxv16i8(
51 define <vscale x 4 x i32> @intrinsic_vqmaccus_2x8x2_tu_i32m2(<vscale x 4 x i32> %0, <vscale x 8 x i8> %1, <vscale x 16 x i8> %2, iXLen %3) nounwind {
52 ; CHECK-LABEL: intrinsic_vqmaccus_2x8x2_tu_i32m2:
53 ; CHECK: # %bb.0: # %entry
54 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, tu, ma
55 ; CHECK-NEXT: sf.vqmaccus.2x8x2 v8, v10, v12
58 %a = call <vscale x 4 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv4i32.nxv8i8.nxv16i8(
59 <vscale x 4 x i32> %0,
61 <vscale x 16 x i8> %2,
64 ret <vscale x 4 x i32> %a
67 define <vscale x 4 x i32> @intrinsic_vqmaccus_2x8x2_ta_i32m2(<vscale x 4 x i32> %0, <vscale x 8 x i8> %1, <vscale x 16 x i8> %2, iXLen %3) nounwind {
68 ; CHECK-LABEL: intrinsic_vqmaccus_2x8x2_ta_i32m2:
69 ; CHECK: # %bb.0: # %entry
70 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, ma
71 ; CHECK-NEXT: sf.vqmaccus.2x8x2 v8, v10, v12
74 %a = call <vscale x 4 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv4i32.nxv8i8.nxv16i8(
75 <vscale x 4 x i32> %0,
77 <vscale x 16 x i8> %2,
80 ret <vscale x 4 x i32> %a
83 declare <vscale x 8 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv8i32.nxv8i8.nxv32i8(
89 define <vscale x 8 x i32> @intrinsic_vqmaccus_2x8x2_tu_i32m4(<vscale x 8 x i32> %0, <vscale x 8 x i8> %1, <vscale x 32 x i8> %2, iXLen %3) nounwind {
90 ; CHECK-LABEL: intrinsic_vqmaccus_2x8x2_tu_i32m4:
91 ; CHECK: # %bb.0: # %entry
92 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, tu, ma
93 ; CHECK-NEXT: sf.vqmaccus.2x8x2 v8, v12, v16
96 %a = call <vscale x 8 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv8i32.nxv8i8.nxv32i8(
97 <vscale x 8 x i32> %0,
99 <vscale x 32 x i8> %2,
102 ret <vscale x 8 x i32> %a
105 define <vscale x 8 x i32> @intrinsic_vqmaccus_2x8x2_ta_i32m4(<vscale x 8 x i32> %0, <vscale x 8 x i8> %1, <vscale x 32 x i8> %2, iXLen %3) nounwind {
106 ; CHECK-LABEL: intrinsic_vqmaccus_2x8x2_ta_i32m4:
107 ; CHECK: # %bb.0: # %entry
108 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, ma
109 ; CHECK-NEXT: sf.vqmaccus.2x8x2 v8, v12, v16
112 %a = call <vscale x 8 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv8i32.nxv8i8.nxv32i8(
113 <vscale x 8 x i32> %0,
114 <vscale x 8 x i8> %1,
115 <vscale x 32 x i8> %2,
118 ret <vscale x 8 x i32> %a
121 declare <vscale x 16 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv16i32.nxv8i8.nxv64i8(
127 define <vscale x 16 x i32> @intrinsic_vqmaccus_2x8x2_tu_i32m8(<vscale x 16 x i32> %0, <vscale x 8 x i8> %1, <vscale x 64 x i8> %2, iXLen %3) nounwind {
128 ; CHECK-LABEL: intrinsic_vqmaccus_2x8x2_tu_i32m8:
129 ; CHECK: # %bb.0: # %entry
130 ; CHECK-NEXT: vl8r.v v24, (a0)
131 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, tu, ma
132 ; CHECK-NEXT: sf.vqmaccus.2x8x2 v8, v16, v24
135 %a = call <vscale x 16 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv16i32.nxv8i8.nxv64i8(
136 <vscale x 16 x i32> %0,
137 <vscale x 8 x i8> %1,
138 <vscale x 64 x i8> %2,
141 ret <vscale x 16 x i32> %a
144 define <vscale x 16 x i32> @intrinsic_vqmaccus_2x8x2_ta_i32m8(<vscale x 16 x i32> %0, <vscale x 8 x i8> %1, <vscale x 64 x i8> %2, iXLen %3) nounwind {
145 ; CHECK-LABEL: intrinsic_vqmaccus_2x8x2_ta_i32m8:
146 ; CHECK: # %bb.0: # %entry
147 ; CHECK-NEXT: vl8r.v v24, (a0)
148 ; CHECK-NEXT: vsetvli zero, a1, e8, m8, ta, ma
149 ; CHECK-NEXT: sf.vqmaccus.2x8x2 v8, v16, v24
152 %a = call <vscale x 16 x i32> @llvm.riscv.sf.vqmaccus.2x8x2.nxv16i32.nxv8i8.nxv64i8(
153 <vscale x 16 x i32> %0,
154 <vscale x 8 x i8> %1,
155 <vscale x 64 x i8> %2,
158 ret <vscale x 16 x i32> %a