1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s | FileCheck %s
4 target triple = "aarch64-unknown-linux-gnu"
6 define <vscale x 8 x half> @fadd_h_immhalf(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
7 ; CHECK-LABEL: fadd_h_immhalf:
9 ; CHECK-NEXT: fadd z0.h, p0/m, z0.h, #0.5
11 %elt = insertelement <vscale x 8 x half> undef, half 0.500000e+00, i32 0
12 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
13 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fadd.nxv8f16(<vscale x 8 x i1> %pg,
14 <vscale x 8 x half> %a,
15 <vscale x 8 x half> %splat)
16 ret <vscale x 8 x half> %out
20 define <vscale x 8 x half> @fadd_h_immhalf_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
21 ; CHECK-LABEL: fadd_h_immhalf_zero:
23 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
24 ; CHECK-NEXT: fadd z0.h, p0/m, z0.h, #0.5
26 %elt = insertelement <vscale x 8 x half> undef, half 0.500000e+00, i32 0
27 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
28 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
29 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fadd.nxv8f16(<vscale x 8 x i1> %pg,
30 <vscale x 8 x half> %a_z,
31 <vscale x 8 x half> %splat)
32 ret <vscale x 8 x half> %out
35 define <vscale x 8 x half> @fadd_h_immone(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
36 ; CHECK-LABEL: fadd_h_immone:
38 ; CHECK-NEXT: fadd z0.h, p0/m, z0.h, #1.0
40 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
41 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
42 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fadd.nxv8f16(<vscale x 8 x i1> %pg,
43 <vscale x 8 x half> %a,
44 <vscale x 8 x half> %splat)
45 ret <vscale x 8 x half> %out
48 define <vscale x 8 x half> @fadd_h_immone_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
49 ; CHECK-LABEL: fadd_h_immone_zero:
51 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
52 ; CHECK-NEXT: fadd z0.h, p0/m, z0.h, #1.0
54 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
55 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
56 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
57 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fadd.nxv8f16(<vscale x 8 x i1> %pg,
58 <vscale x 8 x half> %a_z,
59 <vscale x 8 x half> %splat)
60 ret <vscale x 8 x half> %out
63 define <vscale x 4 x float> @fadd_s_immhalf(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
64 ; CHECK-LABEL: fadd_s_immhalf:
66 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, #0.5
68 %elt = insertelement <vscale x 4 x float> undef, float 0.500000e+00, i32 0
69 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
70 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fadd.nxv4f32(<vscale x 4 x i1> %pg,
71 <vscale x 4 x float> %a,
72 <vscale x 4 x float> %splat)
73 ret <vscale x 4 x float> %out
76 define <vscale x 4 x float> @fadd_s_immhalf_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
77 ; CHECK-LABEL: fadd_s_immhalf_zero:
79 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
80 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, #0.5
82 %elt = insertelement <vscale x 4 x float> undef, float 0.500000e+00, i32 0
83 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
84 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
85 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fadd.nxv4f32(<vscale x 4 x i1> %pg,
86 <vscale x 4 x float> %a_z,
87 <vscale x 4 x float> %splat)
88 ret <vscale x 4 x float> %out
91 define <vscale x 4 x float> @fadd_s_immone(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
92 ; CHECK-LABEL: fadd_s_immone:
94 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, #1.0
96 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
97 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
98 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fadd.nxv4f32(<vscale x 4 x i1> %pg,
99 <vscale x 4 x float> %a,
100 <vscale x 4 x float> %splat)
101 ret <vscale x 4 x float> %out
104 define <vscale x 4 x float> @fadd_s_immone_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
105 ; CHECK-LABEL: fadd_s_immone_zero:
107 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
108 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, #1.0
110 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
111 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
112 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
113 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fadd.nxv4f32(<vscale x 4 x i1> %pg,
114 <vscale x 4 x float> %a_z,
115 <vscale x 4 x float> %splat)
116 ret <vscale x 4 x float> %out
119 define <vscale x 2 x double> @fadd_d_immhalf(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
120 ; CHECK-LABEL: fadd_d_immhalf:
122 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, #0.5
124 %elt = insertelement <vscale x 2 x double> undef, double 0.500000e+00, i32 0
125 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
126 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fadd.nxv2f64(<vscale x 2 x i1> %pg,
127 <vscale x 2 x double> %a,
128 <vscale x 2 x double> %splat)
129 ret <vscale x 2 x double> %out
132 define <vscale x 2 x double> @fadd_d_immhalf_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
133 ; CHECK-LABEL: fadd_d_immhalf_zero:
135 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
136 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, #0.5
138 %elt = insertelement <vscale x 2 x double> undef, double 0.500000e+00, i32 0
139 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
140 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
141 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fadd.nxv2f64(<vscale x 2 x i1> %pg,
142 <vscale x 2 x double> %a_z,
143 <vscale x 2 x double> %splat)
144 ret <vscale x 2 x double> %out
147 define <vscale x 2 x double> @fadd_d_immone(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
148 ; CHECK-LABEL: fadd_d_immone:
150 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, #1.0
152 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
153 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
154 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fadd.nxv2f64(<vscale x 2 x i1> %pg,
155 <vscale x 2 x double> %a,
156 <vscale x 2 x double> %splat)
157 ret <vscale x 2 x double> %out
160 define <vscale x 2 x double> @fadd_d_immone_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
161 ; CHECK-LABEL: fadd_d_immone_zero:
163 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
164 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, #1.0
166 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
167 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
168 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
169 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fadd.nxv2f64(<vscale x 2 x i1> %pg,
170 <vscale x 2 x double> %a_z,
171 <vscale x 2 x double> %splat)
172 ret <vscale x 2 x double> %out
175 define <vscale x 8 x half> @fmax_h_immzero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
176 ; CHECK-LABEL: fmax_h_immzero:
178 ; CHECK-NEXT: fmax z0.h, p0/m, z0.h, #0.0
180 %elt = insertelement <vscale x 8 x half> undef, half 0.000000e+00, i32 0
181 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
182 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmax.nxv8f16(<vscale x 8 x i1> %pg,
183 <vscale x 8 x half> %a,
184 <vscale x 8 x half> %splat)
185 ret <vscale x 8 x half> %out
188 define <vscale x 8 x half> @fmax_h_immzero_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
189 ; CHECK-LABEL: fmax_h_immzero_zero:
191 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
192 ; CHECK-NEXT: fmax z0.h, p0/m, z0.h, #0.0
194 %elt = insertelement <vscale x 8 x half> undef, half 0.000000e+00, i32 0
195 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
196 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
197 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmax.nxv8f16(<vscale x 8 x i1> %pg,
198 <vscale x 8 x half> %a_z,
199 <vscale x 8 x half> %splat)
200 ret <vscale x 8 x half> %out
203 define <vscale x 8 x half> @fmax_h_immone(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
204 ; CHECK-LABEL: fmax_h_immone:
206 ; CHECK-NEXT: fmax z0.h, p0/m, z0.h, #1.0
208 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
209 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
210 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmax.nxv8f16(<vscale x 8 x i1> %pg,
211 <vscale x 8 x half> %a,
212 <vscale x 8 x half> %splat)
213 ret <vscale x 8 x half> %out
216 define <vscale x 8 x half> @fmax_h_immone_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
217 ; CHECK-LABEL: fmax_h_immone_zero:
219 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
220 ; CHECK-NEXT: fmax z0.h, p0/m, z0.h, #1.0
222 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
223 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
224 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
225 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmax.nxv8f16(<vscale x 8 x i1> %pg,
226 <vscale x 8 x half> %a_z,
227 <vscale x 8 x half> %splat)
228 ret <vscale x 8 x half> %out
231 define <vscale x 4 x float> @fmax_s_immzero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
232 ; CHECK-LABEL: fmax_s_immzero:
234 ; CHECK-NEXT: fmax z0.s, p0/m, z0.s, #0.0
236 %elt = insertelement <vscale x 4 x float> undef, float 0.000000e+00, i32 0
237 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
238 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmax.nxv4f32(<vscale x 4 x i1> %pg,
239 <vscale x 4 x float> %a,
240 <vscale x 4 x float> %splat)
241 ret <vscale x 4 x float> %out
244 define <vscale x 4 x float> @fmax_s_immzero_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
245 ; CHECK-LABEL: fmax_s_immzero_zero:
247 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
248 ; CHECK-NEXT: fmax z0.s, p0/m, z0.s, #0.0
250 %elt = insertelement <vscale x 4 x float> undef, float 0.000000e+00, i32 0
251 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
252 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
253 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmax.nxv4f32(<vscale x 4 x i1> %pg,
254 <vscale x 4 x float> %a_z,
255 <vscale x 4 x float> %splat)
256 ret <vscale x 4 x float> %out
259 define <vscale x 4 x float> @fmax_s_immone(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
260 ; CHECK-LABEL: fmax_s_immone:
262 ; CHECK-NEXT: fmax z0.s, p0/m, z0.s, #1.0
264 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
265 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
266 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmax.nxv4f32(<vscale x 4 x i1> %pg,
267 <vscale x 4 x float> %a,
268 <vscale x 4 x float> %splat)
269 ret <vscale x 4 x float> %out
272 define <vscale x 4 x float> @fmax_s_immone_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
273 ; CHECK-LABEL: fmax_s_immone_zero:
275 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
276 ; CHECK-NEXT: fmax z0.s, p0/m, z0.s, #1.0
278 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
279 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
280 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
281 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmax.nxv4f32(<vscale x 4 x i1> %pg,
282 <vscale x 4 x float> %a_z,
283 <vscale x 4 x float> %splat)
284 ret <vscale x 4 x float> %out
287 define <vscale x 2 x double> @fmax_d_immzero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
288 ; CHECK-LABEL: fmax_d_immzero:
290 ; CHECK-NEXT: fmax z0.d, p0/m, z0.d, #0.0
292 %elt = insertelement <vscale x 2 x double> undef, double 0.000000e+00, i32 0
293 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
294 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmax.nxv2f64(<vscale x 2 x i1> %pg,
295 <vscale x 2 x double> %a,
296 <vscale x 2 x double> %splat)
297 ret <vscale x 2 x double> %out
300 define <vscale x 2 x double> @fmax_d_immzero_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
301 ; CHECK-LABEL: fmax_d_immzero_zero:
303 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
304 ; CHECK-NEXT: fmax z0.d, p0/m, z0.d, #0.0
306 %elt = insertelement <vscale x 2 x double> undef, double 0.000000e+00, i32 0
307 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
308 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
309 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmax.nxv2f64(<vscale x 2 x i1> %pg,
310 <vscale x 2 x double> %a_z,
311 <vscale x 2 x double> %splat)
312 ret <vscale x 2 x double> %out
315 define <vscale x 2 x double> @fmax_d_immone(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
316 ; CHECK-LABEL: fmax_d_immone:
318 ; CHECK-NEXT: fmax z0.d, p0/m, z0.d, #1.0
320 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
321 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
322 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmax.nxv2f64(<vscale x 2 x i1> %pg,
323 <vscale x 2 x double> %a,
324 <vscale x 2 x double> %splat)
325 ret <vscale x 2 x double> %out
328 define <vscale x 2 x double> @fmax_d_immone_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
329 ; CHECK-LABEL: fmax_d_immone_zero:
331 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
332 ; CHECK-NEXT: fmax z0.d, p0/m, z0.d, #1.0
334 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
335 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
336 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
337 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmax.nxv2f64(<vscale x 2 x i1> %pg,
338 <vscale x 2 x double> %a_z,
339 <vscale x 2 x double> %splat)
340 ret <vscale x 2 x double> %out
343 define <vscale x 8 x half> @fmaxnm_h_immzero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
344 ; CHECK-LABEL: fmaxnm_h_immzero:
346 ; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, #0.0
348 %elt = insertelement <vscale x 8 x half> undef, half 0.000000e+00, i32 0
349 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
350 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmaxnm.nxv8f16(<vscale x 8 x i1> %pg,
351 <vscale x 8 x half> %a,
352 <vscale x 8 x half> %splat)
353 ret <vscale x 8 x half> %out
356 define <vscale x 8 x half> @fmaxnm_h_immzero_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
357 ; CHECK-LABEL: fmaxnm_h_immzero_zero:
359 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
360 ; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, #0.0
362 %elt = insertelement <vscale x 8 x half> undef, half 0.000000e+00, i32 0
363 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
364 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
365 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmaxnm.nxv8f16(<vscale x 8 x i1> %pg,
366 <vscale x 8 x half> %a_z,
367 <vscale x 8 x half> %splat)
368 ret <vscale x 8 x half> %out
371 define <vscale x 8 x half> @fmaxnm_h_immone(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
372 ; CHECK-LABEL: fmaxnm_h_immone:
374 ; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, #1.0
376 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
377 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
378 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmaxnm.nxv8f16(<vscale x 8 x i1> %pg,
379 <vscale x 8 x half> %a,
380 <vscale x 8 x half> %splat)
381 ret <vscale x 8 x half> %out
384 define <vscale x 8 x half> @fmaxnm_h_immone_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
385 ; CHECK-LABEL: fmaxnm_h_immone_zero:
387 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
388 ; CHECK-NEXT: fmaxnm z0.h, p0/m, z0.h, #1.0
390 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
391 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
392 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
393 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmaxnm.nxv8f16(<vscale x 8 x i1> %pg,
394 <vscale x 8 x half> %a_z,
395 <vscale x 8 x half> %splat)
396 ret <vscale x 8 x half> %out
399 define <vscale x 4 x float> @fmaxnm_s_immzero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
400 ; CHECK-LABEL: fmaxnm_s_immzero:
402 ; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, #0.0
404 %elt = insertelement <vscale x 4 x float> undef, float 0.000000e+00, i32 0
405 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
406 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmaxnm.nxv4f32(<vscale x 4 x i1> %pg,
407 <vscale x 4 x float> %a,
408 <vscale x 4 x float> %splat)
409 ret <vscale x 4 x float> %out
412 define <vscale x 4 x float> @fmaxnm_s_immzero_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
413 ; CHECK-LABEL: fmaxnm_s_immzero_zero:
415 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
416 ; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, #0.0
418 %elt = insertelement <vscale x 4 x float> undef, float 0.000000e+00, i32 0
419 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
420 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
421 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmaxnm.nxv4f32(<vscale x 4 x i1> %pg,
422 <vscale x 4 x float> %a_z,
423 <vscale x 4 x float> %splat)
424 ret <vscale x 4 x float> %out
427 define <vscale x 4 x float> @fmaxnm_s_immone(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
428 ; CHECK-LABEL: fmaxnm_s_immone:
430 ; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, #1.0
432 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
433 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
434 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmaxnm.nxv4f32(<vscale x 4 x i1> %pg,
435 <vscale x 4 x float> %a,
436 <vscale x 4 x float> %splat)
437 ret <vscale x 4 x float> %out
440 define <vscale x 4 x float> @fmaxnm_s_immone_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
441 ; CHECK-LABEL: fmaxnm_s_immone_zero:
443 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
444 ; CHECK-NEXT: fmaxnm z0.s, p0/m, z0.s, #1.0
446 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
447 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
448 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
449 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmaxnm.nxv4f32(<vscale x 4 x i1> %pg,
450 <vscale x 4 x float> %a_z,
451 <vscale x 4 x float> %splat)
452 ret <vscale x 4 x float> %out
455 define <vscale x 2 x double> @fmaxnm_d_immzero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
456 ; CHECK-LABEL: fmaxnm_d_immzero:
458 ; CHECK-NEXT: fmaxnm z0.d, p0/m, z0.d, #0.0
460 %elt = insertelement <vscale x 2 x double> undef, double 0.000000e+00, i32 0
461 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
462 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmaxnm.nxv2f64(<vscale x 2 x i1> %pg,
463 <vscale x 2 x double> %a,
464 <vscale x 2 x double> %splat)
465 ret <vscale x 2 x double> %out
468 define <vscale x 2 x double> @fmaxnm_d_immzero_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
469 ; CHECK-LABEL: fmaxnm_d_immzero_zero:
471 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
472 ; CHECK-NEXT: fmaxnm z0.d, p0/m, z0.d, #0.0
474 %elt = insertelement <vscale x 2 x double> undef, double 0.000000e+00, i32 0
475 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
476 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
477 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmaxnm.nxv2f64(<vscale x 2 x i1> %pg,
478 <vscale x 2 x double> %a_z,
479 <vscale x 2 x double> %splat)
480 ret <vscale x 2 x double> %out
483 define <vscale x 2 x double> @fmaxnm_d_immone(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
484 ; CHECK-LABEL: fmaxnm_d_immone:
486 ; CHECK-NEXT: fmaxnm z0.d, p0/m, z0.d, #1.0
488 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
489 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
490 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmaxnm.nxv2f64(<vscale x 2 x i1> %pg,
491 <vscale x 2 x double> %a,
492 <vscale x 2 x double> %splat)
493 ret <vscale x 2 x double> %out
496 define <vscale x 2 x double> @fmaxnm_d_immone_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
497 ; CHECK-LABEL: fmaxnm_d_immone_zero:
499 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
500 ; CHECK-NEXT: fmaxnm z0.d, p0/m, z0.d, #1.0
502 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
503 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
504 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
505 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmaxnm.nxv2f64(<vscale x 2 x i1> %pg,
506 <vscale x 2 x double> %a_z,
507 <vscale x 2 x double> %splat)
508 ret <vscale x 2 x double> %out
511 define <vscale x 8 x half> @fmin_h_immzero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
512 ; CHECK-LABEL: fmin_h_immzero:
514 ; CHECK-NEXT: fmin z0.h, p0/m, z0.h, #0.0
516 %elt = insertelement <vscale x 8 x half> undef, half 0.000000e+00, i32 0
517 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
518 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmin.nxv8f16(<vscale x 8 x i1> %pg,
519 <vscale x 8 x half> %a,
520 <vscale x 8 x half> %splat)
521 ret <vscale x 8 x half> %out
524 define <vscale x 8 x half> @fmin_h_immzero_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
525 ; CHECK-LABEL: fmin_h_immzero_zero:
527 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
528 ; CHECK-NEXT: fmin z0.h, p0/m, z0.h, #0.0
530 %elt = insertelement <vscale x 8 x half> undef, half 0.000000e+00, i32 0
531 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
532 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
533 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmin.nxv8f16(<vscale x 8 x i1> %pg,
534 <vscale x 8 x half> %a_z,
535 <vscale x 8 x half> %splat)
536 ret <vscale x 8 x half> %out
539 define <vscale x 8 x half> @fmin_h_immone(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
540 ; CHECK-LABEL: fmin_h_immone:
542 ; CHECK-NEXT: fmin z0.h, p0/m, z0.h, #1.0
544 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
545 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
546 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmin.nxv8f16(<vscale x 8 x i1> %pg,
547 <vscale x 8 x half> %a,
548 <vscale x 8 x half> %splat)
549 ret <vscale x 8 x half> %out
552 define <vscale x 8 x half> @fmin_h_immone_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
553 ; CHECK-LABEL: fmin_h_immone_zero:
555 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
556 ; CHECK-NEXT: fmin z0.h, p0/m, z0.h, #1.0
558 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
559 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
560 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
561 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmin.nxv8f16(<vscale x 8 x i1> %pg,
562 <vscale x 8 x half> %a_z,
563 <vscale x 8 x half> %splat)
564 ret <vscale x 8 x half> %out
567 define <vscale x 4 x float> @fmin_s_immzero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
568 ; CHECK-LABEL: fmin_s_immzero:
570 ; CHECK-NEXT: fmin z0.s, p0/m, z0.s, #0.0
572 %elt = insertelement <vscale x 4 x float> undef, float 0.000000e+00, i32 0
573 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
574 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmin.nxv4f32(<vscale x 4 x i1> %pg,
575 <vscale x 4 x float> %a,
576 <vscale x 4 x float> %splat)
577 ret <vscale x 4 x float> %out
580 define <vscale x 4 x float> @fmin_s_immzero_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
581 ; CHECK-LABEL: fmin_s_immzero_zero:
583 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
584 ; CHECK-NEXT: fmin z0.s, p0/m, z0.s, #0.0
586 %elt = insertelement <vscale x 4 x float> undef, float 0.000000e+00, i32 0
587 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
588 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
589 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmin.nxv4f32(<vscale x 4 x i1> %pg,
590 <vscale x 4 x float> %a_z,
591 <vscale x 4 x float> %splat)
592 ret <vscale x 4 x float> %out
595 define <vscale x 4 x float> @fmin_s_immone(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
596 ; CHECK-LABEL: fmin_s_immone:
598 ; CHECK-NEXT: fmin z0.s, p0/m, z0.s, #1.0
600 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
601 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
602 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmin.nxv4f32(<vscale x 4 x i1> %pg,
603 <vscale x 4 x float> %a,
604 <vscale x 4 x float> %splat)
605 ret <vscale x 4 x float> %out
608 define <vscale x 4 x float> @fmin_s_immone_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
609 ; CHECK-LABEL: fmin_s_immone_zero:
611 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
612 ; CHECK-NEXT: fmin z0.s, p0/m, z0.s, #1.0
614 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
615 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
616 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
617 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmin.nxv4f32(<vscale x 4 x i1> %pg,
618 <vscale x 4 x float> %a_z,
619 <vscale x 4 x float> %splat)
620 ret <vscale x 4 x float> %out
623 define <vscale x 2 x double> @fmin_d_immzero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
624 ; CHECK-LABEL: fmin_d_immzero:
626 ; CHECK-NEXT: fmin z0.d, p0/m, z0.d, #0.0
628 %elt = insertelement <vscale x 2 x double> undef, double 0.000000e+00, i32 0
629 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
630 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmin.nxv2f64(<vscale x 2 x i1> %pg,
631 <vscale x 2 x double> %a,
632 <vscale x 2 x double> %splat)
633 ret <vscale x 2 x double> %out
636 define <vscale x 2 x double> @fmin_d_immzero_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
637 ; CHECK-LABEL: fmin_d_immzero_zero:
639 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
640 ; CHECK-NEXT: fmin z0.d, p0/m, z0.d, #0.0
642 %elt = insertelement <vscale x 2 x double> undef, double 0.000000e+00, i32 0
643 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
644 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
645 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmin.nxv2f64(<vscale x 2 x i1> %pg,
646 <vscale x 2 x double> %a_z,
647 <vscale x 2 x double> %splat)
648 ret <vscale x 2 x double> %out
651 define <vscale x 2 x double> @fmin_d_immone(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
652 ; CHECK-LABEL: fmin_d_immone:
654 ; CHECK-NEXT: fmin z0.d, p0/m, z0.d, #1.0
656 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
657 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
658 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmin.nxv2f64(<vscale x 2 x i1> %pg,
659 <vscale x 2 x double> %a,
660 <vscale x 2 x double> %splat)
661 ret <vscale x 2 x double> %out
664 define <vscale x 2 x double> @fmin_d_immone_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
665 ; CHECK-LABEL: fmin_d_immone_zero:
667 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
668 ; CHECK-NEXT: fmin z0.d, p0/m, z0.d, #1.0
670 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
671 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
672 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
673 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmin.nxv2f64(<vscale x 2 x i1> %pg,
674 <vscale x 2 x double> %a_z,
675 <vscale x 2 x double> %splat)
676 ret <vscale x 2 x double> %out
679 define <vscale x 8 x half> @fminnm_h_immzero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
680 ; CHECK-LABEL: fminnm_h_immzero:
682 ; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, #0.0
684 %elt = insertelement <vscale x 8 x half> undef, half 0.000000e+00, i32 0
685 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
686 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fminnm.nxv8f16(<vscale x 8 x i1> %pg,
687 <vscale x 8 x half> %a,
688 <vscale x 8 x half> %splat)
689 ret <vscale x 8 x half> %out
692 define <vscale x 8 x half> @fminnm_h_immzero_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
693 ; CHECK-LABEL: fminnm_h_immzero_zero:
695 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
696 ; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, #0.0
698 %elt = insertelement <vscale x 8 x half> undef, half 0.000000e+00, i32 0
699 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
700 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
701 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fminnm.nxv8f16(<vscale x 8 x i1> %pg,
702 <vscale x 8 x half> %a_z,
703 <vscale x 8 x half> %splat)
704 ret <vscale x 8 x half> %out
707 define <vscale x 8 x half> @fminnm_h_immone(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
708 ; CHECK-LABEL: fminnm_h_immone:
710 ; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, #1.0
712 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
713 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
714 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fminnm.nxv8f16(<vscale x 8 x i1> %pg,
715 <vscale x 8 x half> %a,
716 <vscale x 8 x half> %splat)
717 ret <vscale x 8 x half> %out
720 define <vscale x 8 x half> @fminnm_h_immone_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
721 ; CHECK-LABEL: fminnm_h_immone_zero:
723 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
724 ; CHECK-NEXT: fminnm z0.h, p0/m, z0.h, #1.0
726 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
727 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
728 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
729 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fminnm.nxv8f16(<vscale x 8 x i1> %pg,
730 <vscale x 8 x half> %a_z,
731 <vscale x 8 x half> %splat)
732 ret <vscale x 8 x half> %out
735 define <vscale x 4 x float> @fminnm_s_immzero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
736 ; CHECK-LABEL: fminnm_s_immzero:
738 ; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, #0.0
740 %elt = insertelement <vscale x 4 x float> undef, float 0.000000e+00, i32 0
741 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
742 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fminnm.nxv4f32(<vscale x 4 x i1> %pg,
743 <vscale x 4 x float> %a,
744 <vscale x 4 x float> %splat)
745 ret <vscale x 4 x float> %out
748 define <vscale x 4 x float> @fminnm_s_immzero_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
749 ; CHECK-LABEL: fminnm_s_immzero_zero:
751 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
752 ; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, #0.0
754 %elt = insertelement <vscale x 4 x float> undef, float 0.000000e+00, i32 0
755 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
756 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
757 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fminnm.nxv4f32(<vscale x 4 x i1> %pg,
758 <vscale x 4 x float> %a_z,
759 <vscale x 4 x float> %splat)
760 ret <vscale x 4 x float> %out
763 define <vscale x 4 x float> @fminnm_s_immone(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
764 ; CHECK-LABEL: fminnm_s_immone:
766 ; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, #1.0
768 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
769 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
770 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fminnm.nxv4f32(<vscale x 4 x i1> %pg,
771 <vscale x 4 x float> %a,
772 <vscale x 4 x float> %splat)
773 ret <vscale x 4 x float> %out
776 define <vscale x 4 x float> @fminnm_s_immone_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
777 ; CHECK-LABEL: fminnm_s_immone_zero:
779 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
780 ; CHECK-NEXT: fminnm z0.s, p0/m, z0.s, #1.0
782 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
783 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
784 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
785 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fminnm.nxv4f32(<vscale x 4 x i1> %pg,
786 <vscale x 4 x float> %a_z,
787 <vscale x 4 x float> %splat)
788 ret <vscale x 4 x float> %out
791 define <vscale x 2 x double> @fminnm_d_immzero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
792 ; CHECK-LABEL: fminnm_d_immzero:
794 ; CHECK-NEXT: fminnm z0.d, p0/m, z0.d, #0.0
796 %elt = insertelement <vscale x 2 x double> undef, double 0.000000e+00, i32 0
797 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
798 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fminnm.nxv2f64(<vscale x 2 x i1> %pg,
799 <vscale x 2 x double> %a,
800 <vscale x 2 x double> %splat)
801 ret <vscale x 2 x double> %out
804 define <vscale x 2 x double> @fminnm_d_immzero_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
805 ; CHECK-LABEL: fminnm_d_immzero_zero:
807 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
808 ; CHECK-NEXT: fminnm z0.d, p0/m, z0.d, #0.0
810 %elt = insertelement <vscale x 2 x double> undef, double 0.000000e+00, i32 0
811 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
812 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
813 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fminnm.nxv2f64(<vscale x 2 x i1> %pg,
814 <vscale x 2 x double> %a_z,
815 <vscale x 2 x double> %splat)
816 ret <vscale x 2 x double> %out
819 define <vscale x 2 x double> @fminnm_d_immone(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
820 ; CHECK-LABEL: fminnm_d_immone:
822 ; CHECK-NEXT: fminnm z0.d, p0/m, z0.d, #1.0
824 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
825 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
826 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fminnm.nxv2f64(<vscale x 2 x i1> %pg,
827 <vscale x 2 x double> %a,
828 <vscale x 2 x double> %splat)
829 ret <vscale x 2 x double> %out
832 define <vscale x 2 x double> @fminnm_d_immone_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
833 ; CHECK-LABEL: fminnm_d_immone_zero:
835 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
836 ; CHECK-NEXT: fminnm z0.d, p0/m, z0.d, #1.0
838 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
839 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
840 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
841 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fminnm.nxv2f64(<vscale x 2 x i1> %pg,
842 <vscale x 2 x double> %a_z,
843 <vscale x 2 x double> %splat)
844 ret <vscale x 2 x double> %out
847 define <vscale x 8 x half> @fmul_h_immhalf(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
848 ; CHECK-LABEL: fmul_h_immhalf:
850 ; CHECK-NEXT: fmul z0.h, p0/m, z0.h, #0.5
852 %elt = insertelement <vscale x 8 x half> undef, half 0.500000e+00, i32 0
853 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
854 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmul.nxv8f16(<vscale x 8 x i1> %pg,
855 <vscale x 8 x half> %a,
856 <vscale x 8 x half> %splat)
857 ret <vscale x 8 x half> %out
860 define <vscale x 8 x half> @fmul_h_immhalf_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
861 ; CHECK-LABEL: fmul_h_immhalf_zero:
863 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
864 ; CHECK-NEXT: fmul z0.h, p0/m, z0.h, #0.5
866 %elt = insertelement <vscale x 8 x half> undef, half 0.500000e+00, i32 0
867 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
868 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
869 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmul.nxv8f16(<vscale x 8 x i1> %pg,
870 <vscale x 8 x half> %a_z,
871 <vscale x 8 x half> %splat)
872 ret <vscale x 8 x half> %out
875 define <vscale x 8 x half> @fmul_h_immtwo(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
876 ; CHECK-LABEL: fmul_h_immtwo:
878 ; CHECK-NEXT: fmul z0.h, p0/m, z0.h, #2.0
880 %elt = insertelement <vscale x 8 x half> undef, half 2.000000e+00, i32 0
881 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
882 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmul.nxv8f16(<vscale x 8 x i1> %pg,
883 <vscale x 8 x half> %a,
884 <vscale x 8 x half> %splat)
885 ret <vscale x 8 x half> %out
888 define <vscale x 8 x half> @fmul_h_immtwo_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
889 ; CHECK-LABEL: fmul_h_immtwo_zero:
891 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
892 ; CHECK-NEXT: fmul z0.h, p0/m, z0.h, #2.0
894 %elt = insertelement <vscale x 8 x half> undef, half 2.000000e+00, i32 0
895 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
896 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
897 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fmul.nxv8f16(<vscale x 8 x i1> %pg,
898 <vscale x 8 x half> %a_z,
899 <vscale x 8 x half> %splat)
900 ret <vscale x 8 x half> %out
903 define <vscale x 4 x float> @fmul_s_immhalf(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
904 ; CHECK-LABEL: fmul_s_immhalf:
906 ; CHECK-NEXT: fmul z0.s, p0/m, z0.s, #0.5
908 %elt = insertelement <vscale x 4 x float> undef, float 0.500000e+00, i32 0
909 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
910 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmul.nxv4f32(<vscale x 4 x i1> %pg,
911 <vscale x 4 x float> %a,
912 <vscale x 4 x float> %splat)
913 ret <vscale x 4 x float> %out
916 define <vscale x 4 x float> @fmul_s_immhalf_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
917 ; CHECK-LABEL: fmul_s_immhalf_zero:
919 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
920 ; CHECK-NEXT: fmul z0.s, p0/m, z0.s, #0.5
922 %elt = insertelement <vscale x 4 x float> undef, float 0.500000e+00, i32 0
923 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
924 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
925 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmul.nxv4f32(<vscale x 4 x i1> %pg,
926 <vscale x 4 x float> %a_z,
927 <vscale x 4 x float> %splat)
928 ret <vscale x 4 x float> %out
931 define <vscale x 4 x float> @fmul_s_immtwo(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
932 ; CHECK-LABEL: fmul_s_immtwo:
934 ; CHECK-NEXT: fmul z0.s, p0/m, z0.s, #2.0
936 %elt = insertelement <vscale x 4 x float> undef, float 2.000000e+00, i32 0
937 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
938 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmul.nxv4f32(<vscale x 4 x i1> %pg,
939 <vscale x 4 x float> %a,
940 <vscale x 4 x float> %splat)
941 ret <vscale x 4 x float> %out
944 define <vscale x 4 x float> @fmul_s_immtwo_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
945 ; CHECK-LABEL: fmul_s_immtwo_zero:
947 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
948 ; CHECK-NEXT: fmul z0.s, p0/m, z0.s, #2.0
950 %elt = insertelement <vscale x 4 x float> undef, float 2.000000e+00, i32 0
951 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
952 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
953 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fmul.nxv4f32(<vscale x 4 x i1> %pg,
954 <vscale x 4 x float> %a_z,
955 <vscale x 4 x float> %splat)
956 ret <vscale x 4 x float> %out
959 define <vscale x 2 x double> @fmul_d_immhalf(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
960 ; CHECK-LABEL: fmul_d_immhalf:
962 ; CHECK-NEXT: fmul z0.d, p0/m, z0.d, #0.5
964 %elt = insertelement <vscale x 2 x double> undef, double 0.500000e+00, i32 0
965 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
966 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmul.nxv2f64(<vscale x 2 x i1> %pg,
967 <vscale x 2 x double> %a,
968 <vscale x 2 x double> %splat)
969 ret <vscale x 2 x double> %out
972 define <vscale x 2 x double> @fmul_d_immhalf_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
973 ; CHECK-LABEL: fmul_d_immhalf_zero:
975 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
976 ; CHECK-NEXT: fmul z0.d, p0/m, z0.d, #0.5
978 %elt = insertelement <vscale x 2 x double> undef, double 0.500000e+00, i32 0
979 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
980 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
981 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmul.nxv2f64(<vscale x 2 x i1> %pg,
982 <vscale x 2 x double> %a_z,
983 <vscale x 2 x double> %splat)
984 ret <vscale x 2 x double> %out
987 define <vscale x 2 x double> @fmul_d_immtwo(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
988 ; CHECK-LABEL: fmul_d_immtwo:
990 ; CHECK-NEXT: fmul z0.d, p0/m, z0.d, #2.0
992 %elt = insertelement <vscale x 2 x double> undef, double 2.000000e+00, i32 0
993 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
994 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmul.nxv2f64(<vscale x 2 x i1> %pg,
995 <vscale x 2 x double> %a,
996 <vscale x 2 x double> %splat)
997 ret <vscale x 2 x double> %out
1000 define <vscale x 2 x double> @fmul_d_immtwo_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
1001 ; CHECK-LABEL: fmul_d_immtwo_zero:
1003 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
1004 ; CHECK-NEXT: fmul z0.d, p0/m, z0.d, #2.0
1006 %elt = insertelement <vscale x 2 x double> undef, double 2.000000e+00, i32 0
1007 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
1008 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
1009 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fmul.nxv2f64(<vscale x 2 x i1> %pg,
1010 <vscale x 2 x double> %a_z,
1011 <vscale x 2 x double> %splat)
1012 ret <vscale x 2 x double> %out
1015 define <vscale x 8 x half> @fsub_h_immhalf(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
1016 ; CHECK-LABEL: fsub_h_immhalf:
1018 ; CHECK-NEXT: fsub z0.h, p0/m, z0.h, #0.5
1020 %elt = insertelement <vscale x 8 x half> undef, half 0.500000e+00, i32 0
1021 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
1022 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fsub.nxv8f16(<vscale x 8 x i1> %pg,
1023 <vscale x 8 x half> %a,
1024 <vscale x 8 x half> %splat)
1025 ret <vscale x 8 x half> %out
1028 define <vscale x 8 x half> @fsub_h_immhalf_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
1029 ; CHECK-LABEL: fsub_h_immhalf_zero:
1031 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
1032 ; CHECK-NEXT: fsub z0.h, p0/m, z0.h, #0.5
1034 %elt = insertelement <vscale x 8 x half> undef, half 0.500000e+00, i32 0
1035 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
1036 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
1037 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fsub.nxv8f16(<vscale x 8 x i1> %pg,
1038 <vscale x 8 x half> %a_z,
1039 <vscale x 8 x half> %splat)
1040 ret <vscale x 8 x half> %out
1043 define <vscale x 8 x half> @fsub_h_immone(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #0 {
1044 ; CHECK-LABEL: fsub_h_immone:
1046 ; CHECK-NEXT: fsub z0.h, p0/m, z0.h, #1.0
1048 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
1049 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
1050 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fsub.nxv8f16(<vscale x 8 x i1> %pg,
1051 <vscale x 8 x half> %a,
1052 <vscale x 8 x half> %splat)
1053 ret <vscale x 8 x half> %out
1056 define <vscale x 8 x half> @fsub_h_immone_zero(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
1057 ; CHECK-LABEL: fsub_h_immone_zero:
1059 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
1060 ; CHECK-NEXT: fsub z0.h, p0/m, z0.h, #1.0
1062 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
1063 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
1064 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
1065 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fsub.nxv8f16(<vscale x 8 x i1> %pg,
1066 <vscale x 8 x half> %a_z,
1067 <vscale x 8 x half> %splat)
1068 ret <vscale x 8 x half> %out
1071 define <vscale x 4 x float> @fsub_s_immhalf(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
1072 ; CHECK-LABEL: fsub_s_immhalf:
1074 ; CHECK-NEXT: fsub z0.s, p0/m, z0.s, #0.5
1076 %elt = insertelement <vscale x 4 x float> undef, float 0.500000e+00, i32 0
1077 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
1078 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fsub.nxv4f32(<vscale x 4 x i1> %pg,
1079 <vscale x 4 x float> %a,
1080 <vscale x 4 x float> %splat)
1081 ret <vscale x 4 x float> %out
1084 define <vscale x 4 x float> @fsub_s_immhalf_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
1085 ; CHECK-LABEL: fsub_s_immhalf_zero:
1087 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
1088 ; CHECK-NEXT: fsub z0.s, p0/m, z0.s, #0.5
1090 %elt = insertelement <vscale x 4 x float> undef, float 0.500000e+00, i32 0
1091 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
1092 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
1093 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fsub.nxv4f32(<vscale x 4 x i1> %pg,
1094 <vscale x 4 x float> %a_z,
1095 <vscale x 4 x float> %splat)
1096 ret <vscale x 4 x float> %out
1099 define <vscale x 4 x float> @fsub_s_immone(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #0 {
1100 ; CHECK-LABEL: fsub_s_immone:
1102 ; CHECK-NEXT: fsub z0.s, p0/m, z0.s, #1.0
1104 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
1105 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
1106 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fsub.nxv4f32(<vscale x 4 x i1> %pg,
1107 <vscale x 4 x float> %a,
1108 <vscale x 4 x float> %splat)
1109 ret <vscale x 4 x float> %out
1112 define <vscale x 4 x float> @fsub_s_immone_zero(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
1113 ; CHECK-LABEL: fsub_s_immone_zero:
1115 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
1116 ; CHECK-NEXT: fsub z0.s, p0/m, z0.s, #1.0
1118 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
1119 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
1120 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
1121 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fsub.nxv4f32(<vscale x 4 x i1> %pg,
1122 <vscale x 4 x float> %a_z,
1123 <vscale x 4 x float> %splat)
1124 ret <vscale x 4 x float> %out
1127 define <vscale x 2 x double> @fsub_d_immhalf(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
1128 ; CHECK-LABEL: fsub_d_immhalf:
1130 ; CHECK-NEXT: fsub z0.d, p0/m, z0.d, #0.5
1132 %elt = insertelement <vscale x 2 x double> undef, double 0.500000e+00, i32 0
1133 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
1134 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fsub.nxv2f64(<vscale x 2 x i1> %pg,
1135 <vscale x 2 x double> %a,
1136 <vscale x 2 x double> %splat)
1137 ret <vscale x 2 x double> %out
1140 define <vscale x 2 x double> @fsub_d_immhalf_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
1141 ; CHECK-LABEL: fsub_d_immhalf_zero:
1143 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
1144 ; CHECK-NEXT: fsub z0.d, p0/m, z0.d, #0.5
1146 %elt = insertelement <vscale x 2 x double> undef, double 0.500000e+00, i32 0
1147 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
1148 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
1149 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fsub.nxv2f64(<vscale x 2 x i1> %pg,
1150 <vscale x 2 x double> %a_z,
1151 <vscale x 2 x double> %splat)
1152 ret <vscale x 2 x double> %out
1155 define <vscale x 2 x double> @fsub_d_immone(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #0 {
1156 ; CHECK-LABEL: fsub_d_immone:
1158 ; CHECK-NEXT: fsub z0.d, p0/m, z0.d, #1.0
1160 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
1161 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
1162 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fsub.nxv2f64(<vscale x 2 x i1> %pg,
1163 <vscale x 2 x double> %a,
1164 <vscale x 2 x double> %splat)
1165 ret <vscale x 2 x double> %out
1168 define <vscale x 2 x double> @fsub_d_immone_zero(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
1169 ; CHECK-LABEL: fsub_d_immone_zero:
1171 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
1172 ; CHECK-NEXT: fsub z0.d, p0/m, z0.d, #1.0
1174 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
1175 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
1176 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
1177 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fsub.nxv2f64(<vscale x 2 x i1> %pg,
1178 <vscale x 2 x double> %a_z,
1179 <vscale x 2 x double> %splat)
1180 ret <vscale x 2 x double> %out
1183 define <vscale x 8 x half> @fsubr_h_immhalf(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
1184 ; CHECK-LABEL: fsubr_h_immhalf:
1186 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
1187 ; CHECK-NEXT: fsubr z0.h, p0/m, z0.h, #0.5
1189 %elt = insertelement <vscale x 8 x half> undef, half 0.500000e+00, i32 0
1190 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
1191 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
1192 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fsubr.nxv8f16(<vscale x 8 x i1> %pg,
1193 <vscale x 8 x half> %a_z,
1194 <vscale x 8 x half> %splat)
1195 ret <vscale x 8 x half> %out
1198 define <vscale x 8 x half> @fsubr_h_immone(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) #1 {
1199 ; CHECK-LABEL: fsubr_h_immone:
1201 ; CHECK-NEXT: movprfx z0.h, p0/z, z0.h
1202 ; CHECK-NEXT: fsubr z0.h, p0/m, z0.h, #1.0
1204 %elt = insertelement <vscale x 8 x half> undef, half 1.000000e+00, i32 0
1205 %splat = shufflevector <vscale x 8 x half> %elt, <vscale x 8 x half> undef, <vscale x 8 x i32> zeroinitializer
1206 %a_z = select <vscale x 8 x i1> %pg, <vscale x 8 x half> %a, <vscale x 8 x half> zeroinitializer
1207 %out = call <vscale x 8 x half> @llvm.aarch64.sve.fsubr.nxv8f16(<vscale x 8 x i1> %pg,
1208 <vscale x 8 x half> %a_z,
1209 <vscale x 8 x half> %splat)
1210 ret <vscale x 8 x half> %out
1213 define <vscale x 4 x float> @fsubr_s_immhalf(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
1214 ; CHECK-LABEL: fsubr_s_immhalf:
1216 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
1217 ; CHECK-NEXT: fsubr z0.s, p0/m, z0.s, #0.5
1219 %elt = insertelement <vscale x 4 x float> undef, float 0.500000e+00, i32 0
1220 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
1221 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
1222 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fsubr.nxv4f32(<vscale x 4 x i1> %pg,
1223 <vscale x 4 x float> %a_z,
1224 <vscale x 4 x float> %splat)
1225 ret <vscale x 4 x float> %out
1228 define <vscale x 4 x float> @fsubr_s_immone(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) #1 {
1229 ; CHECK-LABEL: fsubr_s_immone:
1231 ; CHECK-NEXT: movprfx z0.s, p0/z, z0.s
1232 ; CHECK-NEXT: fsubr z0.s, p0/m, z0.s, #1.0
1234 %elt = insertelement <vscale x 4 x float> undef, float 1.000000e+00, i32 0
1235 %splat = shufflevector <vscale x 4 x float> %elt, <vscale x 4 x float> undef, <vscale x 4 x i32> zeroinitializer
1236 %a_z = select <vscale x 4 x i1> %pg, <vscale x 4 x float> %a, <vscale x 4 x float> zeroinitializer
1237 %out = call <vscale x 4 x float> @llvm.aarch64.sve.fsubr.nxv4f32(<vscale x 4 x i1> %pg,
1238 <vscale x 4 x float> %a_z,
1239 <vscale x 4 x float> %splat)
1240 ret <vscale x 4 x float> %out
1243 define <vscale x 2 x double> @fsubr_d_immhalf(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
1244 ; CHECK-LABEL: fsubr_d_immhalf:
1246 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
1247 ; CHECK-NEXT: fsubr z0.d, p0/m, z0.d, #0.5
1249 %elt = insertelement <vscale x 2 x double> undef, double 0.500000e+00, i32 0
1250 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
1251 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
1252 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fsubr.nxv2f64(<vscale x 2 x i1> %pg,
1253 <vscale x 2 x double> %a_z,
1254 <vscale x 2 x double> %splat)
1255 ret <vscale x 2 x double> %out
1258 define <vscale x 2 x double> @fsubr_d_immone(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) #1 {
1259 ; CHECK-LABEL: fsubr_d_immone:
1261 ; CHECK-NEXT: movprfx z0.d, p0/z, z0.d
1262 ; CHECK-NEXT: fsubr z0.d, p0/m, z0.d, #1.0
1264 %elt = insertelement <vscale x 2 x double> undef, double 1.000000e+00, i32 0
1265 %splat = shufflevector <vscale x 2 x double> %elt, <vscale x 2 x double> undef, <vscale x 2 x i32> zeroinitializer
1266 %a_z = select <vscale x 2 x i1> %pg, <vscale x 2 x double> %a, <vscale x 2 x double> zeroinitializer
1267 %out = call <vscale x 2 x double> @llvm.aarch64.sve.fsubr.nxv2f64(<vscale x 2 x i1> %pg,
1268 <vscale x 2 x double> %a_z,
1269 <vscale x 2 x double> %splat)
1270 ret <vscale x 2 x double> %out
1274 ;; Arithmetic intrinsic declarations
1276 declare <vscale x 8 x half> @llvm.aarch64.sve.fadd.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>)
1277 declare <vscale x 4 x float> @llvm.aarch64.sve.fadd.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>)
1278 declare <vscale x 2 x double> @llvm.aarch64.sve.fadd.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>)
1280 declare <vscale x 8 x half> @llvm.aarch64.sve.fmax.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>)
1281 declare <vscale x 4 x float> @llvm.aarch64.sve.fmax.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>)
1282 declare <vscale x 2 x double> @llvm.aarch64.sve.fmax.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>)
1284 declare <vscale x 8 x half> @llvm.aarch64.sve.fmaxnm.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>)
1285 declare <vscale x 4 x float> @llvm.aarch64.sve.fmaxnm.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>)
1286 declare <vscale x 2 x double> @llvm.aarch64.sve.fmaxnm.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>)
1288 declare <vscale x 8 x half> @llvm.aarch64.sve.fmin.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>)
1289 declare <vscale x 4 x float> @llvm.aarch64.sve.fmin.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>)
1290 declare <vscale x 2 x double> @llvm.aarch64.sve.fmin.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>)
1292 declare <vscale x 8 x half> @llvm.aarch64.sve.fminnm.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>)
1293 declare <vscale x 4 x float> @llvm.aarch64.sve.fminnm.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>)
1294 declare <vscale x 2 x double> @llvm.aarch64.sve.fminnm.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>)
1296 declare <vscale x 8 x half> @llvm.aarch64.sve.fmul.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>)
1297 declare <vscale x 4 x float> @llvm.aarch64.sve.fmul.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>)
1298 declare <vscale x 2 x double> @llvm.aarch64.sve.fmul.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>)
1300 declare <vscale x 8 x half> @llvm.aarch64.sve.fsub.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>)
1301 declare <vscale x 4 x float> @llvm.aarch64.sve.fsub.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>)
1302 declare <vscale x 2 x double> @llvm.aarch64.sve.fsub.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>)
1304 declare <vscale x 8 x half> @llvm.aarch64.sve.fsubr.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>)
1305 declare <vscale x 4 x float> @llvm.aarch64.sve.fsubr.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>)
1306 declare <vscale x 2 x double> @llvm.aarch64.sve.fsubr.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>)
1308 attributes #0 = { "target-features"="+sve" }
1309 attributes #1 = { "target-features"="+sve,+use-experimental-zeroing-pseudos" }