1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v,+m -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+v,+m -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,RV64
7 declare <2 x i8> @llvm.vp.mul.nxv2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
8 declare <2 x i8> @llvm.vp.sub.nxv2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
9 declare <2 x i8> @llvm.vp.merge.nxv2i8(<2 x i1>, <2 x i8>, <2 x i8>, i32)
10 declare <2 x i8> @llvm.vp.select.nxv2i8(<2 x i1>, <2 x i8>, <2 x i8>, i32)
12 define <2 x i8> @vnmsac_vv_nxv2i8(<2 x i8> %a, <2 x i8> %b, <2 x i8> %c, <2 x i1> %m, i32 zeroext %evl) {
13 ; CHECK-LABEL: vnmsac_vv_nxv2i8:
15 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, tu, mu
16 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
17 ; CHECK-NEXT: vmv1r.v v8, v10
19 %x = call <2 x i8> @llvm.vp.mul.nxv2i8(<2 x i8> %a, <2 x i8> %b, <2 x i1> splat (i1 -1), i32 %evl)
20 %y = call <2 x i8> @llvm.vp.sub.nxv2i8(<2 x i8> %c, <2 x i8> %x, <2 x i1> splat (i1 -1), i32 %evl)
21 %u = call <2 x i8> @llvm.vp.merge.nxv2i8(<2 x i1> %m, <2 x i8> %y, <2 x i8> %c, i32 %evl)
25 define <2 x i8> @vnmsac_vv_nxv2i8_unmasked(<2 x i8> %a, <2 x i8> %b, <2 x i8> %c, <2 x i1> %m, i32 zeroext %evl) {
26 ; CHECK-LABEL: vnmsac_vv_nxv2i8_unmasked:
28 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, tu, ma
29 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
30 ; CHECK-NEXT: vmv1r.v v8, v10
32 %x = call <2 x i8> @llvm.vp.mul.nxv2i8(<2 x i8> %a, <2 x i8> %b, <2 x i1> splat (i1 -1), i32 %evl)
33 %y = call <2 x i8> @llvm.vp.sub.nxv2i8(<2 x i8> %c, <2 x i8> %x, <2 x i1> splat (i1 -1), i32 %evl)
34 %u = call <2 x i8> @llvm.vp.merge.nxv2i8(<2 x i1> splat (i1 -1), <2 x i8> %y, <2 x i8> %c, i32 %evl)
38 define <2 x i8> @vnmsac_vx_nxv2i8(<2 x i8> %a, i8 %b, <2 x i8> %c, <2 x i1> %m, i32 zeroext %evl) {
39 ; CHECK-LABEL: vnmsac_vx_nxv2i8:
41 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, tu, mu
42 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
43 ; CHECK-NEXT: vmv1r.v v8, v9
45 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
46 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
47 %x = call <2 x i8> @llvm.vp.mul.nxv2i8(<2 x i8> %a, <2 x i8> %vb, <2 x i1> splat (i1 -1), i32 %evl)
48 %y = call <2 x i8> @llvm.vp.sub.nxv2i8(<2 x i8> %c, <2 x i8> %x, <2 x i1> splat (i1 -1), i32 %evl)
49 %u = call <2 x i8> @llvm.vp.merge.nxv2i8(<2 x i1> %m, <2 x i8> %y, <2 x i8> %c, i32 %evl)
53 define <2 x i8> @vnmsac_vx_nxv2i8_unmasked(<2 x i8> %a, i8 %b, <2 x i8> %c, <2 x i1> %m, i32 zeroext %evl) {
54 ; CHECK-LABEL: vnmsac_vx_nxv2i8_unmasked:
56 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, tu, ma
57 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
58 ; CHECK-NEXT: vmv1r.v v8, v9
60 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
61 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
62 %x = call <2 x i8> @llvm.vp.mul.nxv2i8(<2 x i8> %a, <2 x i8> %vb, <2 x i1> splat (i1 -1), i32 %evl)
63 %y = call <2 x i8> @llvm.vp.sub.nxv2i8(<2 x i8> %c, <2 x i8> %x, <2 x i1> splat (i1 -1), i32 %evl)
64 %u = call <2 x i8> @llvm.vp.merge.nxv2i8(<2 x i1> splat (i1 -1), <2 x i8> %y, <2 x i8> %c, i32 %evl)
68 define <2 x i8> @vnmsac_vv_nxv2i8_ta(<2 x i8> %a, <2 x i8> %b, <2 x i8> %c, <2 x i1> %m, i32 zeroext %evl) {
69 ; CHECK-LABEL: vnmsac_vv_nxv2i8_ta:
71 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, mu
72 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
73 ; CHECK-NEXT: vmv1r.v v8, v10
75 %x = call <2 x i8> @llvm.vp.mul.nxv2i8(<2 x i8> %a, <2 x i8> %b, <2 x i1> splat (i1 -1), i32 %evl)
76 %y = call <2 x i8> @llvm.vp.sub.nxv2i8(<2 x i8> %c, <2 x i8> %x, <2 x i1> splat (i1 -1), i32 %evl)
77 %u = call <2 x i8> @llvm.vp.select.nxv2i8(<2 x i1> %m, <2 x i8> %y, <2 x i8> %c, i32 %evl)
81 define <2 x i8> @vnmsac_vx_nxv2i8_ta(<2 x i8> %a, i8 %b, <2 x i8> %c, <2 x i1> %m, i32 zeroext %evl) {
82 ; CHECK-LABEL: vnmsac_vx_nxv2i8_ta:
84 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, mu
85 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
86 ; CHECK-NEXT: vmv1r.v v8, v9
88 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
89 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
90 %x = call <2 x i8> @llvm.vp.mul.nxv2i8(<2 x i8> %a, <2 x i8> %vb, <2 x i1> splat (i1 -1), i32 %evl)
91 %y = call <2 x i8> @llvm.vp.sub.nxv2i8(<2 x i8> %c, <2 x i8> %x, <2 x i1> splat (i1 -1), i32 %evl)
92 %u = call <2 x i8> @llvm.vp.select.nxv2i8(<2 x i1> %m, <2 x i8> %y, <2 x i8> %c, i32 %evl)
96 declare <4 x i8> @llvm.vp.mul.nxv4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
97 declare <4 x i8> @llvm.vp.sub.nxv4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
98 declare <4 x i8> @llvm.vp.merge.nxv4i8(<4 x i1>, <4 x i8>, <4 x i8>, i32)
99 declare <4 x i8> @llvm.vp.select.nxv4i8(<4 x i1>, <4 x i8>, <4 x i8>, i32)
101 define <4 x i8> @vnmsac_vv_nxv4i8(<4 x i8> %a, <4 x i8> %b, <4 x i8> %c, <4 x i1> %m, i32 zeroext %evl) {
102 ; CHECK-LABEL: vnmsac_vv_nxv4i8:
104 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, tu, mu
105 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
106 ; CHECK-NEXT: vmv1r.v v8, v10
108 %x = call <4 x i8> @llvm.vp.mul.nxv4i8(<4 x i8> %a, <4 x i8> %b, <4 x i1> splat (i1 -1), i32 %evl)
109 %y = call <4 x i8> @llvm.vp.sub.nxv4i8(<4 x i8> %c, <4 x i8> %x, <4 x i1> splat (i1 -1), i32 %evl)
110 %u = call <4 x i8> @llvm.vp.merge.nxv4i8(<4 x i1> %m, <4 x i8> %y, <4 x i8> %c, i32 %evl)
114 define <4 x i8> @vnmsac_vv_nxv4i8_unmasked(<4 x i8> %a, <4 x i8> %b, <4 x i8> %c, <4 x i1> %m, i32 zeroext %evl) {
115 ; CHECK-LABEL: vnmsac_vv_nxv4i8_unmasked:
117 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, tu, ma
118 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
119 ; CHECK-NEXT: vmv1r.v v8, v10
121 %x = call <4 x i8> @llvm.vp.mul.nxv4i8(<4 x i8> %a, <4 x i8> %b, <4 x i1> splat (i1 -1), i32 %evl)
122 %y = call <4 x i8> @llvm.vp.sub.nxv4i8(<4 x i8> %c, <4 x i8> %x, <4 x i1> splat (i1 -1), i32 %evl)
123 %u = call <4 x i8> @llvm.vp.merge.nxv4i8(<4 x i1> splat (i1 -1), <4 x i8> %y, <4 x i8> %c, i32 %evl)
127 define <4 x i8> @vnmsac_vx_nxv4i8(<4 x i8> %a, i8 %b, <4 x i8> %c, <4 x i1> %m, i32 zeroext %evl) {
128 ; CHECK-LABEL: vnmsac_vx_nxv4i8:
130 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, tu, mu
131 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
132 ; CHECK-NEXT: vmv1r.v v8, v9
134 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
135 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
136 %x = call <4 x i8> @llvm.vp.mul.nxv4i8(<4 x i8> %a, <4 x i8> %vb, <4 x i1> splat (i1 -1), i32 %evl)
137 %y = call <4 x i8> @llvm.vp.sub.nxv4i8(<4 x i8> %c, <4 x i8> %x, <4 x i1> splat (i1 -1), i32 %evl)
138 %u = call <4 x i8> @llvm.vp.merge.nxv4i8(<4 x i1> %m, <4 x i8> %y, <4 x i8> %c, i32 %evl)
142 define <4 x i8> @vnmsac_vx_nxv4i8_unmasked(<4 x i8> %a, i8 %b, <4 x i8> %c, <4 x i1> %m, i32 zeroext %evl) {
143 ; CHECK-LABEL: vnmsac_vx_nxv4i8_unmasked:
145 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, tu, ma
146 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
147 ; CHECK-NEXT: vmv1r.v v8, v9
149 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
150 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
151 %x = call <4 x i8> @llvm.vp.mul.nxv4i8(<4 x i8> %a, <4 x i8> %vb, <4 x i1> splat (i1 -1), i32 %evl)
152 %y = call <4 x i8> @llvm.vp.sub.nxv4i8(<4 x i8> %c, <4 x i8> %x, <4 x i1> splat (i1 -1), i32 %evl)
153 %u = call <4 x i8> @llvm.vp.merge.nxv4i8(<4 x i1> splat (i1 -1), <4 x i8> %y, <4 x i8> %c, i32 %evl)
157 define <4 x i8> @vnmsac_vv_nxv4i8_ta(<4 x i8> %a, <4 x i8> %b, <4 x i8> %c, <4 x i1> %m, i32 zeroext %evl) {
158 ; CHECK-LABEL: vnmsac_vv_nxv4i8_ta:
160 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, mu
161 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
162 ; CHECK-NEXT: vmv1r.v v8, v10
164 %x = call <4 x i8> @llvm.vp.mul.nxv4i8(<4 x i8> %a, <4 x i8> %b, <4 x i1> splat (i1 -1), i32 %evl)
165 %y = call <4 x i8> @llvm.vp.sub.nxv4i8(<4 x i8> %c, <4 x i8> %x, <4 x i1> splat (i1 -1), i32 %evl)
166 %u = call <4 x i8> @llvm.vp.select.nxv4i8(<4 x i1> %m, <4 x i8> %y, <4 x i8> %c, i32 %evl)
170 define <4 x i8> @vnmsac_vx_nxv4i8_ta(<4 x i8> %a, i8 %b, <4 x i8> %c, <4 x i1> %m, i32 zeroext %evl) {
171 ; CHECK-LABEL: vnmsac_vx_nxv4i8_ta:
173 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, mu
174 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
175 ; CHECK-NEXT: vmv1r.v v8, v9
177 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
178 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
179 %x = call <4 x i8> @llvm.vp.mul.nxv4i8(<4 x i8> %a, <4 x i8> %vb, <4 x i1> splat (i1 -1), i32 %evl)
180 %y = call <4 x i8> @llvm.vp.sub.nxv4i8(<4 x i8> %c, <4 x i8> %x, <4 x i1> splat (i1 -1), i32 %evl)
181 %u = call <4 x i8> @llvm.vp.select.nxv4i8(<4 x i1> %m, <4 x i8> %y, <4 x i8> %c, i32 %evl)
185 declare <8 x i8> @llvm.vp.mul.nxv8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
186 declare <8 x i8> @llvm.vp.sub.nxv8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
187 declare <8 x i8> @llvm.vp.merge.nxv8i8(<8 x i1>, <8 x i8>, <8 x i8>, i32)
188 declare <8 x i8> @llvm.vp.select.nxv8i8(<8 x i1>, <8 x i8>, <8 x i8>, i32)
190 define <8 x i8> @vnmsac_vv_nxv8i8(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c, <8 x i1> %m, i32 zeroext %evl) {
191 ; CHECK-LABEL: vnmsac_vv_nxv8i8:
193 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, tu, mu
194 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
195 ; CHECK-NEXT: vmv1r.v v8, v10
197 %x = call <8 x i8> @llvm.vp.mul.nxv8i8(<8 x i8> %a, <8 x i8> %b, <8 x i1> splat (i1 -1), i32 %evl)
198 %y = call <8 x i8> @llvm.vp.sub.nxv8i8(<8 x i8> %c, <8 x i8> %x, <8 x i1> splat (i1 -1), i32 %evl)
199 %u = call <8 x i8> @llvm.vp.merge.nxv8i8(<8 x i1> %m, <8 x i8> %y, <8 x i8> %c, i32 %evl)
203 define <8 x i8> @vnmsac_vv_nxv8i8_unmasked(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c, <8 x i1> %m, i32 zeroext %evl) {
204 ; CHECK-LABEL: vnmsac_vv_nxv8i8_unmasked:
206 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, tu, ma
207 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
208 ; CHECK-NEXT: vmv1r.v v8, v10
210 %x = call <8 x i8> @llvm.vp.mul.nxv8i8(<8 x i8> %a, <8 x i8> %b, <8 x i1> splat (i1 -1), i32 %evl)
211 %y = call <8 x i8> @llvm.vp.sub.nxv8i8(<8 x i8> %c, <8 x i8> %x, <8 x i1> splat (i1 -1), i32 %evl)
212 %u = call <8 x i8> @llvm.vp.merge.nxv8i8(<8 x i1> splat (i1 -1), <8 x i8> %y, <8 x i8> %c, i32 %evl)
216 define <8 x i8> @vnmsac_vx_nxv8i8(<8 x i8> %a, i8 %b, <8 x i8> %c, <8 x i1> %m, i32 zeroext %evl) {
217 ; CHECK-LABEL: vnmsac_vx_nxv8i8:
219 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, tu, mu
220 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
221 ; CHECK-NEXT: vmv1r.v v8, v9
223 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
224 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
225 %x = call <8 x i8> @llvm.vp.mul.nxv8i8(<8 x i8> %a, <8 x i8> %vb, <8 x i1> splat (i1 -1), i32 %evl)
226 %y = call <8 x i8> @llvm.vp.sub.nxv8i8(<8 x i8> %c, <8 x i8> %x, <8 x i1> splat (i1 -1), i32 %evl)
227 %u = call <8 x i8> @llvm.vp.merge.nxv8i8(<8 x i1> %m, <8 x i8> %y, <8 x i8> %c, i32 %evl)
231 define <8 x i8> @vnmsac_vx_nxv8i8_unmasked(<8 x i8> %a, i8 %b, <8 x i8> %c, <8 x i1> %m, i32 zeroext %evl) {
232 ; CHECK-LABEL: vnmsac_vx_nxv8i8_unmasked:
234 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, tu, ma
235 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
236 ; CHECK-NEXT: vmv1r.v v8, v9
238 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
239 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
240 %x = call <8 x i8> @llvm.vp.mul.nxv8i8(<8 x i8> %a, <8 x i8> %vb, <8 x i1> splat (i1 -1), i32 %evl)
241 %y = call <8 x i8> @llvm.vp.sub.nxv8i8(<8 x i8> %c, <8 x i8> %x, <8 x i1> splat (i1 -1), i32 %evl)
242 %u = call <8 x i8> @llvm.vp.merge.nxv8i8(<8 x i1> splat (i1 -1), <8 x i8> %y, <8 x i8> %c, i32 %evl)
246 define <8 x i8> @vnmsac_vv_nxv8i8_ta(<8 x i8> %a, <8 x i8> %b, <8 x i8> %c, <8 x i1> %m, i32 zeroext %evl) {
247 ; CHECK-LABEL: vnmsac_vv_nxv8i8_ta:
249 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, mu
250 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
251 ; CHECK-NEXT: vmv1r.v v8, v10
253 %x = call <8 x i8> @llvm.vp.mul.nxv8i8(<8 x i8> %a, <8 x i8> %b, <8 x i1> splat (i1 -1), i32 %evl)
254 %y = call <8 x i8> @llvm.vp.sub.nxv8i8(<8 x i8> %c, <8 x i8> %x, <8 x i1> splat (i1 -1), i32 %evl)
255 %u = call <8 x i8> @llvm.vp.select.nxv8i8(<8 x i1> %m, <8 x i8> %y, <8 x i8> %c, i32 %evl)
259 define <8 x i8> @vnmsac_vx_nxv8i8_ta(<8 x i8> %a, i8 %b, <8 x i8> %c, <8 x i1> %m, i32 zeroext %evl) {
260 ; CHECK-LABEL: vnmsac_vx_nxv8i8_ta:
262 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, mu
263 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
264 ; CHECK-NEXT: vmv1r.v v8, v9
266 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
267 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
268 %x = call <8 x i8> @llvm.vp.mul.nxv8i8(<8 x i8> %a, <8 x i8> %vb, <8 x i1> splat (i1 -1), i32 %evl)
269 %y = call <8 x i8> @llvm.vp.sub.nxv8i8(<8 x i8> %c, <8 x i8> %x, <8 x i1> splat (i1 -1), i32 %evl)
270 %u = call <8 x i8> @llvm.vp.select.nxv8i8(<8 x i1> %m, <8 x i8> %y, <8 x i8> %c, i32 %evl)
274 declare <16 x i8> @llvm.vp.mul.nxv16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
275 declare <16 x i8> @llvm.vp.sub.nxv16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
276 declare <16 x i8> @llvm.vp.merge.nxv16i8(<16 x i1>, <16 x i8>, <16 x i8>, i32)
277 declare <16 x i8> @llvm.vp.select.nxv16i8(<16 x i1>, <16 x i8>, <16 x i8>, i32)
279 define <16 x i8> @vnmsac_vv_nxv16i8(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c, <16 x i1> %m, i32 zeroext %evl) {
280 ; CHECK-LABEL: vnmsac_vv_nxv16i8:
282 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, tu, mu
283 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
284 ; CHECK-NEXT: vmv1r.v v8, v10
286 %x = call <16 x i8> @llvm.vp.mul.nxv16i8(<16 x i8> %a, <16 x i8> %b, <16 x i1> splat (i1 -1), i32 %evl)
287 %y = call <16 x i8> @llvm.vp.sub.nxv16i8(<16 x i8> %c, <16 x i8> %x, <16 x i1> splat (i1 -1), i32 %evl)
288 %u = call <16 x i8> @llvm.vp.merge.nxv16i8(<16 x i1> %m, <16 x i8> %y, <16 x i8> %c, i32 %evl)
292 define <16 x i8> @vnmsac_vv_nxv16i8_unmasked(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c, <16 x i1> %m, i32 zeroext %evl) {
293 ; CHECK-LABEL: vnmsac_vv_nxv16i8_unmasked:
295 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, tu, ma
296 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
297 ; CHECK-NEXT: vmv1r.v v8, v10
299 %x = call <16 x i8> @llvm.vp.mul.nxv16i8(<16 x i8> %a, <16 x i8> %b, <16 x i1> splat (i1 -1), i32 %evl)
300 %y = call <16 x i8> @llvm.vp.sub.nxv16i8(<16 x i8> %c, <16 x i8> %x, <16 x i1> splat (i1 -1), i32 %evl)
301 %u = call <16 x i8> @llvm.vp.merge.nxv16i8(<16 x i1> splat (i1 -1), <16 x i8> %y, <16 x i8> %c, i32 %evl)
305 define <16 x i8> @vnmsac_vx_nxv16i8(<16 x i8> %a, i8 %b, <16 x i8> %c, <16 x i1> %m, i32 zeroext %evl) {
306 ; CHECK-LABEL: vnmsac_vx_nxv16i8:
308 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, tu, mu
309 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
310 ; CHECK-NEXT: vmv1r.v v8, v9
312 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
313 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
314 %x = call <16 x i8> @llvm.vp.mul.nxv16i8(<16 x i8> %a, <16 x i8> %vb, <16 x i1> splat (i1 -1), i32 %evl)
315 %y = call <16 x i8> @llvm.vp.sub.nxv16i8(<16 x i8> %c, <16 x i8> %x, <16 x i1> splat (i1 -1), i32 %evl)
316 %u = call <16 x i8> @llvm.vp.merge.nxv16i8(<16 x i1> %m, <16 x i8> %y, <16 x i8> %c, i32 %evl)
320 define <16 x i8> @vnmsac_vx_nxv16i8_unmasked(<16 x i8> %a, i8 %b, <16 x i8> %c, <16 x i1> %m, i32 zeroext %evl) {
321 ; CHECK-LABEL: vnmsac_vx_nxv16i8_unmasked:
323 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, tu, ma
324 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
325 ; CHECK-NEXT: vmv1r.v v8, v9
327 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
328 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
329 %x = call <16 x i8> @llvm.vp.mul.nxv16i8(<16 x i8> %a, <16 x i8> %vb, <16 x i1> splat (i1 -1), i32 %evl)
330 %y = call <16 x i8> @llvm.vp.sub.nxv16i8(<16 x i8> %c, <16 x i8> %x, <16 x i1> splat (i1 -1), i32 %evl)
331 %u = call <16 x i8> @llvm.vp.merge.nxv16i8(<16 x i1> splat (i1 -1), <16 x i8> %y, <16 x i8> %c, i32 %evl)
335 define <16 x i8> @vnmsac_vv_nxv16i8_ta(<16 x i8> %a, <16 x i8> %b, <16 x i8> %c, <16 x i1> %m, i32 zeroext %evl) {
336 ; CHECK-LABEL: vnmsac_vv_nxv16i8_ta:
338 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, mu
339 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
340 ; CHECK-NEXT: vmv.v.v v8, v10
342 %x = call <16 x i8> @llvm.vp.mul.nxv16i8(<16 x i8> %a, <16 x i8> %b, <16 x i1> splat (i1 -1), i32 %evl)
343 %y = call <16 x i8> @llvm.vp.sub.nxv16i8(<16 x i8> %c, <16 x i8> %x, <16 x i1> splat (i1 -1), i32 %evl)
344 %u = call <16 x i8> @llvm.vp.select.nxv16i8(<16 x i1> %m, <16 x i8> %y, <16 x i8> %c, i32 %evl)
348 define <16 x i8> @vnmsac_vx_nxv16i8_ta(<16 x i8> %a, i8 %b, <16 x i8> %c, <16 x i1> %m, i32 zeroext %evl) {
349 ; CHECK-LABEL: vnmsac_vx_nxv16i8_ta:
351 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, mu
352 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
353 ; CHECK-NEXT: vmv.v.v v8, v9
355 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
356 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
357 %x = call <16 x i8> @llvm.vp.mul.nxv16i8(<16 x i8> %a, <16 x i8> %vb, <16 x i1> splat (i1 -1), i32 %evl)
358 %y = call <16 x i8> @llvm.vp.sub.nxv16i8(<16 x i8> %c, <16 x i8> %x, <16 x i1> splat (i1 -1), i32 %evl)
359 %u = call <16 x i8> @llvm.vp.select.nxv16i8(<16 x i1> %m, <16 x i8> %y, <16 x i8> %c, i32 %evl)
363 declare <32 x i8> @llvm.vp.mul.nxv32i8(<32 x i8>, <32 x i8>, <32 x i1>, i32)
364 declare <32 x i8> @llvm.vp.sub.nxv32i8(<32 x i8>, <32 x i8>, <32 x i1>, i32)
365 declare <32 x i8> @llvm.vp.merge.nxv32i8(<32 x i1>, <32 x i8>, <32 x i8>, i32)
366 declare <32 x i8> @llvm.vp.select.nxv32i8(<32 x i1>, <32 x i8>, <32 x i8>, i32)
368 define <32 x i8> @vnmsac_vv_nxv32i8(<32 x i8> %a, <32 x i8> %b, <32 x i8> %c, <32 x i1> %m, i32 zeroext %evl) {
369 ; CHECK-LABEL: vnmsac_vv_nxv32i8:
371 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, tu, mu
372 ; CHECK-NEXT: vnmsac.vv v12, v8, v10, v0.t
373 ; CHECK-NEXT: vmv2r.v v8, v12
375 %x = call <32 x i8> @llvm.vp.mul.nxv32i8(<32 x i8> %a, <32 x i8> %b, <32 x i1> splat (i1 -1), i32 %evl)
376 %y = call <32 x i8> @llvm.vp.sub.nxv32i8(<32 x i8> %c, <32 x i8> %x, <32 x i1> splat (i1 -1), i32 %evl)
377 %u = call <32 x i8> @llvm.vp.merge.nxv32i8(<32 x i1> %m, <32 x i8> %y, <32 x i8> %c, i32 %evl)
381 define <32 x i8> @vnmsac_vv_nxv32i8_unmasked(<32 x i8> %a, <32 x i8> %b, <32 x i8> %c, <32 x i1> %m, i32 zeroext %evl) {
382 ; CHECK-LABEL: vnmsac_vv_nxv32i8_unmasked:
384 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, tu, ma
385 ; CHECK-NEXT: vnmsac.vv v12, v8, v10
386 ; CHECK-NEXT: vmv2r.v v8, v12
388 %x = call <32 x i8> @llvm.vp.mul.nxv32i8(<32 x i8> %a, <32 x i8> %b, <32 x i1> splat (i1 -1), i32 %evl)
389 %y = call <32 x i8> @llvm.vp.sub.nxv32i8(<32 x i8> %c, <32 x i8> %x, <32 x i1> splat (i1 -1), i32 %evl)
390 %u = call <32 x i8> @llvm.vp.merge.nxv32i8(<32 x i1> splat (i1 -1), <32 x i8> %y, <32 x i8> %c, i32 %evl)
394 define <32 x i8> @vnmsac_vx_nxv32i8(<32 x i8> %a, i8 %b, <32 x i8> %c, <32 x i1> %m, i32 zeroext %evl) {
395 ; CHECK-LABEL: vnmsac_vx_nxv32i8:
397 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, tu, mu
398 ; CHECK-NEXT: vnmsac.vx v10, a0, v8, v0.t
399 ; CHECK-NEXT: vmv2r.v v8, v10
401 %elt.head = insertelement <32 x i8> poison, i8 %b, i32 0
402 %vb = shufflevector <32 x i8> %elt.head, <32 x i8> poison, <32 x i32> zeroinitializer
403 %x = call <32 x i8> @llvm.vp.mul.nxv32i8(<32 x i8> %a, <32 x i8> %vb, <32 x i1> splat (i1 -1), i32 %evl)
404 %y = call <32 x i8> @llvm.vp.sub.nxv32i8(<32 x i8> %c, <32 x i8> %x, <32 x i1> splat (i1 -1), i32 %evl)
405 %u = call <32 x i8> @llvm.vp.merge.nxv32i8(<32 x i1> %m, <32 x i8> %y, <32 x i8> %c, i32 %evl)
409 define <32 x i8> @vnmsac_vx_nxv32i8_unmasked(<32 x i8> %a, i8 %b, <32 x i8> %c, <32 x i1> %m, i32 zeroext %evl) {
410 ; CHECK-LABEL: vnmsac_vx_nxv32i8_unmasked:
412 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, tu, ma
413 ; CHECK-NEXT: vnmsac.vx v10, a0, v8
414 ; CHECK-NEXT: vmv2r.v v8, v10
416 %elt.head = insertelement <32 x i8> poison, i8 %b, i32 0
417 %vb = shufflevector <32 x i8> %elt.head, <32 x i8> poison, <32 x i32> zeroinitializer
418 %x = call <32 x i8> @llvm.vp.mul.nxv32i8(<32 x i8> %a, <32 x i8> %vb, <32 x i1> splat (i1 -1), i32 %evl)
419 %y = call <32 x i8> @llvm.vp.sub.nxv32i8(<32 x i8> %c, <32 x i8> %x, <32 x i1> splat (i1 -1), i32 %evl)
420 %u = call <32 x i8> @llvm.vp.merge.nxv32i8(<32 x i1> splat (i1 -1), <32 x i8> %y, <32 x i8> %c, i32 %evl)
424 define <32 x i8> @vnmsac_vv_nxv32i8_ta(<32 x i8> %a, <32 x i8> %b, <32 x i8> %c, <32 x i1> %m, i32 zeroext %evl) {
425 ; CHECK-LABEL: vnmsac_vv_nxv32i8_ta:
427 ; CHECK-NEXT: vsetvli zero, a0, e8, m2, ta, mu
428 ; CHECK-NEXT: vnmsac.vv v12, v8, v10, v0.t
429 ; CHECK-NEXT: vmv.v.v v8, v12
431 %x = call <32 x i8> @llvm.vp.mul.nxv32i8(<32 x i8> %a, <32 x i8> %b, <32 x i1> splat (i1 -1), i32 %evl)
432 %y = call <32 x i8> @llvm.vp.sub.nxv32i8(<32 x i8> %c, <32 x i8> %x, <32 x i1> splat (i1 -1), i32 %evl)
433 %u = call <32 x i8> @llvm.vp.select.nxv32i8(<32 x i1> %m, <32 x i8> %y, <32 x i8> %c, i32 %evl)
437 define <32 x i8> @vnmsac_vx_nxv32i8_ta(<32 x i8> %a, i8 %b, <32 x i8> %c, <32 x i1> %m, i32 zeroext %evl) {
438 ; CHECK-LABEL: vnmsac_vx_nxv32i8_ta:
440 ; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, mu
441 ; CHECK-NEXT: vnmsac.vx v10, a0, v8, v0.t
442 ; CHECK-NEXT: vmv.v.v v8, v10
444 %elt.head = insertelement <32 x i8> poison, i8 %b, i32 0
445 %vb = shufflevector <32 x i8> %elt.head, <32 x i8> poison, <32 x i32> zeroinitializer
446 %x = call <32 x i8> @llvm.vp.mul.nxv32i8(<32 x i8> %a, <32 x i8> %vb, <32 x i1> splat (i1 -1), i32 %evl)
447 %y = call <32 x i8> @llvm.vp.sub.nxv32i8(<32 x i8> %c, <32 x i8> %x, <32 x i1> splat (i1 -1), i32 %evl)
448 %u = call <32 x i8> @llvm.vp.select.nxv32i8(<32 x i1> %m, <32 x i8> %y, <32 x i8> %c, i32 %evl)
452 declare <64 x i8> @llvm.vp.mul.nxv64i8(<64 x i8>, <64 x i8>, <64 x i1>, i32)
453 declare <64 x i8> @llvm.vp.sub.nxv64i8(<64 x i8>, <64 x i8>, <64 x i1>, i32)
454 declare <64 x i8> @llvm.vp.merge.nxv64i8(<64 x i1>, <64 x i8>, <64 x i8>, i32)
455 declare <64 x i8> @llvm.vp.select.nxv64i8(<64 x i1>, <64 x i8>, <64 x i8>, i32)
457 define <64 x i8> @vnmsac_vv_nxv64i8(<64 x i8> %a, <64 x i8> %b, <64 x i8> %c, <64 x i1> %m, i32 zeroext %evl) {
458 ; CHECK-LABEL: vnmsac_vv_nxv64i8:
460 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, tu, mu
461 ; CHECK-NEXT: vnmsac.vv v16, v8, v12, v0.t
462 ; CHECK-NEXT: vmv4r.v v8, v16
464 %x = call <64 x i8> @llvm.vp.mul.nxv64i8(<64 x i8> %a, <64 x i8> %b, <64 x i1> splat (i1 -1), i32 %evl)
465 %y = call <64 x i8> @llvm.vp.sub.nxv64i8(<64 x i8> %c, <64 x i8> %x, <64 x i1> splat (i1 -1), i32 %evl)
466 %u = call <64 x i8> @llvm.vp.merge.nxv64i8(<64 x i1> %m, <64 x i8> %y, <64 x i8> %c, i32 %evl)
470 define <64 x i8> @vnmsac_vv_nxv64i8_unmasked(<64 x i8> %a, <64 x i8> %b, <64 x i8> %c, <64 x i1> %m, i32 zeroext %evl) {
471 ; CHECK-LABEL: vnmsac_vv_nxv64i8_unmasked:
473 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, tu, ma
474 ; CHECK-NEXT: vnmsac.vv v16, v8, v12
475 ; CHECK-NEXT: vmv4r.v v8, v16
477 %x = call <64 x i8> @llvm.vp.mul.nxv64i8(<64 x i8> %a, <64 x i8> %b, <64 x i1> splat (i1 -1), i32 %evl)
478 %y = call <64 x i8> @llvm.vp.sub.nxv64i8(<64 x i8> %c, <64 x i8> %x, <64 x i1> splat (i1 -1), i32 %evl)
479 %u = call <64 x i8> @llvm.vp.merge.nxv64i8(<64 x i1> splat (i1 -1), <64 x i8> %y, <64 x i8> %c, i32 %evl)
483 define <64 x i8> @vnmsac_vx_nxv64i8(<64 x i8> %a, i8 %b, <64 x i8> %c, <64 x i1> %m, i32 zeroext %evl) {
484 ; CHECK-LABEL: vnmsac_vx_nxv64i8:
486 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, tu, mu
487 ; CHECK-NEXT: vnmsac.vx v12, a0, v8, v0.t
488 ; CHECK-NEXT: vmv4r.v v8, v12
490 %elt.head = insertelement <64 x i8> poison, i8 %b, i32 0
491 %vb = shufflevector <64 x i8> %elt.head, <64 x i8> poison, <64 x i32> zeroinitializer
492 %x = call <64 x i8> @llvm.vp.mul.nxv64i8(<64 x i8> %a, <64 x i8> %vb, <64 x i1> splat (i1 -1), i32 %evl)
493 %y = call <64 x i8> @llvm.vp.sub.nxv64i8(<64 x i8> %c, <64 x i8> %x, <64 x i1> splat (i1 -1), i32 %evl)
494 %u = call <64 x i8> @llvm.vp.merge.nxv64i8(<64 x i1> %m, <64 x i8> %y, <64 x i8> %c, i32 %evl)
498 define <64 x i8> @vnmsac_vx_nxv64i8_unmasked(<64 x i8> %a, i8 %b, <64 x i8> %c, <64 x i1> %m, i32 zeroext %evl) {
499 ; CHECK-LABEL: vnmsac_vx_nxv64i8_unmasked:
501 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, tu, ma
502 ; CHECK-NEXT: vnmsac.vx v12, a0, v8
503 ; CHECK-NEXT: vmv4r.v v8, v12
505 %elt.head = insertelement <64 x i8> poison, i8 %b, i32 0
506 %vb = shufflevector <64 x i8> %elt.head, <64 x i8> poison, <64 x i32> zeroinitializer
507 %x = call <64 x i8> @llvm.vp.mul.nxv64i8(<64 x i8> %a, <64 x i8> %vb, <64 x i1> splat (i1 -1), i32 %evl)
508 %y = call <64 x i8> @llvm.vp.sub.nxv64i8(<64 x i8> %c, <64 x i8> %x, <64 x i1> splat (i1 -1), i32 %evl)
509 %u = call <64 x i8> @llvm.vp.merge.nxv64i8(<64 x i1> splat (i1 -1), <64 x i8> %y, <64 x i8> %c, i32 %evl)
513 define <64 x i8> @vnmsac_vv_nxv64i8_ta(<64 x i8> %a, <64 x i8> %b, <64 x i8> %c, <64 x i1> %m, i32 zeroext %evl) {
514 ; CHECK-LABEL: vnmsac_vv_nxv64i8_ta:
516 ; CHECK-NEXT: vsetvli zero, a0, e8, m4, ta, mu
517 ; CHECK-NEXT: vnmsac.vv v16, v8, v12, v0.t
518 ; CHECK-NEXT: vmv.v.v v8, v16
520 %x = call <64 x i8> @llvm.vp.mul.nxv64i8(<64 x i8> %a, <64 x i8> %b, <64 x i1> splat (i1 -1), i32 %evl)
521 %y = call <64 x i8> @llvm.vp.sub.nxv64i8(<64 x i8> %c, <64 x i8> %x, <64 x i1> splat (i1 -1), i32 %evl)
522 %u = call <64 x i8> @llvm.vp.select.nxv64i8(<64 x i1> %m, <64 x i8> %y, <64 x i8> %c, i32 %evl)
526 define <64 x i8> @vnmsac_vx_nxv64i8_ta(<64 x i8> %a, i8 %b, <64 x i8> %c, <64 x i1> %m, i32 zeroext %evl) {
527 ; CHECK-LABEL: vnmsac_vx_nxv64i8_ta:
529 ; CHECK-NEXT: vsetvli zero, a1, e8, m4, ta, mu
530 ; CHECK-NEXT: vnmsac.vx v12, a0, v8, v0.t
531 ; CHECK-NEXT: vmv.v.v v8, v12
533 %elt.head = insertelement <64 x i8> poison, i8 %b, i32 0
534 %vb = shufflevector <64 x i8> %elt.head, <64 x i8> poison, <64 x i32> zeroinitializer
535 %x = call <64 x i8> @llvm.vp.mul.nxv64i8(<64 x i8> %a, <64 x i8> %vb, <64 x i1> splat (i1 -1), i32 %evl)
536 %y = call <64 x i8> @llvm.vp.sub.nxv64i8(<64 x i8> %c, <64 x i8> %x, <64 x i1> splat (i1 -1), i32 %evl)
537 %u = call <64 x i8> @llvm.vp.select.nxv64i8(<64 x i1> %m, <64 x i8> %y, <64 x i8> %c, i32 %evl)
541 declare <2 x i16> @llvm.vp.mul.nxv2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
542 declare <2 x i16> @llvm.vp.sub.nxv2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
543 declare <2 x i16> @llvm.vp.merge.nxv2i16(<2 x i1>, <2 x i16>, <2 x i16>, i32)
544 declare <2 x i16> @llvm.vp.select.nxv2i16(<2 x i1>, <2 x i16>, <2 x i16>, i32)
546 define <2 x i16> @vnmsac_vv_nxv2i16(<2 x i16> %a, <2 x i16> %b, <2 x i16> %c, <2 x i1> %m, i32 zeroext %evl) {
547 ; CHECK-LABEL: vnmsac_vv_nxv2i16:
549 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
550 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
551 ; CHECK-NEXT: vmv1r.v v8, v10
553 %x = call <2 x i16> @llvm.vp.mul.nxv2i16(<2 x i16> %a, <2 x i16> %b, <2 x i1> splat (i1 -1), i32 %evl)
554 %y = call <2 x i16> @llvm.vp.sub.nxv2i16(<2 x i16> %c, <2 x i16> %x, <2 x i1> splat (i1 -1), i32 %evl)
555 %u = call <2 x i16> @llvm.vp.merge.nxv2i16(<2 x i1> %m, <2 x i16> %y, <2 x i16> %c, i32 %evl)
559 define <2 x i16> @vnmsac_vv_nxv2i16_unmasked(<2 x i16> %a, <2 x i16> %b, <2 x i16> %c, <2 x i1> %m, i32 zeroext %evl) {
560 ; CHECK-LABEL: vnmsac_vv_nxv2i16_unmasked:
562 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
563 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
564 ; CHECK-NEXT: vmv1r.v v8, v10
566 %x = call <2 x i16> @llvm.vp.mul.nxv2i16(<2 x i16> %a, <2 x i16> %b, <2 x i1> splat (i1 -1), i32 %evl)
567 %y = call <2 x i16> @llvm.vp.sub.nxv2i16(<2 x i16> %c, <2 x i16> %x, <2 x i1> splat (i1 -1), i32 %evl)
568 %u = call <2 x i16> @llvm.vp.merge.nxv2i16(<2 x i1> splat (i1 -1), <2 x i16> %y, <2 x i16> %c, i32 %evl)
572 define <2 x i16> @vnmsac_vx_nxv2i16(<2 x i16> %a, i16 %b, <2 x i16> %c, <2 x i1> %m, i32 zeroext %evl) {
573 ; CHECK-LABEL: vnmsac_vx_nxv2i16:
575 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, tu, mu
576 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
577 ; CHECK-NEXT: vmv1r.v v8, v9
579 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
580 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
581 %x = call <2 x i16> @llvm.vp.mul.nxv2i16(<2 x i16> %a, <2 x i16> %vb, <2 x i1> splat (i1 -1), i32 %evl)
582 %y = call <2 x i16> @llvm.vp.sub.nxv2i16(<2 x i16> %c, <2 x i16> %x, <2 x i1> splat (i1 -1), i32 %evl)
583 %u = call <2 x i16> @llvm.vp.merge.nxv2i16(<2 x i1> %m, <2 x i16> %y, <2 x i16> %c, i32 %evl)
587 define <2 x i16> @vnmsac_vx_nxv2i16_unmasked(<2 x i16> %a, i16 %b, <2 x i16> %c, <2 x i1> %m, i32 zeroext %evl) {
588 ; CHECK-LABEL: vnmsac_vx_nxv2i16_unmasked:
590 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, tu, ma
591 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
592 ; CHECK-NEXT: vmv1r.v v8, v9
594 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
595 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
596 %x = call <2 x i16> @llvm.vp.mul.nxv2i16(<2 x i16> %a, <2 x i16> %vb, <2 x i1> splat (i1 -1), i32 %evl)
597 %y = call <2 x i16> @llvm.vp.sub.nxv2i16(<2 x i16> %c, <2 x i16> %x, <2 x i1> splat (i1 -1), i32 %evl)
598 %u = call <2 x i16> @llvm.vp.merge.nxv2i16(<2 x i1> splat (i1 -1), <2 x i16> %y, <2 x i16> %c, i32 %evl)
602 define <2 x i16> @vnmsac_vv_nxv2i16_ta(<2 x i16> %a, <2 x i16> %b, <2 x i16> %c, <2 x i1> %m, i32 zeroext %evl) {
603 ; CHECK-LABEL: vnmsac_vv_nxv2i16_ta:
605 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
606 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
607 ; CHECK-NEXT: vmv1r.v v8, v10
609 %x = call <2 x i16> @llvm.vp.mul.nxv2i16(<2 x i16> %a, <2 x i16> %b, <2 x i1> splat (i1 -1), i32 %evl)
610 %y = call <2 x i16> @llvm.vp.sub.nxv2i16(<2 x i16> %c, <2 x i16> %x, <2 x i1> splat (i1 -1), i32 %evl)
611 %u = call <2 x i16> @llvm.vp.select.nxv2i16(<2 x i1> %m, <2 x i16> %y, <2 x i16> %c, i32 %evl)
615 define <2 x i16> @vnmsac_vx_nxv2i16_ta(<2 x i16> %a, i16 %b, <2 x i16> %c, <2 x i1> %m, i32 zeroext %evl) {
616 ; CHECK-LABEL: vnmsac_vx_nxv2i16_ta:
618 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, mu
619 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
620 ; CHECK-NEXT: vmv1r.v v8, v9
622 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
623 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
624 %x = call <2 x i16> @llvm.vp.mul.nxv2i16(<2 x i16> %a, <2 x i16> %vb, <2 x i1> splat (i1 -1), i32 %evl)
625 %y = call <2 x i16> @llvm.vp.sub.nxv2i16(<2 x i16> %c, <2 x i16> %x, <2 x i1> splat (i1 -1), i32 %evl)
626 %u = call <2 x i16> @llvm.vp.select.nxv2i16(<2 x i1> %m, <2 x i16> %y, <2 x i16> %c, i32 %evl)
630 declare <4 x i16> @llvm.vp.mul.nxv4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
631 declare <4 x i16> @llvm.vp.sub.nxv4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
632 declare <4 x i16> @llvm.vp.merge.nxv4i16(<4 x i1>, <4 x i16>, <4 x i16>, i32)
633 declare <4 x i16> @llvm.vp.select.nxv4i16(<4 x i1>, <4 x i16>, <4 x i16>, i32)
635 define <4 x i16> @vnmsac_vv_nxv4i16(<4 x i16> %a, <4 x i16> %b, <4 x i16> %c, <4 x i1> %m, i32 zeroext %evl) {
636 ; CHECK-LABEL: vnmsac_vv_nxv4i16:
638 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
639 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
640 ; CHECK-NEXT: vmv1r.v v8, v10
642 %x = call <4 x i16> @llvm.vp.mul.nxv4i16(<4 x i16> %a, <4 x i16> %b, <4 x i1> splat (i1 -1), i32 %evl)
643 %y = call <4 x i16> @llvm.vp.sub.nxv4i16(<4 x i16> %c, <4 x i16> %x, <4 x i1> splat (i1 -1), i32 %evl)
644 %u = call <4 x i16> @llvm.vp.merge.nxv4i16(<4 x i1> %m, <4 x i16> %y, <4 x i16> %c, i32 %evl)
648 define <4 x i16> @vnmsac_vv_nxv4i16_unmasked(<4 x i16> %a, <4 x i16> %b, <4 x i16> %c, <4 x i1> %m, i32 zeroext %evl) {
649 ; CHECK-LABEL: vnmsac_vv_nxv4i16_unmasked:
651 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
652 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
653 ; CHECK-NEXT: vmv1r.v v8, v10
655 %x = call <4 x i16> @llvm.vp.mul.nxv4i16(<4 x i16> %a, <4 x i16> %b, <4 x i1> splat (i1 -1), i32 %evl)
656 %y = call <4 x i16> @llvm.vp.sub.nxv4i16(<4 x i16> %c, <4 x i16> %x, <4 x i1> splat (i1 -1), i32 %evl)
657 %u = call <4 x i16> @llvm.vp.merge.nxv4i16(<4 x i1> splat (i1 -1), <4 x i16> %y, <4 x i16> %c, i32 %evl)
661 define <4 x i16> @vnmsac_vx_nxv4i16(<4 x i16> %a, i16 %b, <4 x i16> %c, <4 x i1> %m, i32 zeroext %evl) {
662 ; CHECK-LABEL: vnmsac_vx_nxv4i16:
664 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, tu, mu
665 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
666 ; CHECK-NEXT: vmv1r.v v8, v9
668 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
669 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
670 %x = call <4 x i16> @llvm.vp.mul.nxv4i16(<4 x i16> %a, <4 x i16> %vb, <4 x i1> splat (i1 -1), i32 %evl)
671 %y = call <4 x i16> @llvm.vp.sub.nxv4i16(<4 x i16> %c, <4 x i16> %x, <4 x i1> splat (i1 -1), i32 %evl)
672 %u = call <4 x i16> @llvm.vp.merge.nxv4i16(<4 x i1> %m, <4 x i16> %y, <4 x i16> %c, i32 %evl)
676 define <4 x i16> @vnmsac_vx_nxv4i16_unmasked(<4 x i16> %a, i16 %b, <4 x i16> %c, <4 x i1> %m, i32 zeroext %evl) {
677 ; CHECK-LABEL: vnmsac_vx_nxv4i16_unmasked:
679 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, tu, ma
680 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
681 ; CHECK-NEXT: vmv1r.v v8, v9
683 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
684 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
685 %x = call <4 x i16> @llvm.vp.mul.nxv4i16(<4 x i16> %a, <4 x i16> %vb, <4 x i1> splat (i1 -1), i32 %evl)
686 %y = call <4 x i16> @llvm.vp.sub.nxv4i16(<4 x i16> %c, <4 x i16> %x, <4 x i1> splat (i1 -1), i32 %evl)
687 %u = call <4 x i16> @llvm.vp.merge.nxv4i16(<4 x i1> splat (i1 -1), <4 x i16> %y, <4 x i16> %c, i32 %evl)
691 define <4 x i16> @vnmsac_vv_nxv4i16_ta(<4 x i16> %a, <4 x i16> %b, <4 x i16> %c, <4 x i1> %m, i32 zeroext %evl) {
692 ; CHECK-LABEL: vnmsac_vv_nxv4i16_ta:
694 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
695 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
696 ; CHECK-NEXT: vmv1r.v v8, v10
698 %x = call <4 x i16> @llvm.vp.mul.nxv4i16(<4 x i16> %a, <4 x i16> %b, <4 x i1> splat (i1 -1), i32 %evl)
699 %y = call <4 x i16> @llvm.vp.sub.nxv4i16(<4 x i16> %c, <4 x i16> %x, <4 x i1> splat (i1 -1), i32 %evl)
700 %u = call <4 x i16> @llvm.vp.select.nxv4i16(<4 x i1> %m, <4 x i16> %y, <4 x i16> %c, i32 %evl)
704 define <4 x i16> @vnmsac_vx_nxv4i16_ta(<4 x i16> %a, i16 %b, <4 x i16> %c, <4 x i1> %m, i32 zeroext %evl) {
705 ; CHECK-LABEL: vnmsac_vx_nxv4i16_ta:
707 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, mu
708 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
709 ; CHECK-NEXT: vmv1r.v v8, v9
711 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
712 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
713 %x = call <4 x i16> @llvm.vp.mul.nxv4i16(<4 x i16> %a, <4 x i16> %vb, <4 x i1> splat (i1 -1), i32 %evl)
714 %y = call <4 x i16> @llvm.vp.sub.nxv4i16(<4 x i16> %c, <4 x i16> %x, <4 x i1> splat (i1 -1), i32 %evl)
715 %u = call <4 x i16> @llvm.vp.select.nxv4i16(<4 x i1> %m, <4 x i16> %y, <4 x i16> %c, i32 %evl)
719 declare <8 x i16> @llvm.vp.mul.nxv8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
720 declare <8 x i16> @llvm.vp.sub.nxv8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
721 declare <8 x i16> @llvm.vp.merge.nxv8i16(<8 x i1>, <8 x i16>, <8 x i16>, i32)
722 declare <8 x i16> @llvm.vp.select.nxv8i16(<8 x i1>, <8 x i16>, <8 x i16>, i32)
724 define <8 x i16> @vnmsac_vv_nxv8i16(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c, <8 x i1> %m, i32 zeroext %evl) {
725 ; CHECK-LABEL: vnmsac_vv_nxv8i16:
727 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
728 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
729 ; CHECK-NEXT: vmv1r.v v8, v10
731 %x = call <8 x i16> @llvm.vp.mul.nxv8i16(<8 x i16> %a, <8 x i16> %b, <8 x i1> splat (i1 -1), i32 %evl)
732 %y = call <8 x i16> @llvm.vp.sub.nxv8i16(<8 x i16> %c, <8 x i16> %x, <8 x i1> splat (i1 -1), i32 %evl)
733 %u = call <8 x i16> @llvm.vp.merge.nxv8i16(<8 x i1> %m, <8 x i16> %y, <8 x i16> %c, i32 %evl)
737 define <8 x i16> @vnmsac_vv_nxv8i16_unmasked(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c, <8 x i1> %m, i32 zeroext %evl) {
738 ; CHECK-LABEL: vnmsac_vv_nxv8i16_unmasked:
740 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
741 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
742 ; CHECK-NEXT: vmv1r.v v8, v10
744 %x = call <8 x i16> @llvm.vp.mul.nxv8i16(<8 x i16> %a, <8 x i16> %b, <8 x i1> splat (i1 -1), i32 %evl)
745 %y = call <8 x i16> @llvm.vp.sub.nxv8i16(<8 x i16> %c, <8 x i16> %x, <8 x i1> splat (i1 -1), i32 %evl)
746 %u = call <8 x i16> @llvm.vp.merge.nxv8i16(<8 x i1> splat (i1 -1), <8 x i16> %y, <8 x i16> %c, i32 %evl)
750 define <8 x i16> @vnmsac_vx_nxv8i16(<8 x i16> %a, i16 %b, <8 x i16> %c, <8 x i1> %m, i32 zeroext %evl) {
751 ; CHECK-LABEL: vnmsac_vx_nxv8i16:
753 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, tu, mu
754 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
755 ; CHECK-NEXT: vmv1r.v v8, v9
757 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
758 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
759 %x = call <8 x i16> @llvm.vp.mul.nxv8i16(<8 x i16> %a, <8 x i16> %vb, <8 x i1> splat (i1 -1), i32 %evl)
760 %y = call <8 x i16> @llvm.vp.sub.nxv8i16(<8 x i16> %c, <8 x i16> %x, <8 x i1> splat (i1 -1), i32 %evl)
761 %u = call <8 x i16> @llvm.vp.merge.nxv8i16(<8 x i1> %m, <8 x i16> %y, <8 x i16> %c, i32 %evl)
765 define <8 x i16> @vnmsac_vx_nxv8i16_unmasked(<8 x i16> %a, i16 %b, <8 x i16> %c, <8 x i1> %m, i32 zeroext %evl) {
766 ; CHECK-LABEL: vnmsac_vx_nxv8i16_unmasked:
768 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, tu, ma
769 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
770 ; CHECK-NEXT: vmv1r.v v8, v9
772 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
773 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
774 %x = call <8 x i16> @llvm.vp.mul.nxv8i16(<8 x i16> %a, <8 x i16> %vb, <8 x i1> splat (i1 -1), i32 %evl)
775 %y = call <8 x i16> @llvm.vp.sub.nxv8i16(<8 x i16> %c, <8 x i16> %x, <8 x i1> splat (i1 -1), i32 %evl)
776 %u = call <8 x i16> @llvm.vp.merge.nxv8i16(<8 x i1> splat (i1 -1), <8 x i16> %y, <8 x i16> %c, i32 %evl)
780 define <8 x i16> @vnmsac_vv_nxv8i16_ta(<8 x i16> %a, <8 x i16> %b, <8 x i16> %c, <8 x i1> %m, i32 zeroext %evl) {
781 ; CHECK-LABEL: vnmsac_vv_nxv8i16_ta:
783 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
784 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
785 ; CHECK-NEXT: vmv.v.v v8, v10
787 %x = call <8 x i16> @llvm.vp.mul.nxv8i16(<8 x i16> %a, <8 x i16> %b, <8 x i1> splat (i1 -1), i32 %evl)
788 %y = call <8 x i16> @llvm.vp.sub.nxv8i16(<8 x i16> %c, <8 x i16> %x, <8 x i1> splat (i1 -1), i32 %evl)
789 %u = call <8 x i16> @llvm.vp.select.nxv8i16(<8 x i1> %m, <8 x i16> %y, <8 x i16> %c, i32 %evl)
793 define <8 x i16> @vnmsac_vx_nxv8i16_ta(<8 x i16> %a, i16 %b, <8 x i16> %c, <8 x i1> %m, i32 zeroext %evl) {
794 ; CHECK-LABEL: vnmsac_vx_nxv8i16_ta:
796 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, mu
797 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
798 ; CHECK-NEXT: vmv.v.v v8, v9
800 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
801 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
802 %x = call <8 x i16> @llvm.vp.mul.nxv8i16(<8 x i16> %a, <8 x i16> %vb, <8 x i1> splat (i1 -1), i32 %evl)
803 %y = call <8 x i16> @llvm.vp.sub.nxv8i16(<8 x i16> %c, <8 x i16> %x, <8 x i1> splat (i1 -1), i32 %evl)
804 %u = call <8 x i16> @llvm.vp.select.nxv8i16(<8 x i1> %m, <8 x i16> %y, <8 x i16> %c, i32 %evl)
808 declare <16 x i16> @llvm.vp.mul.nxv16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
809 declare <16 x i16> @llvm.vp.sub.nxv16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
810 declare <16 x i16> @llvm.vp.merge.nxv16i16(<16 x i1>, <16 x i16>, <16 x i16>, i32)
811 declare <16 x i16> @llvm.vp.select.nxv16i16(<16 x i1>, <16 x i16>, <16 x i16>, i32)
813 define <16 x i16> @vnmsac_vv_nxv16i16(<16 x i16> %a, <16 x i16> %b, <16 x i16> %c, <16 x i1> %m, i32 zeroext %evl) {
814 ; CHECK-LABEL: vnmsac_vv_nxv16i16:
816 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
817 ; CHECK-NEXT: vnmsac.vv v12, v8, v10, v0.t
818 ; CHECK-NEXT: vmv2r.v v8, v12
820 %x = call <16 x i16> @llvm.vp.mul.nxv16i16(<16 x i16> %a, <16 x i16> %b, <16 x i1> splat (i1 -1), i32 %evl)
821 %y = call <16 x i16> @llvm.vp.sub.nxv16i16(<16 x i16> %c, <16 x i16> %x, <16 x i1> splat (i1 -1), i32 %evl)
822 %u = call <16 x i16> @llvm.vp.merge.nxv16i16(<16 x i1> %m, <16 x i16> %y, <16 x i16> %c, i32 %evl)
826 define <16 x i16> @vnmsac_vv_nxv16i16_unmasked(<16 x i16> %a, <16 x i16> %b, <16 x i16> %c, <16 x i1> %m, i32 zeroext %evl) {
827 ; CHECK-LABEL: vnmsac_vv_nxv16i16_unmasked:
829 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
830 ; CHECK-NEXT: vnmsac.vv v12, v8, v10
831 ; CHECK-NEXT: vmv2r.v v8, v12
833 %x = call <16 x i16> @llvm.vp.mul.nxv16i16(<16 x i16> %a, <16 x i16> %b, <16 x i1> splat (i1 -1), i32 %evl)
834 %y = call <16 x i16> @llvm.vp.sub.nxv16i16(<16 x i16> %c, <16 x i16> %x, <16 x i1> splat (i1 -1), i32 %evl)
835 %u = call <16 x i16> @llvm.vp.merge.nxv16i16(<16 x i1> splat (i1 -1), <16 x i16> %y, <16 x i16> %c, i32 %evl)
839 define <16 x i16> @vnmsac_vx_nxv16i16(<16 x i16> %a, i16 %b, <16 x i16> %c, <16 x i1> %m, i32 zeroext %evl) {
840 ; CHECK-LABEL: vnmsac_vx_nxv16i16:
842 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, tu, mu
843 ; CHECK-NEXT: vnmsac.vx v10, a0, v8, v0.t
844 ; CHECK-NEXT: vmv2r.v v8, v10
846 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
847 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
848 %x = call <16 x i16> @llvm.vp.mul.nxv16i16(<16 x i16> %a, <16 x i16> %vb, <16 x i1> splat (i1 -1), i32 %evl)
849 %y = call <16 x i16> @llvm.vp.sub.nxv16i16(<16 x i16> %c, <16 x i16> %x, <16 x i1> splat (i1 -1), i32 %evl)
850 %u = call <16 x i16> @llvm.vp.merge.nxv16i16(<16 x i1> %m, <16 x i16> %y, <16 x i16> %c, i32 %evl)
854 define <16 x i16> @vnmsac_vx_nxv16i16_unmasked(<16 x i16> %a, i16 %b, <16 x i16> %c, <16 x i1> %m, i32 zeroext %evl) {
855 ; CHECK-LABEL: vnmsac_vx_nxv16i16_unmasked:
857 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, tu, ma
858 ; CHECK-NEXT: vnmsac.vx v10, a0, v8
859 ; CHECK-NEXT: vmv2r.v v8, v10
861 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
862 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
863 %x = call <16 x i16> @llvm.vp.mul.nxv16i16(<16 x i16> %a, <16 x i16> %vb, <16 x i1> splat (i1 -1), i32 %evl)
864 %y = call <16 x i16> @llvm.vp.sub.nxv16i16(<16 x i16> %c, <16 x i16> %x, <16 x i1> splat (i1 -1), i32 %evl)
865 %u = call <16 x i16> @llvm.vp.merge.nxv16i16(<16 x i1> splat (i1 -1), <16 x i16> %y, <16 x i16> %c, i32 %evl)
869 define <16 x i16> @vnmsac_vv_nxv16i16_ta(<16 x i16> %a, <16 x i16> %b, <16 x i16> %c, <16 x i1> %m, i32 zeroext %evl) {
870 ; CHECK-LABEL: vnmsac_vv_nxv16i16_ta:
872 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
873 ; CHECK-NEXT: vnmsac.vv v12, v8, v10, v0.t
874 ; CHECK-NEXT: vmv.v.v v8, v12
876 %x = call <16 x i16> @llvm.vp.mul.nxv16i16(<16 x i16> %a, <16 x i16> %b, <16 x i1> splat (i1 -1), i32 %evl)
877 %y = call <16 x i16> @llvm.vp.sub.nxv16i16(<16 x i16> %c, <16 x i16> %x, <16 x i1> splat (i1 -1), i32 %evl)
878 %u = call <16 x i16> @llvm.vp.select.nxv16i16(<16 x i1> %m, <16 x i16> %y, <16 x i16> %c, i32 %evl)
882 define <16 x i16> @vnmsac_vx_nxv16i16_ta(<16 x i16> %a, i16 %b, <16 x i16> %c, <16 x i1> %m, i32 zeroext %evl) {
883 ; CHECK-LABEL: vnmsac_vx_nxv16i16_ta:
885 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, mu
886 ; CHECK-NEXT: vnmsac.vx v10, a0, v8, v0.t
887 ; CHECK-NEXT: vmv.v.v v8, v10
889 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
890 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
891 %x = call <16 x i16> @llvm.vp.mul.nxv16i16(<16 x i16> %a, <16 x i16> %vb, <16 x i1> splat (i1 -1), i32 %evl)
892 %y = call <16 x i16> @llvm.vp.sub.nxv16i16(<16 x i16> %c, <16 x i16> %x, <16 x i1> splat (i1 -1), i32 %evl)
893 %u = call <16 x i16> @llvm.vp.select.nxv16i16(<16 x i1> %m, <16 x i16> %y, <16 x i16> %c, i32 %evl)
897 declare <32 x i16> @llvm.vp.mul.nxv32i16(<32 x i16>, <32 x i16>, <32 x i1>, i32)
898 declare <32 x i16> @llvm.vp.sub.nxv32i16(<32 x i16>, <32 x i16>, <32 x i1>, i32)
899 declare <32 x i16> @llvm.vp.merge.nxv32i16(<32 x i1>, <32 x i16>, <32 x i16>, i32)
900 declare <32 x i16> @llvm.vp.select.nxv32i16(<32 x i1>, <32 x i16>, <32 x i16>, i32)
902 define <32 x i16> @vnmsac_vv_nxv32i16(<32 x i16> %a, <32 x i16> %b, <32 x i16> %c, <32 x i1> %m, i32 zeroext %evl) {
903 ; CHECK-LABEL: vnmsac_vv_nxv32i16:
905 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
906 ; CHECK-NEXT: vnmsac.vv v16, v8, v12, v0.t
907 ; CHECK-NEXT: vmv4r.v v8, v16
909 %x = call <32 x i16> @llvm.vp.mul.nxv32i16(<32 x i16> %a, <32 x i16> %b, <32 x i1> splat (i1 -1), i32 %evl)
910 %y = call <32 x i16> @llvm.vp.sub.nxv32i16(<32 x i16> %c, <32 x i16> %x, <32 x i1> splat (i1 -1), i32 %evl)
911 %u = call <32 x i16> @llvm.vp.merge.nxv32i16(<32 x i1> %m, <32 x i16> %y, <32 x i16> %c, i32 %evl)
915 define <32 x i16> @vnmsac_vv_nxv32i16_unmasked(<32 x i16> %a, <32 x i16> %b, <32 x i16> %c, <32 x i1> %m, i32 zeroext %evl) {
916 ; CHECK-LABEL: vnmsac_vv_nxv32i16_unmasked:
918 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
919 ; CHECK-NEXT: vnmsac.vv v16, v8, v12
920 ; CHECK-NEXT: vmv4r.v v8, v16
922 %x = call <32 x i16> @llvm.vp.mul.nxv32i16(<32 x i16> %a, <32 x i16> %b, <32 x i1> splat (i1 -1), i32 %evl)
923 %y = call <32 x i16> @llvm.vp.sub.nxv32i16(<32 x i16> %c, <32 x i16> %x, <32 x i1> splat (i1 -1), i32 %evl)
924 %u = call <32 x i16> @llvm.vp.merge.nxv32i16(<32 x i1> splat (i1 -1), <32 x i16> %y, <32 x i16> %c, i32 %evl)
928 define <32 x i16> @vnmsac_vx_nxv32i16(<32 x i16> %a, i16 %b, <32 x i16> %c, <32 x i1> %m, i32 zeroext %evl) {
929 ; CHECK-LABEL: vnmsac_vx_nxv32i16:
931 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, tu, mu
932 ; CHECK-NEXT: vnmsac.vx v12, a0, v8, v0.t
933 ; CHECK-NEXT: vmv4r.v v8, v12
935 %elt.head = insertelement <32 x i16> poison, i16 %b, i32 0
936 %vb = shufflevector <32 x i16> %elt.head, <32 x i16> poison, <32 x i32> zeroinitializer
937 %x = call <32 x i16> @llvm.vp.mul.nxv32i16(<32 x i16> %a, <32 x i16> %vb, <32 x i1> splat (i1 -1), i32 %evl)
938 %y = call <32 x i16> @llvm.vp.sub.nxv32i16(<32 x i16> %c, <32 x i16> %x, <32 x i1> splat (i1 -1), i32 %evl)
939 %u = call <32 x i16> @llvm.vp.merge.nxv32i16(<32 x i1> %m, <32 x i16> %y, <32 x i16> %c, i32 %evl)
943 define <32 x i16> @vnmsac_vx_nxv32i16_unmasked(<32 x i16> %a, i16 %b, <32 x i16> %c, <32 x i1> %m, i32 zeroext %evl) {
944 ; CHECK-LABEL: vnmsac_vx_nxv32i16_unmasked:
946 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, tu, ma
947 ; CHECK-NEXT: vnmsac.vx v12, a0, v8
948 ; CHECK-NEXT: vmv4r.v v8, v12
950 %elt.head = insertelement <32 x i16> poison, i16 %b, i32 0
951 %vb = shufflevector <32 x i16> %elt.head, <32 x i16> poison, <32 x i32> zeroinitializer
952 %x = call <32 x i16> @llvm.vp.mul.nxv32i16(<32 x i16> %a, <32 x i16> %vb, <32 x i1> splat (i1 -1), i32 %evl)
953 %y = call <32 x i16> @llvm.vp.sub.nxv32i16(<32 x i16> %c, <32 x i16> %x, <32 x i1> splat (i1 -1), i32 %evl)
954 %u = call <32 x i16> @llvm.vp.merge.nxv32i16(<32 x i1> splat (i1 -1), <32 x i16> %y, <32 x i16> %c, i32 %evl)
958 define <32 x i16> @vnmsac_vv_nxv32i16_ta(<32 x i16> %a, <32 x i16> %b, <32 x i16> %c, <32 x i1> %m, i32 zeroext %evl) {
959 ; CHECK-LABEL: vnmsac_vv_nxv32i16_ta:
961 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
962 ; CHECK-NEXT: vnmsac.vv v16, v8, v12, v0.t
963 ; CHECK-NEXT: vmv.v.v v8, v16
965 %x = call <32 x i16> @llvm.vp.mul.nxv32i16(<32 x i16> %a, <32 x i16> %b, <32 x i1> splat (i1 -1), i32 %evl)
966 %y = call <32 x i16> @llvm.vp.sub.nxv32i16(<32 x i16> %c, <32 x i16> %x, <32 x i1> splat (i1 -1), i32 %evl)
967 %u = call <32 x i16> @llvm.vp.select.nxv32i16(<32 x i1> %m, <32 x i16> %y, <32 x i16> %c, i32 %evl)
971 define <32 x i16> @vnmsac_vx_nxv32i16_ta(<32 x i16> %a, i16 %b, <32 x i16> %c, <32 x i1> %m, i32 zeroext %evl) {
972 ; CHECK-LABEL: vnmsac_vx_nxv32i16_ta:
974 ; CHECK-NEXT: vsetvli zero, a1, e16, m4, ta, mu
975 ; CHECK-NEXT: vnmsac.vx v12, a0, v8, v0.t
976 ; CHECK-NEXT: vmv.v.v v8, v12
978 %elt.head = insertelement <32 x i16> poison, i16 %b, i32 0
979 %vb = shufflevector <32 x i16> %elt.head, <32 x i16> poison, <32 x i32> zeroinitializer
980 %x = call <32 x i16> @llvm.vp.mul.nxv32i16(<32 x i16> %a, <32 x i16> %vb, <32 x i1> splat (i1 -1), i32 %evl)
981 %y = call <32 x i16> @llvm.vp.sub.nxv32i16(<32 x i16> %c, <32 x i16> %x, <32 x i1> splat (i1 -1), i32 %evl)
982 %u = call <32 x i16> @llvm.vp.select.nxv32i16(<32 x i1> %m, <32 x i16> %y, <32 x i16> %c, i32 %evl)
986 declare <2 x i32> @llvm.vp.mul.nxv2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
987 declare <2 x i32> @llvm.vp.sub.nxv2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
988 declare <2 x i32> @llvm.vp.merge.nxv2i32(<2 x i1>, <2 x i32>, <2 x i32>, i32)
989 declare <2 x i32> @llvm.vp.select.nxv2i32(<2 x i1>, <2 x i32>, <2 x i32>, i32)
991 define <2 x i32> @vnmsac_vv_nxv2i32(<2 x i32> %a, <2 x i32> %b, <2 x i32> %c, <2 x i1> %m, i32 zeroext %evl) {
992 ; CHECK-LABEL: vnmsac_vv_nxv2i32:
994 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
995 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
996 ; CHECK-NEXT: vmv1r.v v8, v10
998 %x = call <2 x i32> @llvm.vp.mul.nxv2i32(<2 x i32> %a, <2 x i32> %b, <2 x i1> splat (i1 -1), i32 %evl)
999 %y = call <2 x i32> @llvm.vp.sub.nxv2i32(<2 x i32> %c, <2 x i32> %x, <2 x i1> splat (i1 -1), i32 %evl)
1000 %u = call <2 x i32> @llvm.vp.merge.nxv2i32(<2 x i1> %m, <2 x i32> %y, <2 x i32> %c, i32 %evl)
1004 define <2 x i32> @vnmsac_vv_nxv2i32_unmasked(<2 x i32> %a, <2 x i32> %b, <2 x i32> %c, <2 x i1> %m, i32 zeroext %evl) {
1005 ; CHECK-LABEL: vnmsac_vv_nxv2i32_unmasked:
1007 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
1008 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
1009 ; CHECK-NEXT: vmv1r.v v8, v10
1011 %x = call <2 x i32> @llvm.vp.mul.nxv2i32(<2 x i32> %a, <2 x i32> %b, <2 x i1> splat (i1 -1), i32 %evl)
1012 %y = call <2 x i32> @llvm.vp.sub.nxv2i32(<2 x i32> %c, <2 x i32> %x, <2 x i1> splat (i1 -1), i32 %evl)
1013 %u = call <2 x i32> @llvm.vp.merge.nxv2i32(<2 x i1> splat (i1 -1), <2 x i32> %y, <2 x i32> %c, i32 %evl)
1017 define <2 x i32> @vnmsac_vx_nxv2i32(<2 x i32> %a, i32 %b, <2 x i32> %c, <2 x i1> %m, i32 zeroext %evl) {
1018 ; CHECK-LABEL: vnmsac_vx_nxv2i32:
1020 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, tu, mu
1021 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
1022 ; CHECK-NEXT: vmv1r.v v8, v9
1024 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
1025 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
1026 %x = call <2 x i32> @llvm.vp.mul.nxv2i32(<2 x i32> %a, <2 x i32> %vb, <2 x i1> splat (i1 -1), i32 %evl)
1027 %y = call <2 x i32> @llvm.vp.sub.nxv2i32(<2 x i32> %c, <2 x i32> %x, <2 x i1> splat (i1 -1), i32 %evl)
1028 %u = call <2 x i32> @llvm.vp.merge.nxv2i32(<2 x i1> %m, <2 x i32> %y, <2 x i32> %c, i32 %evl)
1032 define <2 x i32> @vnmsac_vx_nxv2i32_unmasked(<2 x i32> %a, i32 %b, <2 x i32> %c, <2 x i1> %m, i32 zeroext %evl) {
1033 ; CHECK-LABEL: vnmsac_vx_nxv2i32_unmasked:
1035 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, tu, ma
1036 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
1037 ; CHECK-NEXT: vmv1r.v v8, v9
1039 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
1040 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
1041 %x = call <2 x i32> @llvm.vp.mul.nxv2i32(<2 x i32> %a, <2 x i32> %vb, <2 x i1> splat (i1 -1), i32 %evl)
1042 %y = call <2 x i32> @llvm.vp.sub.nxv2i32(<2 x i32> %c, <2 x i32> %x, <2 x i1> splat (i1 -1), i32 %evl)
1043 %u = call <2 x i32> @llvm.vp.merge.nxv2i32(<2 x i1> splat (i1 -1), <2 x i32> %y, <2 x i32> %c, i32 %evl)
1047 define <2 x i32> @vnmsac_vv_nxv2i32_ta(<2 x i32> %a, <2 x i32> %b, <2 x i32> %c, <2 x i1> %m, i32 zeroext %evl) {
1048 ; CHECK-LABEL: vnmsac_vv_nxv2i32_ta:
1050 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
1051 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
1052 ; CHECK-NEXT: vmv1r.v v8, v10
1054 %x = call <2 x i32> @llvm.vp.mul.nxv2i32(<2 x i32> %a, <2 x i32> %b, <2 x i1> splat (i1 -1), i32 %evl)
1055 %y = call <2 x i32> @llvm.vp.sub.nxv2i32(<2 x i32> %c, <2 x i32> %x, <2 x i1> splat (i1 -1), i32 %evl)
1056 %u = call <2 x i32> @llvm.vp.select.nxv2i32(<2 x i1> %m, <2 x i32> %y, <2 x i32> %c, i32 %evl)
1060 define <2 x i32> @vnmsac_vx_nxv2i32_ta(<2 x i32> %a, i32 %b, <2 x i32> %c, <2 x i1> %m, i32 zeroext %evl) {
1061 ; CHECK-LABEL: vnmsac_vx_nxv2i32_ta:
1063 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, mu
1064 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
1065 ; CHECK-NEXT: vmv1r.v v8, v9
1067 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
1068 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
1069 %x = call <2 x i32> @llvm.vp.mul.nxv2i32(<2 x i32> %a, <2 x i32> %vb, <2 x i1> splat (i1 -1), i32 %evl)
1070 %y = call <2 x i32> @llvm.vp.sub.nxv2i32(<2 x i32> %c, <2 x i32> %x, <2 x i1> splat (i1 -1), i32 %evl)
1071 %u = call <2 x i32> @llvm.vp.select.nxv2i32(<2 x i1> %m, <2 x i32> %y, <2 x i32> %c, i32 %evl)
1075 declare <4 x i32> @llvm.vp.mul.nxv4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
1076 declare <4 x i32> @llvm.vp.sub.nxv4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
1077 declare <4 x i32> @llvm.vp.merge.nxv4i32(<4 x i1>, <4 x i32>, <4 x i32>, i32)
1078 declare <4 x i32> @llvm.vp.select.nxv4i32(<4 x i1>, <4 x i32>, <4 x i32>, i32)
1080 define <4 x i32> @vnmsac_vv_nxv4i32(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i1> %m, i32 zeroext %evl) {
1081 ; CHECK-LABEL: vnmsac_vv_nxv4i32:
1083 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
1084 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
1085 ; CHECK-NEXT: vmv1r.v v8, v10
1087 %x = call <4 x i32> @llvm.vp.mul.nxv4i32(<4 x i32> %a, <4 x i32> %b, <4 x i1> splat (i1 -1), i32 %evl)
1088 %y = call <4 x i32> @llvm.vp.sub.nxv4i32(<4 x i32> %c, <4 x i32> %x, <4 x i1> splat (i1 -1), i32 %evl)
1089 %u = call <4 x i32> @llvm.vp.merge.nxv4i32(<4 x i1> %m, <4 x i32> %y, <4 x i32> %c, i32 %evl)
1093 define <4 x i32> @vnmsac_vv_nxv4i32_unmasked(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i1> %m, i32 zeroext %evl) {
1094 ; CHECK-LABEL: vnmsac_vv_nxv4i32_unmasked:
1096 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
1097 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
1098 ; CHECK-NEXT: vmv1r.v v8, v10
1100 %x = call <4 x i32> @llvm.vp.mul.nxv4i32(<4 x i32> %a, <4 x i32> %b, <4 x i1> splat (i1 -1), i32 %evl)
1101 %y = call <4 x i32> @llvm.vp.sub.nxv4i32(<4 x i32> %c, <4 x i32> %x, <4 x i1> splat (i1 -1), i32 %evl)
1102 %u = call <4 x i32> @llvm.vp.merge.nxv4i32(<4 x i1> splat (i1 -1), <4 x i32> %y, <4 x i32> %c, i32 %evl)
1106 define <4 x i32> @vnmsac_vx_nxv4i32(<4 x i32> %a, i32 %b, <4 x i32> %c, <4 x i1> %m, i32 zeroext %evl) {
1107 ; CHECK-LABEL: vnmsac_vx_nxv4i32:
1109 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, tu, mu
1110 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
1111 ; CHECK-NEXT: vmv1r.v v8, v9
1113 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
1114 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
1115 %x = call <4 x i32> @llvm.vp.mul.nxv4i32(<4 x i32> %a, <4 x i32> %vb, <4 x i1> splat (i1 -1), i32 %evl)
1116 %y = call <4 x i32> @llvm.vp.sub.nxv4i32(<4 x i32> %c, <4 x i32> %x, <4 x i1> splat (i1 -1), i32 %evl)
1117 %u = call <4 x i32> @llvm.vp.merge.nxv4i32(<4 x i1> %m, <4 x i32> %y, <4 x i32> %c, i32 %evl)
1121 define <4 x i32> @vnmsac_vx_nxv4i32_unmasked(<4 x i32> %a, i32 %b, <4 x i32> %c, <4 x i1> %m, i32 zeroext %evl) {
1122 ; CHECK-LABEL: vnmsac_vx_nxv4i32_unmasked:
1124 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, tu, ma
1125 ; CHECK-NEXT: vnmsac.vx v9, a0, v8
1126 ; CHECK-NEXT: vmv1r.v v8, v9
1128 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
1129 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
1130 %x = call <4 x i32> @llvm.vp.mul.nxv4i32(<4 x i32> %a, <4 x i32> %vb, <4 x i1> splat (i1 -1), i32 %evl)
1131 %y = call <4 x i32> @llvm.vp.sub.nxv4i32(<4 x i32> %c, <4 x i32> %x, <4 x i1> splat (i1 -1), i32 %evl)
1132 %u = call <4 x i32> @llvm.vp.merge.nxv4i32(<4 x i1> splat (i1 -1), <4 x i32> %y, <4 x i32> %c, i32 %evl)
1136 define <4 x i32> @vnmsac_vv_nxv4i32_ta(<4 x i32> %a, <4 x i32> %b, <4 x i32> %c, <4 x i1> %m, i32 zeroext %evl) {
1137 ; CHECK-LABEL: vnmsac_vv_nxv4i32_ta:
1139 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
1140 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
1141 ; CHECK-NEXT: vmv.v.v v8, v10
1143 %x = call <4 x i32> @llvm.vp.mul.nxv4i32(<4 x i32> %a, <4 x i32> %b, <4 x i1> splat (i1 -1), i32 %evl)
1144 %y = call <4 x i32> @llvm.vp.sub.nxv4i32(<4 x i32> %c, <4 x i32> %x, <4 x i1> splat (i1 -1), i32 %evl)
1145 %u = call <4 x i32> @llvm.vp.select.nxv4i32(<4 x i1> %m, <4 x i32> %y, <4 x i32> %c, i32 %evl)
1149 define <4 x i32> @vnmsac_vx_nxv4i32_ta(<4 x i32> %a, i32 %b, <4 x i32> %c, <4 x i1> %m, i32 zeroext %evl) {
1150 ; CHECK-LABEL: vnmsac_vx_nxv4i32_ta:
1152 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, mu
1153 ; CHECK-NEXT: vnmsac.vx v9, a0, v8, v0.t
1154 ; CHECK-NEXT: vmv.v.v v8, v9
1156 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
1157 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
1158 %x = call <4 x i32> @llvm.vp.mul.nxv4i32(<4 x i32> %a, <4 x i32> %vb, <4 x i1> splat (i1 -1), i32 %evl)
1159 %y = call <4 x i32> @llvm.vp.sub.nxv4i32(<4 x i32> %c, <4 x i32> %x, <4 x i1> splat (i1 -1), i32 %evl)
1160 %u = call <4 x i32> @llvm.vp.select.nxv4i32(<4 x i1> %m, <4 x i32> %y, <4 x i32> %c, i32 %evl)
1164 declare <8 x i32> @llvm.vp.mul.nxv8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
1165 declare <8 x i32> @llvm.vp.sub.nxv8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
1166 declare <8 x i32> @llvm.vp.merge.nxv8i32(<8 x i1>, <8 x i32>, <8 x i32>, i32)
1167 declare <8 x i32> @llvm.vp.select.nxv8i32(<8 x i1>, <8 x i32>, <8 x i32>, i32)
1169 define <8 x i32> @vnmsac_vv_nxv8i32(<8 x i32> %a, <8 x i32> %b, <8 x i32> %c, <8 x i1> %m, i32 zeroext %evl) {
1170 ; CHECK-LABEL: vnmsac_vv_nxv8i32:
1172 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
1173 ; CHECK-NEXT: vnmsac.vv v12, v8, v10, v0.t
1174 ; CHECK-NEXT: vmv2r.v v8, v12
1176 %x = call <8 x i32> @llvm.vp.mul.nxv8i32(<8 x i32> %a, <8 x i32> %b, <8 x i1> splat (i1 -1), i32 %evl)
1177 %y = call <8 x i32> @llvm.vp.sub.nxv8i32(<8 x i32> %c, <8 x i32> %x, <8 x i1> splat (i1 -1), i32 %evl)
1178 %u = call <8 x i32> @llvm.vp.merge.nxv8i32(<8 x i1> %m, <8 x i32> %y, <8 x i32> %c, i32 %evl)
1182 define <8 x i32> @vnmsac_vv_nxv8i32_unmasked(<8 x i32> %a, <8 x i32> %b, <8 x i32> %c, <8 x i1> %m, i32 zeroext %evl) {
1183 ; CHECK-LABEL: vnmsac_vv_nxv8i32_unmasked:
1185 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
1186 ; CHECK-NEXT: vnmsac.vv v12, v8, v10
1187 ; CHECK-NEXT: vmv2r.v v8, v12
1189 %x = call <8 x i32> @llvm.vp.mul.nxv8i32(<8 x i32> %a, <8 x i32> %b, <8 x i1> splat (i1 -1), i32 %evl)
1190 %y = call <8 x i32> @llvm.vp.sub.nxv8i32(<8 x i32> %c, <8 x i32> %x, <8 x i1> splat (i1 -1), i32 %evl)
1191 %u = call <8 x i32> @llvm.vp.merge.nxv8i32(<8 x i1> splat (i1 -1), <8 x i32> %y, <8 x i32> %c, i32 %evl)
1195 define <8 x i32> @vnmsac_vx_nxv8i32(<8 x i32> %a, i32 %b, <8 x i32> %c, <8 x i1> %m, i32 zeroext %evl) {
1196 ; CHECK-LABEL: vnmsac_vx_nxv8i32:
1198 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, tu, mu
1199 ; CHECK-NEXT: vnmsac.vx v10, a0, v8, v0.t
1200 ; CHECK-NEXT: vmv2r.v v8, v10
1202 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1203 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1204 %x = call <8 x i32> @llvm.vp.mul.nxv8i32(<8 x i32> %a, <8 x i32> %vb, <8 x i1> splat (i1 -1), i32 %evl)
1205 %y = call <8 x i32> @llvm.vp.sub.nxv8i32(<8 x i32> %c, <8 x i32> %x, <8 x i1> splat (i1 -1), i32 %evl)
1206 %u = call <8 x i32> @llvm.vp.merge.nxv8i32(<8 x i1> %m, <8 x i32> %y, <8 x i32> %c, i32 %evl)
1210 define <8 x i32> @vnmsac_vx_nxv8i32_unmasked(<8 x i32> %a, i32 %b, <8 x i32> %c, <8 x i1> %m, i32 zeroext %evl) {
1211 ; CHECK-LABEL: vnmsac_vx_nxv8i32_unmasked:
1213 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, tu, ma
1214 ; CHECK-NEXT: vnmsac.vx v10, a0, v8
1215 ; CHECK-NEXT: vmv2r.v v8, v10
1217 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1218 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1219 %x = call <8 x i32> @llvm.vp.mul.nxv8i32(<8 x i32> %a, <8 x i32> %vb, <8 x i1> splat (i1 -1), i32 %evl)
1220 %y = call <8 x i32> @llvm.vp.sub.nxv8i32(<8 x i32> %c, <8 x i32> %x, <8 x i1> splat (i1 -1), i32 %evl)
1221 %u = call <8 x i32> @llvm.vp.merge.nxv8i32(<8 x i1> splat (i1 -1), <8 x i32> %y, <8 x i32> %c, i32 %evl)
1225 define <8 x i32> @vnmsac_vv_nxv8i32_ta(<8 x i32> %a, <8 x i32> %b, <8 x i32> %c, <8 x i1> %m, i32 zeroext %evl) {
1226 ; CHECK-LABEL: vnmsac_vv_nxv8i32_ta:
1228 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
1229 ; CHECK-NEXT: vnmsac.vv v12, v8, v10, v0.t
1230 ; CHECK-NEXT: vmv.v.v v8, v12
1232 %x = call <8 x i32> @llvm.vp.mul.nxv8i32(<8 x i32> %a, <8 x i32> %b, <8 x i1> splat (i1 -1), i32 %evl)
1233 %y = call <8 x i32> @llvm.vp.sub.nxv8i32(<8 x i32> %c, <8 x i32> %x, <8 x i1> splat (i1 -1), i32 %evl)
1234 %u = call <8 x i32> @llvm.vp.select.nxv8i32(<8 x i1> %m, <8 x i32> %y, <8 x i32> %c, i32 %evl)
1238 define <8 x i32> @vnmsac_vx_nxv8i32_ta(<8 x i32> %a, i32 %b, <8 x i32> %c, <8 x i1> %m, i32 zeroext %evl) {
1239 ; CHECK-LABEL: vnmsac_vx_nxv8i32_ta:
1241 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, mu
1242 ; CHECK-NEXT: vnmsac.vx v10, a0, v8, v0.t
1243 ; CHECK-NEXT: vmv.v.v v8, v10
1245 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
1246 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
1247 %x = call <8 x i32> @llvm.vp.mul.nxv8i32(<8 x i32> %a, <8 x i32> %vb, <8 x i1> splat (i1 -1), i32 %evl)
1248 %y = call <8 x i32> @llvm.vp.sub.nxv8i32(<8 x i32> %c, <8 x i32> %x, <8 x i1> splat (i1 -1), i32 %evl)
1249 %u = call <8 x i32> @llvm.vp.select.nxv8i32(<8 x i1> %m, <8 x i32> %y, <8 x i32> %c, i32 %evl)
1253 declare <16 x i32> @llvm.vp.mul.nxv16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
1254 declare <16 x i32> @llvm.vp.sub.nxv16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
1255 declare <16 x i32> @llvm.vp.merge.nxv16i32(<16 x i1>, <16 x i32>, <16 x i32>, i32)
1256 declare <16 x i32> @llvm.vp.select.nxv16i32(<16 x i1>, <16 x i32>, <16 x i32>, i32)
1258 define <16 x i32> @vnmsac_vv_nxv16i32(<16 x i32> %a, <16 x i32> %b, <16 x i32> %c, <16 x i1> %m, i32 zeroext %evl) {
1259 ; CHECK-LABEL: vnmsac_vv_nxv16i32:
1261 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1262 ; CHECK-NEXT: vnmsac.vv v16, v8, v12, v0.t
1263 ; CHECK-NEXT: vmv4r.v v8, v16
1265 %x = call <16 x i32> @llvm.vp.mul.nxv16i32(<16 x i32> %a, <16 x i32> %b, <16 x i1> splat (i1 -1), i32 %evl)
1266 %y = call <16 x i32> @llvm.vp.sub.nxv16i32(<16 x i32> %c, <16 x i32> %x, <16 x i1> splat (i1 -1), i32 %evl)
1267 %u = call <16 x i32> @llvm.vp.merge.nxv16i32(<16 x i1> %m, <16 x i32> %y, <16 x i32> %c, i32 %evl)
1271 define <16 x i32> @vnmsac_vv_nxv16i32_unmasked(<16 x i32> %a, <16 x i32> %b, <16 x i32> %c, <16 x i1> %m, i32 zeroext %evl) {
1272 ; CHECK-LABEL: vnmsac_vv_nxv16i32_unmasked:
1274 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
1275 ; CHECK-NEXT: vnmsac.vv v16, v8, v12
1276 ; CHECK-NEXT: vmv4r.v v8, v16
1278 %x = call <16 x i32> @llvm.vp.mul.nxv16i32(<16 x i32> %a, <16 x i32> %b, <16 x i1> splat (i1 -1), i32 %evl)
1279 %y = call <16 x i32> @llvm.vp.sub.nxv16i32(<16 x i32> %c, <16 x i32> %x, <16 x i1> splat (i1 -1), i32 %evl)
1280 %u = call <16 x i32> @llvm.vp.merge.nxv16i32(<16 x i1> splat (i1 -1), <16 x i32> %y, <16 x i32> %c, i32 %evl)
1284 define <16 x i32> @vnmsac_vx_nxv16i32(<16 x i32> %a, i32 %b, <16 x i32> %c, <16 x i1> %m, i32 zeroext %evl) {
1285 ; CHECK-LABEL: vnmsac_vx_nxv16i32:
1287 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, tu, mu
1288 ; CHECK-NEXT: vnmsac.vx v12, a0, v8, v0.t
1289 ; CHECK-NEXT: vmv4r.v v8, v12
1291 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
1292 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
1293 %x = call <16 x i32> @llvm.vp.mul.nxv16i32(<16 x i32> %a, <16 x i32> %vb, <16 x i1> splat (i1 -1), i32 %evl)
1294 %y = call <16 x i32> @llvm.vp.sub.nxv16i32(<16 x i32> %c, <16 x i32> %x, <16 x i1> splat (i1 -1), i32 %evl)
1295 %u = call <16 x i32> @llvm.vp.merge.nxv16i32(<16 x i1> %m, <16 x i32> %y, <16 x i32> %c, i32 %evl)
1299 define <16 x i32> @vnmsac_vx_nxv16i32_unmasked(<16 x i32> %a, i32 %b, <16 x i32> %c, <16 x i1> %m, i32 zeroext %evl) {
1300 ; CHECK-LABEL: vnmsac_vx_nxv16i32_unmasked:
1302 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, tu, ma
1303 ; CHECK-NEXT: vnmsac.vx v12, a0, v8
1304 ; CHECK-NEXT: vmv4r.v v8, v12
1306 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
1307 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
1308 %x = call <16 x i32> @llvm.vp.mul.nxv16i32(<16 x i32> %a, <16 x i32> %vb, <16 x i1> splat (i1 -1), i32 %evl)
1309 %y = call <16 x i32> @llvm.vp.sub.nxv16i32(<16 x i32> %c, <16 x i32> %x, <16 x i1> splat (i1 -1), i32 %evl)
1310 %u = call <16 x i32> @llvm.vp.merge.nxv16i32(<16 x i1> splat (i1 -1), <16 x i32> %y, <16 x i32> %c, i32 %evl)
1314 define <16 x i32> @vnmsac_vv_nxv16i32_ta(<16 x i32> %a, <16 x i32> %b, <16 x i32> %c, <16 x i1> %m, i32 zeroext %evl) {
1315 ; CHECK-LABEL: vnmsac_vv_nxv16i32_ta:
1317 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1318 ; CHECK-NEXT: vnmsac.vv v16, v8, v12, v0.t
1319 ; CHECK-NEXT: vmv.v.v v8, v16
1321 %x = call <16 x i32> @llvm.vp.mul.nxv16i32(<16 x i32> %a, <16 x i32> %b, <16 x i1> splat (i1 -1), i32 %evl)
1322 %y = call <16 x i32> @llvm.vp.sub.nxv16i32(<16 x i32> %c, <16 x i32> %x, <16 x i1> splat (i1 -1), i32 %evl)
1323 %u = call <16 x i32> @llvm.vp.select.nxv16i32(<16 x i1> %m, <16 x i32> %y, <16 x i32> %c, i32 %evl)
1327 define <16 x i32> @vnmsac_vx_nxv16i32_ta(<16 x i32> %a, i32 %b, <16 x i32> %c, <16 x i1> %m, i32 zeroext %evl) {
1328 ; CHECK-LABEL: vnmsac_vx_nxv16i32_ta:
1330 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, mu
1331 ; CHECK-NEXT: vnmsac.vx v12, a0, v8, v0.t
1332 ; CHECK-NEXT: vmv.v.v v8, v12
1334 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
1335 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
1336 %x = call <16 x i32> @llvm.vp.mul.nxv16i32(<16 x i32> %a, <16 x i32> %vb, <16 x i1> splat (i1 -1), i32 %evl)
1337 %y = call <16 x i32> @llvm.vp.sub.nxv16i32(<16 x i32> %c, <16 x i32> %x, <16 x i1> splat (i1 -1), i32 %evl)
1338 %u = call <16 x i32> @llvm.vp.select.nxv16i32(<16 x i1> %m, <16 x i32> %y, <16 x i32> %c, i32 %evl)
1342 declare <2 x i64> @llvm.vp.mul.nxv2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
1343 declare <2 x i64> @llvm.vp.sub.nxv2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
1344 declare <2 x i64> @llvm.vp.merge.nxv2i64(<2 x i1>, <2 x i64>, <2 x i64>, i32)
1345 declare <2 x i64> @llvm.vp.select.nxv2i64(<2 x i1>, <2 x i64>, <2 x i64>, i32)
1347 define <2 x i64> @vnmsac_vv_nxv2i64(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c, <2 x i1> %m, i32 zeroext %evl) {
1348 ; CHECK-LABEL: vnmsac_vv_nxv2i64:
1350 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1351 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
1352 ; CHECK-NEXT: vmv1r.v v8, v10
1354 %x = call <2 x i64> @llvm.vp.mul.nxv2i64(<2 x i64> %a, <2 x i64> %b, <2 x i1> splat (i1 -1), i32 %evl)
1355 %y = call <2 x i64> @llvm.vp.sub.nxv2i64(<2 x i64> %c, <2 x i64> %x, <2 x i1> splat (i1 -1), i32 %evl)
1356 %u = call <2 x i64> @llvm.vp.merge.nxv2i64(<2 x i1> %m, <2 x i64> %y, <2 x i64> %c, i32 %evl)
1360 define <2 x i64> @vnmsac_vv_nxv2i64_unmasked(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c, <2 x i1> %m, i32 zeroext %evl) {
1361 ; CHECK-LABEL: vnmsac_vv_nxv2i64_unmasked:
1363 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1364 ; CHECK-NEXT: vnmsac.vv v10, v8, v9
1365 ; CHECK-NEXT: vmv1r.v v8, v10
1367 %x = call <2 x i64> @llvm.vp.mul.nxv2i64(<2 x i64> %a, <2 x i64> %b, <2 x i1> splat (i1 -1), i32 %evl)
1368 %y = call <2 x i64> @llvm.vp.sub.nxv2i64(<2 x i64> %c, <2 x i64> %x, <2 x i1> splat (i1 -1), i32 %evl)
1369 %u = call <2 x i64> @llvm.vp.merge.nxv2i64(<2 x i1> splat (i1 -1), <2 x i64> %y, <2 x i64> %c, i32 %evl)
1373 define <2 x i64> @vnmsac_vx_nxv2i64(<2 x i64> %a, i64 %b, <2 x i64> %c, <2 x i1> %m, i32 zeroext %evl) {
1374 ; RV32-LABEL: vnmsac_vx_nxv2i64:
1376 ; RV32-NEXT: addi sp, sp, -16
1377 ; RV32-NEXT: .cfi_def_cfa_offset 16
1378 ; RV32-NEXT: sw a0, 8(sp)
1379 ; RV32-NEXT: sw a1, 12(sp)
1380 ; RV32-NEXT: addi a0, sp, 8
1381 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
1382 ; RV32-NEXT: vlse64.v v10, (a0), zero
1383 ; RV32-NEXT: vsetvli zero, a2, e64, m1, tu, mu
1384 ; RV32-NEXT: vnmsac.vv v9, v8, v10, v0.t
1385 ; RV32-NEXT: vmv1r.v v8, v9
1386 ; RV32-NEXT: addi sp, sp, 16
1387 ; RV32-NEXT: .cfi_def_cfa_offset 0
1390 ; RV64-LABEL: vnmsac_vx_nxv2i64:
1392 ; RV64-NEXT: vsetvli zero, a1, e64, m1, tu, mu
1393 ; RV64-NEXT: vnmsac.vx v9, a0, v8, v0.t
1394 ; RV64-NEXT: vmv1r.v v8, v9
1396 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
1397 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
1398 %x = call <2 x i64> @llvm.vp.mul.nxv2i64(<2 x i64> %a, <2 x i64> %vb, <2 x i1> splat (i1 -1), i32 %evl)
1399 %y = call <2 x i64> @llvm.vp.sub.nxv2i64(<2 x i64> %c, <2 x i64> %x, <2 x i1> splat (i1 -1), i32 %evl)
1400 %u = call <2 x i64> @llvm.vp.merge.nxv2i64(<2 x i1> %m, <2 x i64> %y, <2 x i64> %c, i32 %evl)
1404 define <2 x i64> @vnmsac_vx_nxv2i64_unmasked(<2 x i64> %a, i64 %b, <2 x i64> %c, <2 x i1> %m, i32 zeroext %evl) {
1405 ; RV32-LABEL: vnmsac_vx_nxv2i64_unmasked:
1407 ; RV32-NEXT: addi sp, sp, -16
1408 ; RV32-NEXT: .cfi_def_cfa_offset 16
1409 ; RV32-NEXT: sw a0, 8(sp)
1410 ; RV32-NEXT: sw a1, 12(sp)
1411 ; RV32-NEXT: addi a0, sp, 8
1412 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
1413 ; RV32-NEXT: vlse64.v v10, (a0), zero
1414 ; RV32-NEXT: vsetvli zero, a2, e64, m1, tu, ma
1415 ; RV32-NEXT: vnmsac.vv v9, v8, v10
1416 ; RV32-NEXT: vmv1r.v v8, v9
1417 ; RV32-NEXT: addi sp, sp, 16
1418 ; RV32-NEXT: .cfi_def_cfa_offset 0
1421 ; RV64-LABEL: vnmsac_vx_nxv2i64_unmasked:
1423 ; RV64-NEXT: vsetvli zero, a1, e64, m1, tu, ma
1424 ; RV64-NEXT: vnmsac.vx v9, a0, v8
1425 ; RV64-NEXT: vmv1r.v v8, v9
1427 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
1428 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
1429 %x = call <2 x i64> @llvm.vp.mul.nxv2i64(<2 x i64> %a, <2 x i64> %vb, <2 x i1> splat (i1 -1), i32 %evl)
1430 %y = call <2 x i64> @llvm.vp.sub.nxv2i64(<2 x i64> %c, <2 x i64> %x, <2 x i1> splat (i1 -1), i32 %evl)
1431 %u = call <2 x i64> @llvm.vp.merge.nxv2i64(<2 x i1> splat (i1 -1), <2 x i64> %y, <2 x i64> %c, i32 %evl)
1435 define <2 x i64> @vnmsac_vv_nxv2i64_ta(<2 x i64> %a, <2 x i64> %b, <2 x i64> %c, <2 x i1> %m, i32 zeroext %evl) {
1436 ; CHECK-LABEL: vnmsac_vv_nxv2i64_ta:
1438 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1439 ; CHECK-NEXT: vnmsac.vv v10, v8, v9, v0.t
1440 ; CHECK-NEXT: vmv.v.v v8, v10
1442 %x = call <2 x i64> @llvm.vp.mul.nxv2i64(<2 x i64> %a, <2 x i64> %b, <2 x i1> splat (i1 -1), i32 %evl)
1443 %y = call <2 x i64> @llvm.vp.sub.nxv2i64(<2 x i64> %c, <2 x i64> %x, <2 x i1> splat (i1 -1), i32 %evl)
1444 %u = call <2 x i64> @llvm.vp.select.nxv2i64(<2 x i1> %m, <2 x i64> %y, <2 x i64> %c, i32 %evl)
1448 define <2 x i64> @vnmsac_vx_nxv2i64_ta(<2 x i64> %a, i64 %b, <2 x i64> %c, <2 x i1> %m, i32 zeroext %evl) {
1449 ; RV32-LABEL: vnmsac_vx_nxv2i64_ta:
1451 ; RV32-NEXT: addi sp, sp, -16
1452 ; RV32-NEXT: .cfi_def_cfa_offset 16
1453 ; RV32-NEXT: sw a0, 8(sp)
1454 ; RV32-NEXT: sw a1, 12(sp)
1455 ; RV32-NEXT: addi a0, sp, 8
1456 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
1457 ; RV32-NEXT: vlse64.v v10, (a0), zero
1458 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, mu
1459 ; RV32-NEXT: vnmsac.vv v9, v8, v10, v0.t
1460 ; RV32-NEXT: vmv.v.v v8, v9
1461 ; RV32-NEXT: addi sp, sp, 16
1462 ; RV32-NEXT: .cfi_def_cfa_offset 0
1465 ; RV64-LABEL: vnmsac_vx_nxv2i64_ta:
1467 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, mu
1468 ; RV64-NEXT: vnmsac.vx v9, a0, v8, v0.t
1469 ; RV64-NEXT: vmv.v.v v8, v9
1471 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
1472 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
1473 %x = call <2 x i64> @llvm.vp.mul.nxv2i64(<2 x i64> %a, <2 x i64> %vb, <2 x i1> splat (i1 -1), i32 %evl)
1474 %y = call <2 x i64> @llvm.vp.sub.nxv2i64(<2 x i64> %c, <2 x i64> %x, <2 x i1> splat (i1 -1), i32 %evl)
1475 %u = call <2 x i64> @llvm.vp.select.nxv2i64(<2 x i1> %m, <2 x i64> %y, <2 x i64> %c, i32 %evl)
1479 declare <4 x i64> @llvm.vp.mul.nxv4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
1480 declare <4 x i64> @llvm.vp.sub.nxv4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
1481 declare <4 x i64> @llvm.vp.merge.nxv4i64(<4 x i1>, <4 x i64>, <4 x i64>, i32)
1482 declare <4 x i64> @llvm.vp.select.nxv4i64(<4 x i1>, <4 x i64>, <4 x i64>, i32)
1484 define <4 x i64> @vnmsac_vv_nxv4i64(<4 x i64> %a, <4 x i64> %b, <4 x i64> %c, <4 x i1> %m, i32 zeroext %evl) {
1485 ; CHECK-LABEL: vnmsac_vv_nxv4i64:
1487 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1488 ; CHECK-NEXT: vnmsac.vv v12, v8, v10, v0.t
1489 ; CHECK-NEXT: vmv2r.v v8, v12
1491 %x = call <4 x i64> @llvm.vp.mul.nxv4i64(<4 x i64> %a, <4 x i64> %b, <4 x i1> splat (i1 -1), i32 %evl)
1492 %y = call <4 x i64> @llvm.vp.sub.nxv4i64(<4 x i64> %c, <4 x i64> %x, <4 x i1> splat (i1 -1), i32 %evl)
1493 %u = call <4 x i64> @llvm.vp.merge.nxv4i64(<4 x i1> %m, <4 x i64> %y, <4 x i64> %c, i32 %evl)
1497 define <4 x i64> @vnmsac_vv_nxv4i64_unmasked(<4 x i64> %a, <4 x i64> %b, <4 x i64> %c, <4 x i1> %m, i32 zeroext %evl) {
1498 ; CHECK-LABEL: vnmsac_vv_nxv4i64_unmasked:
1500 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1501 ; CHECK-NEXT: vnmsac.vv v12, v8, v10
1502 ; CHECK-NEXT: vmv2r.v v8, v12
1504 %x = call <4 x i64> @llvm.vp.mul.nxv4i64(<4 x i64> %a, <4 x i64> %b, <4 x i1> splat (i1 -1), i32 %evl)
1505 %y = call <4 x i64> @llvm.vp.sub.nxv4i64(<4 x i64> %c, <4 x i64> %x, <4 x i1> splat (i1 -1), i32 %evl)
1506 %u = call <4 x i64> @llvm.vp.merge.nxv4i64(<4 x i1> splat (i1 -1), <4 x i64> %y, <4 x i64> %c, i32 %evl)
1510 define <4 x i64> @vnmsac_vx_nxv4i64(<4 x i64> %a, i64 %b, <4 x i64> %c, <4 x i1> %m, i32 zeroext %evl) {
1511 ; RV32-LABEL: vnmsac_vx_nxv4i64:
1513 ; RV32-NEXT: addi sp, sp, -16
1514 ; RV32-NEXT: .cfi_def_cfa_offset 16
1515 ; RV32-NEXT: sw a0, 8(sp)
1516 ; RV32-NEXT: sw a1, 12(sp)
1517 ; RV32-NEXT: addi a0, sp, 8
1518 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
1519 ; RV32-NEXT: vlse64.v v12, (a0), zero
1520 ; RV32-NEXT: vsetvli zero, a2, e64, m2, tu, mu
1521 ; RV32-NEXT: vnmsac.vv v10, v8, v12, v0.t
1522 ; RV32-NEXT: vmv2r.v v8, v10
1523 ; RV32-NEXT: addi sp, sp, 16
1524 ; RV32-NEXT: .cfi_def_cfa_offset 0
1527 ; RV64-LABEL: vnmsac_vx_nxv4i64:
1529 ; RV64-NEXT: vsetvli zero, a1, e64, m2, tu, mu
1530 ; RV64-NEXT: vnmsac.vx v10, a0, v8, v0.t
1531 ; RV64-NEXT: vmv2r.v v8, v10
1533 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
1534 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
1535 %x = call <4 x i64> @llvm.vp.mul.nxv4i64(<4 x i64> %a, <4 x i64> %vb, <4 x i1> splat (i1 -1), i32 %evl)
1536 %y = call <4 x i64> @llvm.vp.sub.nxv4i64(<4 x i64> %c, <4 x i64> %x, <4 x i1> splat (i1 -1), i32 %evl)
1537 %u = call <4 x i64> @llvm.vp.merge.nxv4i64(<4 x i1> %m, <4 x i64> %y, <4 x i64> %c, i32 %evl)
1541 define <4 x i64> @vnmsac_vx_nxv4i64_unmasked(<4 x i64> %a, i64 %b, <4 x i64> %c, <4 x i1> %m, i32 zeroext %evl) {
1542 ; RV32-LABEL: vnmsac_vx_nxv4i64_unmasked:
1544 ; RV32-NEXT: addi sp, sp, -16
1545 ; RV32-NEXT: .cfi_def_cfa_offset 16
1546 ; RV32-NEXT: sw a0, 8(sp)
1547 ; RV32-NEXT: sw a1, 12(sp)
1548 ; RV32-NEXT: addi a0, sp, 8
1549 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
1550 ; RV32-NEXT: vlse64.v v12, (a0), zero
1551 ; RV32-NEXT: vsetvli zero, a2, e64, m2, tu, ma
1552 ; RV32-NEXT: vnmsac.vv v10, v8, v12
1553 ; RV32-NEXT: vmv2r.v v8, v10
1554 ; RV32-NEXT: addi sp, sp, 16
1555 ; RV32-NEXT: .cfi_def_cfa_offset 0
1558 ; RV64-LABEL: vnmsac_vx_nxv4i64_unmasked:
1560 ; RV64-NEXT: vsetvli zero, a1, e64, m2, tu, ma
1561 ; RV64-NEXT: vnmsac.vx v10, a0, v8
1562 ; RV64-NEXT: vmv2r.v v8, v10
1564 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
1565 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
1566 %x = call <4 x i64> @llvm.vp.mul.nxv4i64(<4 x i64> %a, <4 x i64> %vb, <4 x i1> splat (i1 -1), i32 %evl)
1567 %y = call <4 x i64> @llvm.vp.sub.nxv4i64(<4 x i64> %c, <4 x i64> %x, <4 x i1> splat (i1 -1), i32 %evl)
1568 %u = call <4 x i64> @llvm.vp.merge.nxv4i64(<4 x i1> splat (i1 -1), <4 x i64> %y, <4 x i64> %c, i32 %evl)
1572 define <4 x i64> @vnmsac_vv_nxv4i64_ta(<4 x i64> %a, <4 x i64> %b, <4 x i64> %c, <4 x i1> %m, i32 zeroext %evl) {
1573 ; CHECK-LABEL: vnmsac_vv_nxv4i64_ta:
1575 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1576 ; CHECK-NEXT: vnmsac.vv v12, v8, v10, v0.t
1577 ; CHECK-NEXT: vmv.v.v v8, v12
1579 %x = call <4 x i64> @llvm.vp.mul.nxv4i64(<4 x i64> %a, <4 x i64> %b, <4 x i1> splat (i1 -1), i32 %evl)
1580 %y = call <4 x i64> @llvm.vp.sub.nxv4i64(<4 x i64> %c, <4 x i64> %x, <4 x i1> splat (i1 -1), i32 %evl)
1581 %u = call <4 x i64> @llvm.vp.select.nxv4i64(<4 x i1> %m, <4 x i64> %y, <4 x i64> %c, i32 %evl)
1585 define <4 x i64> @vnmsac_vx_nxv4i64_ta(<4 x i64> %a, i64 %b, <4 x i64> %c, <4 x i1> %m, i32 zeroext %evl) {
1586 ; RV32-LABEL: vnmsac_vx_nxv4i64_ta:
1588 ; RV32-NEXT: addi sp, sp, -16
1589 ; RV32-NEXT: .cfi_def_cfa_offset 16
1590 ; RV32-NEXT: sw a0, 8(sp)
1591 ; RV32-NEXT: sw a1, 12(sp)
1592 ; RV32-NEXT: addi a0, sp, 8
1593 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
1594 ; RV32-NEXT: vlse64.v v12, (a0), zero
1595 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, mu
1596 ; RV32-NEXT: vnmsac.vv v10, v8, v12, v0.t
1597 ; RV32-NEXT: vmv.v.v v8, v10
1598 ; RV32-NEXT: addi sp, sp, 16
1599 ; RV32-NEXT: .cfi_def_cfa_offset 0
1602 ; RV64-LABEL: vnmsac_vx_nxv4i64_ta:
1604 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, mu
1605 ; RV64-NEXT: vnmsac.vx v10, a0, v8, v0.t
1606 ; RV64-NEXT: vmv.v.v v8, v10
1608 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
1609 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
1610 %x = call <4 x i64> @llvm.vp.mul.nxv4i64(<4 x i64> %a, <4 x i64> %vb, <4 x i1> splat (i1 -1), i32 %evl)
1611 %y = call <4 x i64> @llvm.vp.sub.nxv4i64(<4 x i64> %c, <4 x i64> %x, <4 x i1> splat (i1 -1), i32 %evl)
1612 %u = call <4 x i64> @llvm.vp.select.nxv4i64(<4 x i1> %m, <4 x i64> %y, <4 x i64> %c, i32 %evl)
1616 declare <8 x i64> @llvm.vp.mul.nxv8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
1617 declare <8 x i64> @llvm.vp.sub.nxv8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
1618 declare <8 x i64> @llvm.vp.merge.nxv8i64(<8 x i1>, <8 x i64>, <8 x i64>, i32)
1619 declare <8 x i64> @llvm.vp.select.nxv8i64(<8 x i1>, <8 x i64>, <8 x i64>, i32)
1621 define <8 x i64> @vnmsac_vv_nxv8i64(<8 x i64> %a, <8 x i64> %b, <8 x i64> %c, <8 x i1> %m, i32 zeroext %evl) {
1622 ; CHECK-LABEL: vnmsac_vv_nxv8i64:
1624 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1625 ; CHECK-NEXT: vnmsac.vv v16, v8, v12, v0.t
1626 ; CHECK-NEXT: vmv4r.v v8, v16
1628 %x = call <8 x i64> @llvm.vp.mul.nxv8i64(<8 x i64> %a, <8 x i64> %b, <8 x i1> splat (i1 -1), i32 %evl)
1629 %y = call <8 x i64> @llvm.vp.sub.nxv8i64(<8 x i64> %c, <8 x i64> %x, <8 x i1> splat (i1 -1), i32 %evl)
1630 %u = call <8 x i64> @llvm.vp.merge.nxv8i64(<8 x i1> %m, <8 x i64> %y, <8 x i64> %c, i32 %evl)
1634 define <8 x i64> @vnmsac_vv_nxv8i64_unmasked(<8 x i64> %a, <8 x i64> %b, <8 x i64> %c, <8 x i1> %m, i32 zeroext %evl) {
1635 ; CHECK-LABEL: vnmsac_vv_nxv8i64_unmasked:
1637 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1638 ; CHECK-NEXT: vnmsac.vv v16, v8, v12
1639 ; CHECK-NEXT: vmv4r.v v8, v16
1641 %x = call <8 x i64> @llvm.vp.mul.nxv8i64(<8 x i64> %a, <8 x i64> %b, <8 x i1> splat (i1 -1), i32 %evl)
1642 %y = call <8 x i64> @llvm.vp.sub.nxv8i64(<8 x i64> %c, <8 x i64> %x, <8 x i1> splat (i1 -1), i32 %evl)
1643 %u = call <8 x i64> @llvm.vp.merge.nxv8i64(<8 x i1> splat (i1 -1), <8 x i64> %y, <8 x i64> %c, i32 %evl)
1647 define <8 x i64> @vnmsac_vx_nxv8i64(<8 x i64> %a, i64 %b, <8 x i64> %c, <8 x i1> %m, i32 zeroext %evl) {
1648 ; RV32-LABEL: vnmsac_vx_nxv8i64:
1650 ; RV32-NEXT: addi sp, sp, -16
1651 ; RV32-NEXT: .cfi_def_cfa_offset 16
1652 ; RV32-NEXT: sw a0, 8(sp)
1653 ; RV32-NEXT: sw a1, 12(sp)
1654 ; RV32-NEXT: addi a0, sp, 8
1655 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1656 ; RV32-NEXT: vlse64.v v16, (a0), zero
1657 ; RV32-NEXT: vsetvli zero, a2, e64, m4, tu, mu
1658 ; RV32-NEXT: vnmsac.vv v12, v8, v16, v0.t
1659 ; RV32-NEXT: vmv4r.v v8, v12
1660 ; RV32-NEXT: addi sp, sp, 16
1661 ; RV32-NEXT: .cfi_def_cfa_offset 0
1664 ; RV64-LABEL: vnmsac_vx_nxv8i64:
1666 ; RV64-NEXT: vsetvli zero, a1, e64, m4, tu, mu
1667 ; RV64-NEXT: vnmsac.vx v12, a0, v8, v0.t
1668 ; RV64-NEXT: vmv4r.v v8, v12
1670 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1671 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1672 %x = call <8 x i64> @llvm.vp.mul.nxv8i64(<8 x i64> %a, <8 x i64> %vb, <8 x i1> splat (i1 -1), i32 %evl)
1673 %y = call <8 x i64> @llvm.vp.sub.nxv8i64(<8 x i64> %c, <8 x i64> %x, <8 x i1> splat (i1 -1), i32 %evl)
1674 %u = call <8 x i64> @llvm.vp.merge.nxv8i64(<8 x i1> %m, <8 x i64> %y, <8 x i64> %c, i32 %evl)
1678 define <8 x i64> @vnmsac_vx_nxv8i64_unmasked(<8 x i64> %a, i64 %b, <8 x i64> %c, <8 x i1> %m, i32 zeroext %evl) {
1679 ; RV32-LABEL: vnmsac_vx_nxv8i64_unmasked:
1681 ; RV32-NEXT: addi sp, sp, -16
1682 ; RV32-NEXT: .cfi_def_cfa_offset 16
1683 ; RV32-NEXT: sw a0, 8(sp)
1684 ; RV32-NEXT: sw a1, 12(sp)
1685 ; RV32-NEXT: addi a0, sp, 8
1686 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1687 ; RV32-NEXT: vlse64.v v16, (a0), zero
1688 ; RV32-NEXT: vsetvli zero, a2, e64, m4, tu, ma
1689 ; RV32-NEXT: vnmsac.vv v12, v8, v16
1690 ; RV32-NEXT: vmv4r.v v8, v12
1691 ; RV32-NEXT: addi sp, sp, 16
1692 ; RV32-NEXT: .cfi_def_cfa_offset 0
1695 ; RV64-LABEL: vnmsac_vx_nxv8i64_unmasked:
1697 ; RV64-NEXT: vsetvli zero, a1, e64, m4, tu, ma
1698 ; RV64-NEXT: vnmsac.vx v12, a0, v8
1699 ; RV64-NEXT: vmv4r.v v8, v12
1701 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1702 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1703 %x = call <8 x i64> @llvm.vp.mul.nxv8i64(<8 x i64> %a, <8 x i64> %vb, <8 x i1> splat (i1 -1), i32 %evl)
1704 %y = call <8 x i64> @llvm.vp.sub.nxv8i64(<8 x i64> %c, <8 x i64> %x, <8 x i1> splat (i1 -1), i32 %evl)
1705 %u = call <8 x i64> @llvm.vp.merge.nxv8i64(<8 x i1> splat (i1 -1), <8 x i64> %y, <8 x i64> %c, i32 %evl)
1709 define <8 x i64> @vnmsac_vv_nxv8i64_ta(<8 x i64> %a, <8 x i64> %b, <8 x i64> %c, <8 x i1> %m, i32 zeroext %evl) {
1710 ; CHECK-LABEL: vnmsac_vv_nxv8i64_ta:
1712 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1713 ; CHECK-NEXT: vnmsac.vv v16, v8, v12, v0.t
1714 ; CHECK-NEXT: vmv.v.v v8, v16
1716 %x = call <8 x i64> @llvm.vp.mul.nxv8i64(<8 x i64> %a, <8 x i64> %b, <8 x i1> splat (i1 -1), i32 %evl)
1717 %y = call <8 x i64> @llvm.vp.sub.nxv8i64(<8 x i64> %c, <8 x i64> %x, <8 x i1> splat (i1 -1), i32 %evl)
1718 %u = call <8 x i64> @llvm.vp.select.nxv8i64(<8 x i1> %m, <8 x i64> %y, <8 x i64> %c, i32 %evl)
1722 define <8 x i64> @vnmsac_vx_nxv8i64_ta(<8 x i64> %a, i64 %b, <8 x i64> %c, <8 x i1> %m, i32 zeroext %evl) {
1723 ; RV32-LABEL: vnmsac_vx_nxv8i64_ta:
1725 ; RV32-NEXT: addi sp, sp, -16
1726 ; RV32-NEXT: .cfi_def_cfa_offset 16
1727 ; RV32-NEXT: sw a0, 8(sp)
1728 ; RV32-NEXT: sw a1, 12(sp)
1729 ; RV32-NEXT: addi a0, sp, 8
1730 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1731 ; RV32-NEXT: vlse64.v v16, (a0), zero
1732 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, mu
1733 ; RV32-NEXT: vnmsac.vv v12, v8, v16, v0.t
1734 ; RV32-NEXT: vmv.v.v v8, v12
1735 ; RV32-NEXT: addi sp, sp, 16
1736 ; RV32-NEXT: .cfi_def_cfa_offset 0
1739 ; RV64-LABEL: vnmsac_vx_nxv8i64_ta:
1741 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, mu
1742 ; RV64-NEXT: vnmsac.vx v12, a0, v8, v0.t
1743 ; RV64-NEXT: vmv.v.v v8, v12
1745 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1746 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1747 %x = call <8 x i64> @llvm.vp.mul.nxv8i64(<8 x i64> %a, <8 x i64> %vb, <8 x i1> splat (i1 -1), i32 %evl)
1748 %y = call <8 x i64> @llvm.vp.sub.nxv8i64(<8 x i64> %c, <8 x i64> %x, <8 x i1> splat (i1 -1), i32 %evl)
1749 %u = call <8 x i64> @llvm.vp.select.nxv8i64(<8 x i1> %m, <8 x i64> %y, <8 x i64> %c, i32 %evl)