1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s
8 define half @fadda_f16(<vscale x 8 x i1> %pg, half %init, <vscale x 8 x half> %a) {
9 ; CHECK-LABEL: fadda_f16:
11 ; CHECK-NEXT: // kill: def $h0 killed $h0 def $z0
12 ; CHECK-NEXT: fadda h0, p0, h0, z1.h
13 ; CHECK-NEXT: // kill: def $h0 killed $h0 killed $z0
15 %res = call half @llvm.aarch64.sve.fadda.nxv8f16(<vscale x 8 x i1> %pg,
17 <vscale x 8 x half> %a)
21 define float @fadda_f32(<vscale x 4 x i1> %pg, float %init, <vscale x 4 x float> %a) {
22 ; CHECK-LABEL: fadda_f32:
24 ; CHECK-NEXT: // kill: def $s0 killed $s0 def $z0
25 ; CHECK-NEXT: fadda s0, p0, s0, z1.s
26 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $z0
28 %res = call float @llvm.aarch64.sve.fadda.nxv4f32(<vscale x 4 x i1> %pg,
30 <vscale x 4 x float> %a)
34 define double @fadda_f64(<vscale x 2 x i1> %pg, double %init, <vscale x 2 x double> %a) {
35 ; CHECK-LABEL: fadda_f64:
37 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $z0
38 ; CHECK-NEXT: fadda d0, p0, d0, z1.d
39 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
41 %res = call double @llvm.aarch64.sve.fadda.nxv2f64(<vscale x 2 x i1> %pg,
43 <vscale x 2 x double> %a)
51 define half @faddv_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) {
52 ; CHECK-LABEL: faddv_f16:
54 ; CHECK-NEXT: faddv h0, p0, z0.h
55 ; CHECK-NEXT: // kill: def $h0 killed $h0 killed $z0
57 %res = call half @llvm.aarch64.sve.faddv.nxv8f16(<vscale x 8 x i1> %pg,
58 <vscale x 8 x half> %a)
62 define float @faddv_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) {
63 ; CHECK-LABEL: faddv_f32:
65 ; CHECK-NEXT: faddv s0, p0, z0.s
66 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $z0
68 %res = call float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1> %pg,
69 <vscale x 4 x float> %a)
73 define double @faddv_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) {
74 ; CHECK-LABEL: faddv_f64:
76 ; CHECK-NEXT: faddv d0, p0, z0.d
77 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
79 %res = call double @llvm.aarch64.sve.faddv.nxv2f64(<vscale x 2 x i1> %pg,
80 <vscale x 2 x double> %a)
88 define half @fmaxnmv_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) {
89 ; CHECK-LABEL: fmaxnmv_f16:
91 ; CHECK-NEXT: fmaxnmv h0, p0, z0.h
92 ; CHECK-NEXT: // kill: def $h0 killed $h0 killed $z0
94 %res = call half @llvm.aarch64.sve.fmaxnmv.nxv8f16(<vscale x 8 x i1> %pg,
95 <vscale x 8 x half> %a)
99 define float @fmaxnmv_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) {
100 ; CHECK-LABEL: fmaxnmv_f32:
102 ; CHECK-NEXT: fmaxnmv s0, p0, z0.s
103 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $z0
105 %res = call float @llvm.aarch64.sve.fmaxnmv.nxv4f32(<vscale x 4 x i1> %pg,
106 <vscale x 4 x float> %a)
110 define double @fmaxnmv_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) {
111 ; CHECK-LABEL: fmaxnmv_f64:
113 ; CHECK-NEXT: fmaxnmv d0, p0, z0.d
114 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
116 %res = call double @llvm.aarch64.sve.fmaxnmv.nxv2f64(<vscale x 2 x i1> %pg,
117 <vscale x 2 x double> %a)
125 define half @fmaxv_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) {
126 ; CHECK-LABEL: fmaxv_f16:
128 ; CHECK-NEXT: fmaxv h0, p0, z0.h
129 ; CHECK-NEXT: // kill: def $h0 killed $h0 killed $z0
131 %res = call half @llvm.aarch64.sve.fmaxv.nxv8f16(<vscale x 8 x i1> %pg,
132 <vscale x 8 x half> %a)
136 define float @fmaxv_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) {
137 ; CHECK-LABEL: fmaxv_f32:
139 ; CHECK-NEXT: fmaxv s0, p0, z0.s
140 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $z0
142 %res = call float @llvm.aarch64.sve.fmaxv.nxv4f32(<vscale x 4 x i1> %pg,
143 <vscale x 4 x float> %a)
147 define double @fmaxv_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) {
148 ; CHECK-LABEL: fmaxv_f64:
150 ; CHECK-NEXT: fmaxv d0, p0, z0.d
151 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
153 %res = call double @llvm.aarch64.sve.fmaxv.nxv2f64(<vscale x 2 x i1> %pg,
154 <vscale x 2 x double> %a)
162 define half @fminnmv_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) {
163 ; CHECK-LABEL: fminnmv_f16:
165 ; CHECK-NEXT: fminnmv h0, p0, z0.h
166 ; CHECK-NEXT: // kill: def $h0 killed $h0 killed $z0
168 %res = call half @llvm.aarch64.sve.fminnmv.nxv8f16(<vscale x 8 x i1> %pg,
169 <vscale x 8 x half> %a)
173 define float @fminnmv_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) {
174 ; CHECK-LABEL: fminnmv_f32:
176 ; CHECK-NEXT: fminnmv s0, p0, z0.s
177 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $z0
179 %res = call float @llvm.aarch64.sve.fminnmv.nxv4f32(<vscale x 4 x i1> %pg,
180 <vscale x 4 x float> %a)
184 define double @fminnmv_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) {
185 ; CHECK-LABEL: fminnmv_f64:
187 ; CHECK-NEXT: fminnmv d0, p0, z0.d
188 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
190 %res = call double @llvm.aarch64.sve.fminnmv.nxv2f64(<vscale x 2 x i1> %pg,
191 <vscale x 2 x double> %a)
199 define half @fminv_f16(<vscale x 8 x i1> %pg, <vscale x 8 x half> %a) {
200 ; CHECK-LABEL: fminv_f16:
202 ; CHECK-NEXT: fminv h0, p0, z0.h
203 ; CHECK-NEXT: // kill: def $h0 killed $h0 killed $z0
205 %res = call half @llvm.aarch64.sve.fminv.nxv8f16(<vscale x 8 x i1> %pg,
206 <vscale x 8 x half> %a)
210 define float @fminv_f32(<vscale x 4 x i1> %pg, <vscale x 4 x float> %a) {
211 ; CHECK-LABEL: fminv_f32:
213 ; CHECK-NEXT: fminv s0, p0, z0.s
214 ; CHECK-NEXT: // kill: def $s0 killed $s0 killed $z0
216 %res = call float @llvm.aarch64.sve.fminv.nxv4f32(<vscale x 4 x i1> %pg,
217 <vscale x 4 x float> %a)
221 define double @fminv_f64(<vscale x 2 x i1> %pg, <vscale x 2 x double> %a) {
222 ; CHECK-LABEL: fminv_f64:
224 ; CHECK-NEXT: fminv d0, p0, z0.d
225 ; CHECK-NEXT: // kill: def $d0 killed $d0 killed $z0
227 %res = call double @llvm.aarch64.sve.fminv.nxv2f64(<vscale x 2 x i1> %pg,
228 <vscale x 2 x double> %a)
232 declare half @llvm.aarch64.sve.fadda.nxv8f16(<vscale x 8 x i1>, half, <vscale x 8 x half>)
233 declare float @llvm.aarch64.sve.fadda.nxv4f32(<vscale x 4 x i1>, float, <vscale x 4 x float>)
234 declare double @llvm.aarch64.sve.fadda.nxv2f64(<vscale x 2 x i1>, double, <vscale x 2 x double>)
236 declare half @llvm.aarch64.sve.faddv.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>)
237 declare float @llvm.aarch64.sve.faddv.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>)
238 declare double @llvm.aarch64.sve.faddv.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>)
240 declare half @llvm.aarch64.sve.fmaxnmv.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>)
241 declare float @llvm.aarch64.sve.fmaxnmv.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>)
242 declare double @llvm.aarch64.sve.fmaxnmv.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>)
244 declare half @llvm.aarch64.sve.fmaxv.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>)
245 declare float @llvm.aarch64.sve.fmaxv.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>)
246 declare double @llvm.aarch64.sve.fmaxv.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>)
248 declare half @llvm.aarch64.sve.fminnmv.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>)
249 declare float @llvm.aarch64.sve.fminnmv.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>)
250 declare double @llvm.aarch64.sve.fminnmv.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>)
252 declare half @llvm.aarch64.sve.fminv.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>)
253 declare float @llvm.aarch64.sve.fminv.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>)
254 declare double @llvm.aarch64.sve.fminv.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>)