1 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple -mattr=-fullfp16 \
2 ; RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NOFP16
3 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple -mattr=+fullfp16 \
4 ; RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-FP16
6 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple -mattr=-fullfp16 \
7 ; RUN: -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel* \
8 ; RUN: 2>&1 | FileCheck %s --check-prefixes=GISEL,GISEL-NOFP16,FALLBACK
9 ; RUN: llc < %s -mtriple=arm64-eabi -aarch64-neon-syntax=apple -mattr=+fullfp16 \
10 ; RUN: -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel* \
11 ; RUN: 2>&1 | FileCheck %s --check-prefixes=GISEL,GISEL-FP16,FALLBACK
15 %v4f16 = type <4 x half>
17 ; FALLBACK-NOT: remark{{.*}}test_v4f16.sqrt
18 define %v4f16 @test_v4f16.sqrt(%v4f16 %a) {
19 ; CHECK-LABEL: test_v4f16.sqrt:
20 ; CHECK-NOFP16-COUNT-4: fsqrt s{{[0-9]+}}, s{{[0-9]+}}
21 ; CHECK-FP16-NOT: fcvt
22 ; CHECK-FP16: fsqrt.4h
23 ; CHECK-FP16-NEXT: ret
24 ; GISEL-LABEL: test_v4f16.sqrt:
25 ; GISEL-NOFP16-COUNT-4: fsqrt s{{[0-9]+}}, s{{[0-9]+}}
26 ; GISEL-FP16-NOT: fcvt
27 ; GISEL-FP16: fsqrt.4h
28 ; GISEL-FP16-NEXT: ret
29 %1 = call %v4f16 @llvm.sqrt.v4f16(%v4f16 %a)
32 define %v4f16 @test_v4f16.powi(%v4f16 %a, i32 %b) {
33 ; This operation is expanded, whether with or without +fullfp16.
34 ; CHECK-LABEL: test_v4f16.powi:
35 ; CHECK-COUNT-4: bl __powi
36 %1 = call %v4f16 @llvm.powi.v4f16(%v4f16 %a, i32 %b)
40 ; FALLBACK-NOT: remark{{.*}}test_v4f16.sin
41 define %v4f16 @test_v4f16.sin(%v4f16 %a) {
42 ; This operation is expanded, whether with or without +fullfp16.
43 ; CHECK-LABEL: test_v4f16.sin:
44 ; CHECK-COUNT-4: bl sinf
45 ; GISEL-LABEL: test_v4f16.sin:
46 ; GISEL-COUNT-4: bl sinf
47 %1 = call %v4f16 @llvm.sin.v4f16(%v4f16 %a)
51 ; FALLBACK-NOT: remark{{.*}}test_v4f16.cos
52 define %v4f16 @test_v4f16.cos(%v4f16 %a) {
53 ; This operation is expanded, whether with or without +fullfp16.
54 ; CHECK-LABEL: test_v4f16.cos:
55 ; CHECK-COUNT-4: bl cosf
56 ; GISEL-LABEL: test_v4f16.cos:
57 ; GISEL-COUNT-4: bl cosf
58 %1 = call %v4f16 @llvm.cos.v4f16(%v4f16 %a)
61 define %v4f16 @test_v4f16.pow(%v4f16 %a, %v4f16 %b) {
62 ; This operation is expanded, whether with or without +fullfp16.
63 ; CHECK-LABEL: test_v4f16.pow:
64 ; CHECK-COUNT-4: bl pow
65 %1 = call %v4f16 @llvm.pow.v4f16(%v4f16 %a, %v4f16 %b)
69 ; FALLBACK-NOT: remark{{.*}}test_v4f16.exp
70 define %v4f16 @test_v4f16.exp(%v4f16 %a) {
71 ; This operation is expanded, whether with or without +fullfp16.
72 ; CHECK-LABEL: test_v4f16.exp:
73 ; CHECK-COUNT-4: bl exp
74 ; GISEL-LABEL: test_v4f16.exp:
75 ; GISEL-COUNT-4: bl exp
76 %1 = call %v4f16 @llvm.exp.v4f16(%v4f16 %a)
79 define %v4f16 @test_v4f16.exp2(%v4f16 %a) {
80 ; This operation is expanded, whether with or without +fullfp16.
81 ; CHECK-LABEL: test_v4f16.exp2:
82 ; CHECK-COUNT-4: bl exp2
83 %1 = call %v4f16 @llvm.exp2.v4f16(%v4f16 %a)
87 ; FALLBACK-NOT: remark{{.*}}test_v4f16.log
88 define %v4f16 @test_v4f16.log(%v4f16 %a) {
89 ; This operation is expanded, whether with or without +fullfp16.
90 ; CHECK-LABEL: test_v4f16.log:
91 ; CHECK-COUNT-4: bl log
92 ; GISEL-LABEL: test_v4f16.log:
93 ; GISEL-COUNT-4: bl log
94 %1 = call %v4f16 @llvm.log.v4f16(%v4f16 %a)
98 ; FALLBACK-NOT: remark{{.*}}test_v4f16.log10
99 define %v4f16 @test_v4f16.log10(%v4f16 %a) {
100 ; This operation is expanded, whether with or without +fullfp16.
101 ; CHECK-LABEL: test_v4f16.log10:
102 ; CHECK-COUNT-4: bl log10
103 ; GISEL-LABEL: test_v4f16.log10:
104 ; GISEL-COUNT-4: bl log10
105 %1 = call %v4f16 @llvm.log10.v4f16(%v4f16 %a)
109 ; FALLBACK-NOT: remark{{.*}}test_v4f16.log2
110 define %v4f16 @test_v4f16.log2(%v4f16 %a) {
111 ; This operation is expanded, whether with or without +fullfp16.
112 ; CHECK-LABEL: test_v4f16.log2:
113 ; CHECK-COUNT-4: bl log2
114 ; GISEL-LABEL: test_v4f16.log2:
115 ; GISEL-COUNT-4: bl log2
116 %1 = call %v4f16 @llvm.log2.v4f16(%v4f16 %a)
119 define %v4f16 @test_v4f16.fma(%v4f16 %a, %v4f16 %b, %v4f16 %c) {
120 ; CHECK-LABEL: test_v4f16.fma:
121 ; CHECK-NOFP16-COUNT-4: fmadd s{{[0-9]+}}, s{{[0-9]+}}, s{{[0-9]+}}, s{{[0-9]+}}
122 ; CHECK-FP16-NOT: fcvt
123 ; CHECK-FP16: fmla.4h
124 %1 = call %v4f16 @llvm.fma.v4f16(%v4f16 %a, %v4f16 %b, %v4f16 %c)
128 ; FALLBACK-NOT: remark{{.*}}test_v4f16.fabs
129 define %v4f16 @test_v4f16.fabs(%v4f16 %a) {
130 ; CHECK-LABEL: test_v4f16.fabs:
131 ; CHECK-NOFP16-COUNT-4: fabs s{{[0-9]+}}, s{{[0-9]+}}
132 ; CHECK-FP16-NOT: fcvt
133 ; CHECK-FP16: fabs.4h
134 ; CHECK-FP16-NEXT: ret
136 ; GISEL-LABEL: test_v4f16.fabs:
137 ; GISEL-NOFP16-COUNT-4: fabs s{{[0-9]+}}, s{{[0-9]+}}
138 ; GISEL-FP16-NOT: fcvt
139 ; GISEL-FP16: fabs.4h
140 ; GISEL-FP16-NEXT: ret
141 %1 = call %v4f16 @llvm.fabs.v4f16(%v4f16 %a)
145 ; FALLBACK-NOT: remark{{.*}}test_v4f16.floor
146 define %v4f16 @test_v4f16.floor(%v4f16 %a) {
147 ; CHECK-LABEL: test_v4f16.floor:
148 ; CHECK-NOFP16-COUNT-4: frintm s{{[0-9]+}}, s{{[0-9]+}}
149 ; CHECK-FP16-NOT: fcvt
150 ; CHECK-FP16: frintm.4h
151 ; CHECK-FP16-NEXT: ret
153 ; GISEL-LABEL: test_v4f16.floor:
154 ; GISEL-NOFP16-COUNT-4: frintm s{{[0-9]+}}, s{{[0-9]+}}
155 ; GISEL-FP16-NOT: fcvt
156 ; GISEL-FP16: frintm.4h
157 ; GISEL-FP16-NEXT: ret
158 %1 = call %v4f16 @llvm.floor.v4f16(%v4f16 %a)
161 define %v4f16 @test_v4f16.ceil(%v4f16 %a) {
162 ; CHECK-LABEL: test_v4f16.ceil:
163 ; CHECK-NOFP16-COUNT-4: frintp s{{[0-9]+}}, s{{[0-9]+}}
164 ; CHECK-FP16-NOT: fcvt
165 ; CHECK-FP16: frintp.4h
166 ; CHECK-FP16-NEXT: ret
167 ; FALLBACK-NOT: remark{{.*}}test_v4f16.ceil:
168 ; GISEL-LABEL: test_v4f16.ceil:
169 ; GISEL-NOFP16-COUNT-4: frintp s{{[0-9]+}}, s{{[0-9]+}}
170 ; GISEL-FP16-NOT: fcvt
171 ; GISEL-FP16: frintp.4h
172 ; GISEL-FP16-NEXT: ret
173 %1 = call %v4f16 @llvm.ceil.v4f16(%v4f16 %a)
176 define %v4f16 @test_v4f16.trunc(%v4f16 %a) {
177 ; CHECK-LABEL: test_v4f16.trunc:
178 ; CHECK-NOFP16-COUNT-4: frintz s{{[0-9]+}}, s{{[0-9]+}}
179 ; CHECK-FP16-NOT: fcvt
180 ; CHECK-FP16: frintz.4h
181 ; CHECK-FP16-NEXT: ret
182 %1 = call %v4f16 @llvm.trunc.v4f16(%v4f16 %a)
185 define %v4f16 @test_v4f16.rint(%v4f16 %a) {
186 ; CHECK-LABEL: test_v4f16.rint:
187 ; CHECK-NOFP16-COUNT-4: frintx s{{[0-9]+}}, s{{[0-9]+}}
188 ; CHECK-FP16-NOT: fcvt
189 ; CHECK-FP16: frintx.4h
190 ; CHECK-FP16-NEXT: ret
191 %1 = call %v4f16 @llvm.rint.v4f16(%v4f16 %a)
194 define %v4f16 @test_v4f16.nearbyint(%v4f16 %a) {
195 ; CHECK-LABEL: test_v4f16.nearbyint:
196 ; CHECK-NOFP16-COUNT-4: frinti s{{[0-9]+}}, s{{[0-9]+}}
197 ; CHECK-FP16-NOT: fcvt
198 ; CHECK-FP16: frinti.4h
199 ; CHECK-FP16-NEXT: ret
200 %1 = call %v4f16 @llvm.nearbyint.v4f16(%v4f16 %a)
204 declare %v4f16 @llvm.sqrt.v4f16(%v4f16) #0
205 declare %v4f16 @llvm.powi.v4f16(%v4f16, i32) #0
206 declare %v4f16 @llvm.sin.v4f16(%v4f16) #0
207 declare %v4f16 @llvm.cos.v4f16(%v4f16) #0
208 declare %v4f16 @llvm.pow.v4f16(%v4f16, %v4f16) #0
209 declare %v4f16 @llvm.exp.v4f16(%v4f16) #0
210 declare %v4f16 @llvm.exp2.v4f16(%v4f16) #0
211 declare %v4f16 @llvm.log.v4f16(%v4f16) #0
212 declare %v4f16 @llvm.log10.v4f16(%v4f16) #0
213 declare %v4f16 @llvm.log2.v4f16(%v4f16) #0
214 declare %v4f16 @llvm.fma.v4f16(%v4f16, %v4f16, %v4f16) #0
215 declare %v4f16 @llvm.fabs.v4f16(%v4f16) #0
216 declare %v4f16 @llvm.floor.v4f16(%v4f16) #0
217 declare %v4f16 @llvm.ceil.v4f16(%v4f16) #0
218 declare %v4f16 @llvm.trunc.v4f16(%v4f16) #0
219 declare %v4f16 @llvm.rint.v4f16(%v4f16) #0
220 declare %v4f16 @llvm.nearbyint.v4f16(%v4f16) #0
224 %v8f16 = type <8 x half>
226 ; FALLBACK-NOT: remark{{.*}}test_v8f16.sqrt
227 define %v8f16 @test_v8f16.sqrt(%v8f16 %a) {
228 ; CHECK-LABEL: test_v8f16.sqrt:
229 ; CHECK-NOFP16-COUNT-8: fsqrt s{{[0-9]+}}, s{{[0-9]+}}
230 ; CHECK-FP16-NOT: fcvt
231 ; CHECK-FP16: fsqrt.8h
232 ; CHECK-FP16-NEXT: ret
233 ; GISEL-LABEL: test_v8f16.sqrt:
234 ; GISEL-NOFP16-COUNT-8: fsqrt s{{[0-9]+}}, s{{[0-9]+}}
235 ; GISEL-FP16-NOT: fcvt
236 ; GISEL-FP16: fsqrt.8h
237 ; GISEL-FP16-NEXT: ret
238 %1 = call %v8f16 @llvm.sqrt.v8f16(%v8f16 %a)
241 define %v8f16 @test_v8f16.powi(%v8f16 %a, i32 %b) {
242 ; This operation is expanded, whether with or without +fullfp16.
243 ; CHECK-LABEL: test_v8f16.powi:
244 ; CHECK-COUNT-8: bl __powi
245 %1 = call %v8f16 @llvm.powi.v8f16(%v8f16 %a, i32 %b)
249 ; FALLBACK-NOT: remark{{.*}}test_v8f16.sin
250 define %v8f16 @test_v8f16.sin(%v8f16 %a) {
251 ; This operation is expanded, whether with or without +fullfp16.
252 ; CHECK-LABEL: test_v8f16.sin:
253 ; CHECK-COUNT-8: bl sinf
254 ; GISEL-LABEL: test_v8f16.sin:
255 ; GISEL-COUNT-8: bl sinf
256 %1 = call %v8f16 @llvm.sin.v8f16(%v8f16 %a)
260 ; FALLBACK-NOT: remark{{.*}}test_v8f16.cos
261 define %v8f16 @test_v8f16.cos(%v8f16 %a) {
262 ; This operation is expanded, whether with or without +fullfp16.
263 ; CHECK-LABEL: test_v8f16.cos:
264 ; CHECK-COUNT-8: bl cosf
265 ; GISEL-LABEL: test_v8f16.cos:
266 ; GISEL-COUNT-8: bl cosf
267 %1 = call %v8f16 @llvm.cos.v8f16(%v8f16 %a)
270 define %v8f16 @test_v8f16.pow(%v8f16 %a, %v8f16 %b) {
271 ; This operation is expanded, whether with or without +fullfp16.
272 ; CHECK-LABEL: test_v8f16.pow:
273 ; CHECK-COUNT-8: bl pow
274 %1 = call %v8f16 @llvm.pow.v8f16(%v8f16 %a, %v8f16 %b)
278 ; FALLBACK-NOT: remark{{.*}}test_v8f16.exp
279 define %v8f16 @test_v8f16.exp(%v8f16 %a) {
280 ; This operation is expanded, whether with or without +fullfp16.
281 ; CHECK-LABEL: test_v8f16.exp:
282 ; CHECK-COUNT-8: bl exp
283 ; GISEL-LABEL: test_v8f16.exp:
284 ; GISEL-COUNT-8: bl exp
285 %1 = call %v8f16 @llvm.exp.v8f16(%v8f16 %a)
288 define %v8f16 @test_v8f16.exp2(%v8f16 %a) {
289 ; This operation is expanded, whether with or without +fullfp16.
290 ; CHECK-LABEL: test_v8f16.exp2:
291 ; CHECK-COUNT-8: bl exp2
292 %1 = call %v8f16 @llvm.exp2.v8f16(%v8f16 %a)
296 ; FALLBACK-NOT: remark{{.*}}test_v8f16.log
297 define %v8f16 @test_v8f16.log(%v8f16 %a) {
298 ; This operation is expanded, whether with or without +fullfp16.
299 ; CHECK-LABEL: test_v8f16.log:
300 ; CHECK-COUNT-8: bl log
301 ; GISEL-LABEL: test_v8f16.log:
302 ; GISEL-COUNT-8: bl log
303 %1 = call %v8f16 @llvm.log.v8f16(%v8f16 %a)
307 ; FALLBACK-NOT: remark{{.*}}test_v8f16.log10
308 define %v8f16 @test_v8f16.log10(%v8f16 %a) {
309 ; This operation is expanded, whether with or without +fullfp16.
310 ; CHECK-LABEL: test_v8f16.log10:
311 ; CHECK-COUNT-8: bl log10
312 ; GISEL-LABEL: test_v8f16.log10:
313 ; GISEL-COUNT-8: bl log10
314 %1 = call %v8f16 @llvm.log10.v8f16(%v8f16 %a)
318 ; FALLBACK-NOT: remark{{.*}}test_v8f16.log2
319 define %v8f16 @test_v8f16.log2(%v8f16 %a) {
320 ; This operation is expanded, whether with or without +fullfp16.
321 ; CHECK-LABEL: test_v8f16.log2:
322 ; CHECK-COUNT-8: bl log2
323 ; GISEL-LABEL: test_v8f16.log2:
324 ; GISEL-COUNT-8: bl log2
325 %1 = call %v8f16 @llvm.log2.v8f16(%v8f16 %a)
328 define %v8f16 @test_v8f16.fma(%v8f16 %a, %v8f16 %b, %v8f16 %c) {
329 ; CHECK-LABEL: test_v8f16.fma:
330 ; CHECK-NOFP16-COUNT-8: fmadd s{{[0-9]+}}, s{{[0-9]+}}, s{{[0-9]+}}, s{{[0-9]+}}
331 ; CHECK-FP16-NOT: fcvt
332 ; CHECK-FP16: fmla.8h
333 %1 = call %v8f16 @llvm.fma.v8f16(%v8f16 %a, %v8f16 %b, %v8f16 %c)
337 ; FALLBACK-NOT: remark{{.*}}test_v8f16.fabs
338 define %v8f16 @test_v8f16.fabs(%v8f16 %a) {
339 ; CHECK-LABEL: test_v8f16.fabs:
340 ; CHECK-NOFP16-COUNT-8: fabs s{{[0-9]+}}, s{{[0-9]+}}
341 ; CHECK-FP16-NOT: fcvt
342 ; CHECK-FP16: fabs.8h
343 ; CHECK-FP16-NEXT: ret
345 ; GISEL-LABEL: test_v8f16.fabs:
346 ; GISEL-NOFP16-COUNT-8: fabs s{{[0-9]+}}, s{{[0-9]+}}
347 ; GISEL-FP16-NOT: fcvt
348 ; GISEL-FP16: fabs.8h
349 ; GISEL-FP16-NEXT: ret
350 %1 = call %v8f16 @llvm.fabs.v8f16(%v8f16 %a)
354 ; FALLBACK-NOT: remark{{.*}}test_v8f16.floor
355 define %v8f16 @test_v8f16.floor(%v8f16 %a) {
356 ; CHECK-LABEL: test_v8f16.floor:
357 ; CHECK-NOFP16-COUNT-8: frintm s{{[0-9]+}}, s{{[0-9]+}}
358 ; CHECK-FP16-NOT: fcvt
359 ; CHECK-FP16: frintm.8h
360 ; CHECK-FP16-NEXT: ret
362 ; GISEL-LABEL: test_v8f16.floor:
363 ; GISEL-NOFP16-COUNT-8: frintm s{{[0-9]+}}, s{{[0-9]+}}
364 ; GISEL-FP16-NOT: fcvt
365 ; GISEL-FP16: frintm.8h
366 ; GISEL-FP16-NEXT: ret
367 %1 = call %v8f16 @llvm.floor.v8f16(%v8f16 %a)
370 define %v8f16 @test_v8f16.ceil(%v8f16 %a) {
371 ; CHECK-LABEL: test_v8f16.ceil:
372 ; CHECK-NOFP16-COUNT-8: frintp s{{[0-9]+}}, s{{[0-9]+}}
373 ; CHECK-FP16-NOT: fcvt
374 ; CHECK-FP16: frintp.8h
375 ; CHECK-FP16-NEXT: ret
376 ; FALLBACK-NOT: remark{{.*}}test_v8f16.ceil:
377 ; GISEL-LABEL: test_v8f16.ceil:
378 ; GISEL-NOFP16-COUNT-8: frintp s{{[0-9]+}}, s{{[0-9]+}}
379 ; GISEL-FP16-NOT: fcvt
380 ; GISEL-FP16: frintp.8h
381 ; GISEL-FP16-NEXT: ret
382 %1 = call %v8f16 @llvm.ceil.v8f16(%v8f16 %a)
385 define %v8f16 @test_v8f16.trunc(%v8f16 %a) {
386 ; CHECK-LABEL: test_v8f16.trunc:
387 ; CHECK-NOFP16-COUNT-8: frintz s{{[0-9]+}}, s{{[0-9]+}}
388 ; CHECK-FP16-NOT: fcvt
389 ; CHECK-FP16: frintz.8h
390 ; CHECK-FP16-NEXT: ret
391 %1 = call %v8f16 @llvm.trunc.v8f16(%v8f16 %a)
394 define %v8f16 @test_v8f16.rint(%v8f16 %a) {
395 ; CHECK-LABEL: test_v8f16.rint:
396 ; CHECK-NOFP16-COUNT-8: frintx s{{[0-9]+}}, s{{[0-9]+}}
397 ; CHECK-FP16-NOT: fcvt
398 ; CHECK-FP16: frintx.8h
399 ; CHECK-FP16-NEXT: ret
400 %1 = call %v8f16 @llvm.rint.v8f16(%v8f16 %a)
403 define %v8f16 @test_v8f16.nearbyint(%v8f16 %a) {
404 ; CHECK-LABEL: test_v8f16.nearbyint:
405 ; CHECK-NOFP16-COUNT-8: frinti s{{[0-9]+}}, s{{[0-9]+}}
406 ; CHECK-FP16-NOT: fcvt
407 ; CHECK-FP16: frinti.8h
408 ; CHECK-FP16-NEXT: ret
409 %1 = call %v8f16 @llvm.nearbyint.v8f16(%v8f16 %a)
413 declare %v8f16 @llvm.sqrt.v8f16(%v8f16) #0
414 declare %v8f16 @llvm.powi.v8f16(%v8f16, i32) #0
415 declare %v8f16 @llvm.sin.v8f16(%v8f16) #0
416 declare %v8f16 @llvm.cos.v8f16(%v8f16) #0
417 declare %v8f16 @llvm.pow.v8f16(%v8f16, %v8f16) #0
418 declare %v8f16 @llvm.exp.v8f16(%v8f16) #0
419 declare %v8f16 @llvm.exp2.v8f16(%v8f16) #0
420 declare %v8f16 @llvm.log.v8f16(%v8f16) #0
421 declare %v8f16 @llvm.log10.v8f16(%v8f16) #0
422 declare %v8f16 @llvm.log2.v8f16(%v8f16) #0
423 declare %v8f16 @llvm.fma.v8f16(%v8f16, %v8f16, %v8f16) #0
424 declare %v8f16 @llvm.fabs.v8f16(%v8f16) #0
425 declare %v8f16 @llvm.floor.v8f16(%v8f16) #0
426 declare %v8f16 @llvm.ceil.v8f16(%v8f16) #0
427 declare %v8f16 @llvm.trunc.v8f16(%v8f16) #0
428 declare %v8f16 @llvm.rint.v8f16(%v8f16) #0
429 declare %v8f16 @llvm.nearbyint.v8f16(%v8f16) #0
433 %v2f32 = type <2 x float>
435 ; FALLBACK-NOT: remark{{.*}}test_v2f32.sqrt
436 ; CHECK-LABEL: test_v2f32.sqrt:
437 ; GISEL-LABEL: test_v2f32.sqrt:
438 define %v2f32 @test_v2f32.sqrt(%v2f32 %a) {
441 %1 = call %v2f32 @llvm.sqrt.v2f32(%v2f32 %a)
444 ; CHECK: test_v2f32.powi:
445 define %v2f32 @test_v2f32.powi(%v2f32 %a, i32 %b) {
447 %1 = call %v2f32 @llvm.powi.v2f32(%v2f32 %a, i32 %b)
451 ; FALLBACK-NOT: remark{{.*}}test_v2f32.sin
452 ; CHECK: test_v2f32.sin:
453 define %v2f32 @test_v2f32.sin(%v2f32 %a) {
456 %1 = call %v2f32 @llvm.sin.v2f32(%v2f32 %a)
460 ; FALLBACK-NOT: remark{{.*}}test_v2f32.cos
461 ; CHECK: test_v2f32.cos:
462 define %v2f32 @test_v2f32.cos(%v2f32 %a) {
465 %1 = call %v2f32 @llvm.cos.v2f32(%v2f32 %a)
468 ; CHECK: test_v2f32.pow:
469 define %v2f32 @test_v2f32.pow(%v2f32 %a, %v2f32 %b) {
471 %1 = call %v2f32 @llvm.pow.v2f32(%v2f32 %a, %v2f32 %b)
475 ; FALLBACK-NOT: remark{{.*}}test_v2f32.exp
476 ; CHECK: test_v2f32.exp:
477 ; GISEL: test_v2f32.exp:
478 define %v2f32 @test_v2f32.exp(%v2f32 %a) {
481 %1 = call %v2f32 @llvm.exp.v2f32(%v2f32 %a)
484 ; CHECK: test_v2f32.exp2:
485 define %v2f32 @test_v2f32.exp2(%v2f32 %a) {
487 %1 = call %v2f32 @llvm.exp2.v2f32(%v2f32 %a)
491 ; FALLBACK-NOT: remark{{.*}}test_v2f32.log
492 ; CHECK: test_v2f32.log:
493 define %v2f32 @test_v2f32.log(%v2f32 %a) {
496 %1 = call %v2f32 @llvm.log.v2f32(%v2f32 %a)
500 ; FALLBACK-NOT: remark{{.*}}test_v2f32.log10
501 ; CHECK: test_v2f32.log10:
502 ; GISEL: test_v2f32.log10:
503 define %v2f32 @test_v2f32.log10(%v2f32 %a) {
506 %1 = call %v2f32 @llvm.log10.v2f32(%v2f32 %a)
510 ; FALLBACK-NOT: remark{{.*}}test_v2f32.log2
511 ; CHECK: test_v2f32.log2:
512 ; GISEL: test_v2f32.log2:
513 define %v2f32 @test_v2f32.log2(%v2f32 %a) {
516 %1 = call %v2f32 @llvm.log2.v2f32(%v2f32 %a)
519 ; CHECK-LABEL: test_v2f32.fma:
520 define %v2f32 @test_v2f32.fma(%v2f32 %a, %v2f32 %b, %v2f32 %c) {
522 %1 = call %v2f32 @llvm.fma.v2f32(%v2f32 %a, %v2f32 %b, %v2f32 %c)
526 ; FALLBACK-NOT: remark{{.*}}test_v2f32.fabs
527 ; CHECK-LABEL: test_v2f32.fabs:
528 ; GISEL-LABEL: test_v2f32.fabs:
529 define %v2f32 @test_v2f32.fabs(%v2f32 %a) {
532 %1 = call %v2f32 @llvm.fabs.v2f32(%v2f32 %a)
536 ; FALLBACK-NOT: remark{{.*}}test_v2f32.floor
537 ; CHECK-LABEL: test_v2f32.floor:
538 ; GISEL-LABEL: test_v2f32.floor:
539 define %v2f32 @test_v2f32.floor(%v2f32 %a) {
542 %1 = call %v2f32 @llvm.floor.v2f32(%v2f32 %a)
545 ; CHECK-LABEL: test_v2f32.ceil:
546 ; FALLBACK-NOT: remark{{.*}}test_v2f32.ceil
547 ; GISEL-LABEL: test_v2f32.ceil:
548 define %v2f32 @test_v2f32.ceil(%v2f32 %a) {
551 %1 = call %v2f32 @llvm.ceil.v2f32(%v2f32 %a)
554 ; CHECK-LABEL: test_v2f32.trunc:
555 define %v2f32 @test_v2f32.trunc(%v2f32 %a) {
557 %1 = call %v2f32 @llvm.trunc.v2f32(%v2f32 %a)
560 ; CHECK-LABEL: test_v2f32.rint:
561 define %v2f32 @test_v2f32.rint(%v2f32 %a) {
563 %1 = call %v2f32 @llvm.rint.v2f32(%v2f32 %a)
566 ; CHECK-LABEL: test_v2f32.nearbyint:
567 define %v2f32 @test_v2f32.nearbyint(%v2f32 %a) {
569 %1 = call %v2f32 @llvm.nearbyint.v2f32(%v2f32 %a)
573 declare %v2f32 @llvm.sqrt.v2f32(%v2f32) #0
574 declare %v2f32 @llvm.powi.v2f32(%v2f32, i32) #0
575 declare %v2f32 @llvm.sin.v2f32(%v2f32) #0
576 declare %v2f32 @llvm.cos.v2f32(%v2f32) #0
577 declare %v2f32 @llvm.pow.v2f32(%v2f32, %v2f32) #0
578 declare %v2f32 @llvm.exp.v2f32(%v2f32) #0
579 declare %v2f32 @llvm.exp2.v2f32(%v2f32) #0
580 declare %v2f32 @llvm.log.v2f32(%v2f32) #0
581 declare %v2f32 @llvm.log10.v2f32(%v2f32) #0
582 declare %v2f32 @llvm.log2.v2f32(%v2f32) #0
583 declare %v2f32 @llvm.fma.v2f32(%v2f32, %v2f32, %v2f32) #0
584 declare %v2f32 @llvm.fabs.v2f32(%v2f32) #0
585 declare %v2f32 @llvm.floor.v2f32(%v2f32) #0
586 declare %v2f32 @llvm.ceil.v2f32(%v2f32) #0
587 declare %v2f32 @llvm.trunc.v2f32(%v2f32) #0
588 declare %v2f32 @llvm.rint.v2f32(%v2f32) #0
589 declare %v2f32 @llvm.nearbyint.v2f32(%v2f32) #0
593 %v4f32 = type <4 x float>
595 ; FALLBACK-NOT: remark{{.*}}test_v4f32.sqrt
596 ; CHECK: test_v4f32.sqrt:
597 ; GISEL: test_v4f32.sqrt:
598 define %v4f32 @test_v4f32.sqrt(%v4f32 %a) {
601 %1 = call %v4f32 @llvm.sqrt.v4f32(%v4f32 %a)
604 ; CHECK: test_v4f32.powi:
605 define %v4f32 @test_v4f32.powi(%v4f32 %a, i32 %b) {
607 %1 = call %v4f32 @llvm.powi.v4f32(%v4f32 %a, i32 %b)
611 ; FALLBACK-NOT: remark{{.*}}test_v4f32.sin
612 ; CHECK: test_v4f32.sin:
613 define %v4f32 @test_v4f32.sin(%v4f32 %a) {
616 %1 = call %v4f32 @llvm.sin.v4f32(%v4f32 %a)
620 ; FALLBACK-NOT: remark{{.*}}test_v4f32.cos
621 ; CHECK: test_v4f32.cos:
622 define %v4f32 @test_v4f32.cos(%v4f32 %a) {
625 %1 = call %v4f32 @llvm.cos.v4f32(%v4f32 %a)
628 ; CHECK: test_v4f32.pow:
629 define %v4f32 @test_v4f32.pow(%v4f32 %a, %v4f32 %b) {
631 %1 = call %v4f32 @llvm.pow.v4f32(%v4f32 %a, %v4f32 %b)
635 ; FALLBACK-NOT: remark{{.*}}test_v4f32.exp
636 ; CHECK: test_v4f32.exp:
637 ; GISEL: test_v4f32.exp:
638 define %v4f32 @test_v4f32.exp(%v4f32 %a) {
641 %1 = call %v4f32 @llvm.exp.v4f32(%v4f32 %a)
644 ; CHECK: test_v4f32.exp2:
645 define %v4f32 @test_v4f32.exp2(%v4f32 %a) {
647 %1 = call %v4f32 @llvm.exp2.v4f32(%v4f32 %a)
651 ; FALLBACK-NOT: remark{{.*}}test_v4f32.log
652 ; CHECK: test_v4f32.log:
653 define %v4f32 @test_v4f32.log(%v4f32 %a) {
656 %1 = call %v4f32 @llvm.log.v4f32(%v4f32 %a)
660 ; FALLBACK-NOT: remark{{.*}}test_v4f32.log10
661 ; CHECK: test_v4f32.log10:
662 define %v4f32 @test_v4f32.log10(%v4f32 %a) {
665 %1 = call %v4f32 @llvm.log10.v4f32(%v4f32 %a)
669 ; FALLBACK-NOT: remark{{.*}}test_v4f32.log2
670 ; CHECK: test_v4f32.log2:
671 ; GISEL: test_v4f32.log2:
672 define %v4f32 @test_v4f32.log2(%v4f32 %a) {
675 %1 = call %v4f32 @llvm.log2.v4f32(%v4f32 %a)
678 ; CHECK: test_v4f32.fma:
679 define %v4f32 @test_v4f32.fma(%v4f32 %a, %v4f32 %b, %v4f32 %c) {
681 %1 = call %v4f32 @llvm.fma.v4f32(%v4f32 %a, %v4f32 %b, %v4f32 %c)
685 ; FALLBACK-NOT: remark{{.*}}test_v4f32.fabs
686 ; CHECK: test_v4f32.fabs:
687 ; GISEL: test_v4f32.fabs:
688 define %v4f32 @test_v4f32.fabs(%v4f32 %a) {
691 %1 = call %v4f32 @llvm.fabs.v4f32(%v4f32 %a)
695 ; FALLBACK-NOT: remark{{.*}}test_v4f32.floor
696 ; CHECK: test_v4f32.floor:
697 ; GISEL: test_v4f32.floor:
698 define %v4f32 @test_v4f32.floor(%v4f32 %a) {
701 %1 = call %v4f32 @llvm.floor.v4f32(%v4f32 %a)
704 ; CHECK: test_v4f32.ceil:
705 ; FALLBACK-NOT: remark{{.*}}test_v4f32.ceil
706 ; GISEL-LABEL: test_v4f32.ceil:
707 define %v4f32 @test_v4f32.ceil(%v4f32 %a) {
710 %1 = call %v4f32 @llvm.ceil.v4f32(%v4f32 %a)
713 ; CHECK: test_v4f32.trunc:
714 define %v4f32 @test_v4f32.trunc(%v4f32 %a) {
716 %1 = call %v4f32 @llvm.trunc.v4f32(%v4f32 %a)
719 ; CHECK: test_v4f32.rint:
720 define %v4f32 @test_v4f32.rint(%v4f32 %a) {
722 %1 = call %v4f32 @llvm.rint.v4f32(%v4f32 %a)
725 ; CHECK: test_v4f32.nearbyint:
726 define %v4f32 @test_v4f32.nearbyint(%v4f32 %a) {
728 %1 = call %v4f32 @llvm.nearbyint.v4f32(%v4f32 %a)
732 declare %v4f32 @llvm.sqrt.v4f32(%v4f32) #0
733 declare %v4f32 @llvm.powi.v4f32(%v4f32, i32) #0
734 declare %v4f32 @llvm.sin.v4f32(%v4f32) #0
735 declare %v4f32 @llvm.cos.v4f32(%v4f32) #0
736 declare %v4f32 @llvm.pow.v4f32(%v4f32, %v4f32) #0
737 declare %v4f32 @llvm.exp.v4f32(%v4f32) #0
738 declare %v4f32 @llvm.exp2.v4f32(%v4f32) #0
739 declare %v4f32 @llvm.log.v4f32(%v4f32) #0
740 declare %v4f32 @llvm.log10.v4f32(%v4f32) #0
741 declare %v4f32 @llvm.log2.v4f32(%v4f32) #0
742 declare %v4f32 @llvm.fma.v4f32(%v4f32, %v4f32, %v4f32) #0
743 declare %v4f32 @llvm.fabs.v4f32(%v4f32) #0
744 declare %v4f32 @llvm.floor.v4f32(%v4f32) #0
745 declare %v4f32 @llvm.ceil.v4f32(%v4f32) #0
746 declare %v4f32 @llvm.trunc.v4f32(%v4f32) #0
747 declare %v4f32 @llvm.rint.v4f32(%v4f32) #0
748 declare %v4f32 @llvm.nearbyint.v4f32(%v4f32) #0
752 %v2f64 = type <2 x double>
753 ; FALLBACK-NOT: remark{{.*}}test_v2f64.sqrt
754 ; CHECK: test_v2f64.sqrt:
755 ; GISEL: test_v2f64.sqrt:
756 define %v2f64 @test_v2f64.sqrt(%v2f64 %a) {
759 %1 = call %v2f64 @llvm.sqrt.v2f64(%v2f64 %a)
762 ; CHECK: test_v2f64.powi:
763 define %v2f64 @test_v2f64.powi(%v2f64 %a, i32 %b) {
765 %1 = call %v2f64 @llvm.powi.v2f64(%v2f64 %a, i32 %b)
769 ; FALLBACK-NOT: remark{{.*}}test_v2f64.sin
770 ; CHECK: test_v2f64.sin:
771 define %v2f64 @test_v2f64.sin(%v2f64 %a) {
774 %1 = call %v2f64 @llvm.sin.v2f64(%v2f64 %a)
778 ; FALLBACK-NOT: remark{{.*}}test_v2f64.cos
779 ; CHECK: test_v2f64.cos:
780 define %v2f64 @test_v2f64.cos(%v2f64 %a) {
783 %1 = call %v2f64 @llvm.cos.v2f64(%v2f64 %a)
786 ; CHECK: test_v2f64.pow:
787 define %v2f64 @test_v2f64.pow(%v2f64 %a, %v2f64 %b) {
789 %1 = call %v2f64 @llvm.pow.v2f64(%v2f64 %a, %v2f64 %b)
793 ; FALLBACK-NOT: remark{{.*}}test_v2f64.exp
794 ; CHECK: test_v2f64.exp:
795 ; GISEL: test_v2f64.exp:
796 define %v2f64 @test_v2f64.exp(%v2f64 %a) {
799 %1 = call %v2f64 @llvm.exp.v2f64(%v2f64 %a)
802 ; CHECK: test_v2f64.exp2:
803 define %v2f64 @test_v2f64.exp2(%v2f64 %a) {
805 %1 = call %v2f64 @llvm.exp2.v2f64(%v2f64 %a)
809 ; FALLBACK-NOT: remark{{.*}}test_v2f64.log
810 ; CHECK: test_v2f64.log:
811 define %v2f64 @test_v2f64.log(%v2f64 %a) {
814 %1 = call %v2f64 @llvm.log.v2f64(%v2f64 %a)
818 ; FALLBACK-NOT: remark{{.*}}test_v2f64.log10
819 ; CHECK: test_v2f64.log10:
820 ; GISEL: test_v2f64.log10:
821 define %v2f64 @test_v2f64.log10(%v2f64 %a) {
824 %1 = call %v2f64 @llvm.log10.v2f64(%v2f64 %a)
828 ; FALLBACK-NOT: remark{{.*}}test_v2f64.log2
829 ; CHECK: test_v2f64.log2:
830 ; GISEL: test_v2f64.log2:
831 define %v2f64 @test_v2f64.log2(%v2f64 %a) {
834 %1 = call %v2f64 @llvm.log2.v2f64(%v2f64 %a)
837 ; CHECK: test_v2f64.fma:
838 define %v2f64 @test_v2f64.fma(%v2f64 %a, %v2f64 %b, %v2f64 %c) {
840 %1 = call %v2f64 @llvm.fma.v2f64(%v2f64 %a, %v2f64 %b, %v2f64 %c)
844 ; FALLBACK-NOT: remark{{.*}}test_v2f64.fabs
845 ; CHECK: test_v2f64.fabs:
846 ; GISEL: test_v2f64.fabs:
847 define %v2f64 @test_v2f64.fabs(%v2f64 %a) {
850 %1 = call %v2f64 @llvm.fabs.v2f64(%v2f64 %a)
854 ; FALLBACK-NOT: remark{{.*}}test_v2f64.floor
855 ; CHECK: test_v2f64.floor:
856 ; GISEL: test_v2f64.floor:
857 define %v2f64 @test_v2f64.floor(%v2f64 %a) {
860 %1 = call %v2f64 @llvm.floor.v2f64(%v2f64 %a)
863 ; CHECK: test_v2f64.ceil:
864 ; FALLBACK-NOT: remark{{.*}}test_v2f64.ceil
865 ; GISEL-LABEL: test_v2f64.ceil:
866 define %v2f64 @test_v2f64.ceil(%v2f64 %a) {
869 %1 = call %v2f64 @llvm.ceil.v2f64(%v2f64 %a)
872 ; CHECK: test_v2f64.trunc:
873 define %v2f64 @test_v2f64.trunc(%v2f64 %a) {
875 %1 = call %v2f64 @llvm.trunc.v2f64(%v2f64 %a)
878 ; CHECK: test_v2f64.rint:
879 define %v2f64 @test_v2f64.rint(%v2f64 %a) {
881 %1 = call %v2f64 @llvm.rint.v2f64(%v2f64 %a)
884 ; CHECK: test_v2f64.nearbyint:
885 define %v2f64 @test_v2f64.nearbyint(%v2f64 %a) {
887 %1 = call %v2f64 @llvm.nearbyint.v2f64(%v2f64 %a)
891 declare %v2f64 @llvm.sqrt.v2f64(%v2f64) #0
892 declare %v2f64 @llvm.powi.v2f64(%v2f64, i32) #0
893 declare %v2f64 @llvm.sin.v2f64(%v2f64) #0
894 declare %v2f64 @llvm.cos.v2f64(%v2f64) #0
895 declare %v2f64 @llvm.pow.v2f64(%v2f64, %v2f64) #0
896 declare %v2f64 @llvm.exp.v2f64(%v2f64) #0
897 declare %v2f64 @llvm.exp2.v2f64(%v2f64) #0
898 declare %v2f64 @llvm.log.v2f64(%v2f64) #0
899 declare %v2f64 @llvm.log10.v2f64(%v2f64) #0
900 declare %v2f64 @llvm.log2.v2f64(%v2f64) #0
901 declare %v2f64 @llvm.fma.v2f64(%v2f64, %v2f64, %v2f64) #0
902 declare %v2f64 @llvm.fabs.v2f64(%v2f64) #0
903 declare %v2f64 @llvm.floor.v2f64(%v2f64) #0
904 declare %v2f64 @llvm.ceil.v2f64(%v2f64) #0
905 declare %v2f64 @llvm.trunc.v2f64(%v2f64) #0
906 declare %v2f64 @llvm.rint.v2f64(%v2f64) #0
907 declare %v2f64 @llvm.nearbyint.v2f64(%v2f64) #0
909 attributes #0 = { nounwind readonly }