2
2
; RUN: llc -mtriple=aarch64-gnu-linux < %s | FileCheck -check-prefixes=CHECK %s
3
3
; RUN: llc -mtriple=aarch64-none-linux < %s | FileCheck -check-prefixes=NO-LIBCALL %s
4
4
5
- define { half , half } @test_sincos_f16 (half %a ) {
5
+ define { half , half } @test_sincos_f16 (half %a ) nounwind {
6
6
; CHECK-LABEL: test_sincos_f16:
7
7
; CHECK: // %bb.0:
8
8
; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
9
- ; CHECK-NEXT: .cfi_def_cfa_offset 16
10
- ; CHECK-NEXT: .cfi_offset w30, -16
11
9
; CHECK-NEXT: fcvt s0, h0
12
10
; CHECK-NEXT: add x0, sp, #12
13
11
; CHECK-NEXT: add x1, sp, #8
@@ -21,12 +19,8 @@ define { half, half } @test_sincos_f16(half %a) {
21
19
; NO-LIBCALL-LABEL: test_sincos_f16:
22
20
; NO-LIBCALL: // %bb.0:
23
21
; NO-LIBCALL-NEXT: stp d9, d8, [sp, #-32]! // 16-byte Folded Spill
24
- ; NO-LIBCALL-NEXT: str x30, [sp, #16] // 8-byte Folded Spill
25
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 32
26
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -16
27
- ; NO-LIBCALL-NEXT: .cfi_offset b8, -24
28
- ; NO-LIBCALL-NEXT: .cfi_offset b9, -32
29
22
; NO-LIBCALL-NEXT: fcvt s8, h0
23
+ ; NO-LIBCALL-NEXT: str x30, [sp, #16] // 8-byte Folded Spill
30
24
; NO-LIBCALL-NEXT: fmov s0, s8
31
25
; NO-LIBCALL-NEXT: bl sinf
32
26
; NO-LIBCALL-NEXT: fcvt h9, s0
@@ -42,12 +36,10 @@ define { half, half } @test_sincos_f16(half %a) {
42
36
ret { half , half } %result
43
37
}
44
38
45
- define half @test_sincos_f16_only_use_sin (half %a ) {
39
+ define half @test_sincos_f16_only_use_sin (half %a ) nounwind {
46
40
; CHECK-LABEL: test_sincos_f16_only_use_sin:
47
41
; CHECK: // %bb.0:
48
42
; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
49
- ; CHECK-NEXT: .cfi_def_cfa_offset 16
50
- ; CHECK-NEXT: .cfi_offset w30, -16
51
43
; CHECK-NEXT: fcvt s0, h0
52
44
; CHECK-NEXT: add x0, sp, #12
53
45
; CHECK-NEXT: add x1, sp, #8
@@ -60,8 +52,6 @@ define half @test_sincos_f16_only_use_sin(half %a) {
60
52
; NO-LIBCALL-LABEL: test_sincos_f16_only_use_sin:
61
53
; NO-LIBCALL: // %bb.0:
62
54
; NO-LIBCALL-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
63
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 16
64
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -16
65
55
; NO-LIBCALL-NEXT: fcvt s0, h0
66
56
; NO-LIBCALL-NEXT: bl sinf
67
57
; NO-LIBCALL-NEXT: fcvt h0, s0
@@ -72,12 +62,10 @@ define half @test_sincos_f16_only_use_sin(half %a) {
72
62
ret half %result.0
73
63
}
74
64
75
- define half @test_sincos_f16_only_use_cos (half %a ) {
65
+ define half @test_sincos_f16_only_use_cos (half %a ) nounwind {
76
66
; CHECK-LABEL: test_sincos_f16_only_use_cos:
77
67
; CHECK: // %bb.0:
78
68
; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
79
- ; CHECK-NEXT: .cfi_def_cfa_offset 16
80
- ; CHECK-NEXT: .cfi_offset w30, -16
81
69
; CHECK-NEXT: fcvt s0, h0
82
70
; CHECK-NEXT: add x0, sp, #12
83
71
; CHECK-NEXT: add x1, sp, #8
@@ -90,8 +78,6 @@ define half @test_sincos_f16_only_use_cos(half %a) {
90
78
; NO-LIBCALL-LABEL: test_sincos_f16_only_use_cos:
91
79
; NO-LIBCALL: // %bb.0:
92
80
; NO-LIBCALL-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
93
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 16
94
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -16
95
81
; NO-LIBCALL-NEXT: fcvt s0, h0
96
82
; NO-LIBCALL-NEXT: bl cosf
97
83
; NO-LIBCALL-NEXT: fcvt h0, s0
@@ -102,18 +88,16 @@ define half @test_sincos_f16_only_use_cos(half %a) {
102
88
ret half %result.1
103
89
}
104
90
105
- define { <2 x half >, <2 x half > } @test_sincos_v2f16 (<2 x half > %a ) {
91
+ define { <2 x half >, <2 x half > } @test_sincos_v2f16 (<2 x half > %a ) nounwind {
106
92
; CHECK-LABEL: test_sincos_v2f16:
107
93
; CHECK: // %bb.0:
108
94
; CHECK-NEXT: sub sp, sp, #64
109
- ; CHECK-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
110
- ; CHECK-NEXT: .cfi_def_cfa_offset 64
111
- ; CHECK-NEXT: .cfi_offset w30, -16
112
95
; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
113
96
; CHECK-NEXT: mov h1, v0.h[1]
114
97
; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
115
98
; CHECK-NEXT: add x0, sp, #36
116
99
; CHECK-NEXT: add x1, sp, #32
100
+ ; CHECK-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
117
101
; CHECK-NEXT: fcvt s0, h1
118
102
; CHECK-NEXT: bl sincosf
119
103
; CHECK-NEXT: ldr q0, [sp] // 16-byte Folded Reload
@@ -160,18 +144,12 @@ define { <2 x half>, <2 x half> } @test_sincos_v2f16(<2 x half> %a) {
160
144
; NO-LIBCALL-LABEL: test_sincos_v2f16:
161
145
; NO-LIBCALL: // %bb.0:
162
146
; NO-LIBCALL-NEXT: sub sp, sp, #80
163
- ; NO-LIBCALL-NEXT: stp d11, d10, [sp, #32] // 16-byte Folded Spill
164
- ; NO-LIBCALL-NEXT: stp d9, d8, [sp, #48] // 16-byte Folded Spill
165
- ; NO-LIBCALL-NEXT: str x30, [sp, #64] // 8-byte Folded Spill
166
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 80
167
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -16
168
- ; NO-LIBCALL-NEXT: .cfi_offset b8, -24
169
- ; NO-LIBCALL-NEXT: .cfi_offset b9, -32
170
- ; NO-LIBCALL-NEXT: .cfi_offset b10, -40
171
- ; NO-LIBCALL-NEXT: .cfi_offset b11, -48
172
147
; NO-LIBCALL-NEXT: // kill: def $d0 killed $d0 def $q0
173
148
; NO-LIBCALL-NEXT: mov h1, v0.h[1]
149
+ ; NO-LIBCALL-NEXT: stp d9, d8, [sp, #48] // 16-byte Folded Spill
174
150
; NO-LIBCALL-NEXT: str q0, [sp] // 16-byte Folded Spill
151
+ ; NO-LIBCALL-NEXT: stp d11, d10, [sp, #32] // 16-byte Folded Spill
152
+ ; NO-LIBCALL-NEXT: str x30, [sp, #64] // 8-byte Folded Spill
175
153
; NO-LIBCALL-NEXT: fcvt s8, h1
176
154
; NO-LIBCALL-NEXT: fmov s0, s8
177
155
; NO-LIBCALL-NEXT: bl sinf
@@ -237,12 +215,10 @@ define { <2 x half>, <2 x half> } @test_sincos_v2f16(<2 x half> %a) {
237
215
ret { <2 x half >, <2 x half > } %result
238
216
}
239
217
240
- define { float , float } @test_sincos_f32 (float %a ) {
218
+ define { float , float } @test_sincos_f32 (float %a ) nounwind {
241
219
; CHECK-LABEL: test_sincos_f32:
242
220
; CHECK: // %bb.0:
243
221
; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
244
- ; CHECK-NEXT: .cfi_def_cfa_offset 16
245
- ; CHECK-NEXT: .cfi_offset w30, -16
246
222
; CHECK-NEXT: add x0, sp, #12
247
223
; CHECK-NEXT: add x1, sp, #8
248
224
; CHECK-NEXT: bl sincosf
@@ -254,10 +230,6 @@ define { float, float } @test_sincos_f32(float %a) {
254
230
; NO-LIBCALL: // %bb.0:
255
231
; NO-LIBCALL-NEXT: stp d9, d8, [sp, #-32]! // 16-byte Folded Spill
256
232
; NO-LIBCALL-NEXT: str x30, [sp, #16] // 8-byte Folded Spill
257
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 32
258
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -16
259
- ; NO-LIBCALL-NEXT: .cfi_offset b8, -24
260
- ; NO-LIBCALL-NEXT: .cfi_offset b9, -32
261
233
; NO-LIBCALL-NEXT: fmov s8, s0
262
234
; NO-LIBCALL-NEXT: bl sinf
263
235
; NO-LIBCALL-NEXT: fmov s9, s0
@@ -272,21 +244,15 @@ define { float, float } @test_sincos_f32(float %a) {
272
244
ret { float , float } %result
273
245
}
274
246
275
- define { <3 x float >, <3 x float > } @test_sincos_v3f32 (<3 x float > %a ) {
247
+ define { <3 x float >, <3 x float > } @test_sincos_v3f32 (<3 x float > %a ) nounwind {
276
248
; CHECK-LABEL: test_sincos_v3f32:
277
249
; CHECK: // %bb.0:
278
250
; CHECK-NEXT: sub sp, sp, #80
251
+ ; CHECK-NEXT: add x0, sp, #20
252
+ ; CHECK-NEXT: add x1, sp, #16
279
253
; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
280
254
; CHECK-NEXT: stp x22, x21, [sp, #48] // 16-byte Folded Spill
281
255
; CHECK-NEXT: stp x20, x19, [sp, #64] // 16-byte Folded Spill
282
- ; CHECK-NEXT: .cfi_def_cfa_offset 80
283
- ; CHECK-NEXT: .cfi_offset w19, -8
284
- ; CHECK-NEXT: .cfi_offset w20, -16
285
- ; CHECK-NEXT: .cfi_offset w21, -24
286
- ; CHECK-NEXT: .cfi_offset w22, -32
287
- ; CHECK-NEXT: .cfi_offset w30, -48
288
- ; CHECK-NEXT: add x0, sp, #20
289
- ; CHECK-NEXT: add x1, sp, #16
290
256
; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
291
257
; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
292
258
; CHECK-NEXT: bl sincosf
@@ -319,13 +285,9 @@ define { <3 x float>, <3 x float> } @test_sincos_v3f32(<3 x float> %a) {
319
285
; NO-LIBCALL: // %bb.0:
320
286
; NO-LIBCALL-NEXT: sub sp, sp, #80
321
287
; NO-LIBCALL-NEXT: stp d9, d8, [sp, #48] // 16-byte Folded Spill
322
- ; NO-LIBCALL-NEXT: str x30, [sp, #64] // 8-byte Folded Spill
323
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 80
324
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -16
325
- ; NO-LIBCALL-NEXT: .cfi_offset b8, -24
326
- ; NO-LIBCALL-NEXT: .cfi_offset b9, -32
327
288
; NO-LIBCALL-NEXT: mov s8, v0.s[1]
328
289
; NO-LIBCALL-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
290
+ ; NO-LIBCALL-NEXT: str x30, [sp, #64] // 8-byte Folded Spill
329
291
; NO-LIBCALL-NEXT: fmov s0, s8
330
292
; NO-LIBCALL-NEXT: bl sinf
331
293
; NO-LIBCALL-NEXT: // kill: def $s0 killed $s0 def $q0
@@ -369,19 +331,15 @@ define { <3 x float>, <3 x float> } @test_sincos_v3f32(<3 x float> %a) {
369
331
ret { <3 x float >, <3 x float > } %result
370
332
}
371
333
372
- define { <2 x float >, <2 x float > } @test_sincos_v2f32 (<2 x float > %a ) {
334
+ define { <2 x float >, <2 x float > } @test_sincos_v2f32 (<2 x float > %a ) nounwind {
373
335
; CHECK-LABEL: test_sincos_v2f32:
374
336
; CHECK: // %bb.0:
375
337
; CHECK-NEXT: sub sp, sp, #64
376
- ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
377
- ; CHECK-NEXT: stp x20, x19, [sp, #48] // 16-byte Folded Spill
378
- ; CHECK-NEXT: .cfi_def_cfa_offset 64
379
- ; CHECK-NEXT: .cfi_offset w19, -8
380
- ; CHECK-NEXT: .cfi_offset w20, -16
381
- ; CHECK-NEXT: .cfi_offset w30, -32
382
338
; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
383
339
; CHECK-NEXT: add x0, sp, #44
384
340
; CHECK-NEXT: add x1, sp, #40
341
+ ; CHECK-NEXT: str x30, [sp, #32] // 8-byte Folded Spill
342
+ ; CHECK-NEXT: stp x20, x19, [sp, #48] // 16-byte Folded Spill
385
343
; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
386
344
; CHECK-NEXT: // kill: def $s0 killed $s0 killed $q0
387
345
; CHECK-NEXT: bl sincosf
@@ -406,13 +364,10 @@ define { <2 x float>, <2 x float> } @test_sincos_v2f32(<2 x float> %a) {
406
364
; NO-LIBCALL: // %bb.0:
407
365
; NO-LIBCALL-NEXT: sub sp, sp, #64
408
366
; NO-LIBCALL-NEXT: str d8, [sp, #48] // 8-byte Folded Spill
409
- ; NO-LIBCALL-NEXT: str x30, [sp, #56] // 8-byte Folded Spill
410
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 64
411
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -8
412
- ; NO-LIBCALL-NEXT: .cfi_offset b8, -16
413
367
; NO-LIBCALL-NEXT: // kill: def $d0 killed $d0 def $q0
414
368
; NO-LIBCALL-NEXT: mov s8, v0.s[1]
415
369
; NO-LIBCALL-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
370
+ ; NO-LIBCALL-NEXT: str x30, [sp, #56] // 8-byte Folded Spill
416
371
; NO-LIBCALL-NEXT: fmov s0, s8
417
372
; NO-LIBCALL-NEXT: bl sinf
418
373
; NO-LIBCALL-NEXT: // kill: def $s0 killed $s0 def $q0
@@ -444,15 +399,13 @@ define { <2 x float>, <2 x float> } @test_sincos_v2f32(<2 x float> %a) {
444
399
ret { <2 x float >, <2 x float > } %result
445
400
}
446
401
447
- define { double , double } @test_sincos_f64 (double %a ) {
402
+ define { double , double } @test_sincos_f64 (double %a ) nounwind {
448
403
; CHECK-LABEL: test_sincos_f64:
449
404
; CHECK: // %bb.0:
450
405
; CHECK-NEXT: sub sp, sp, #32
451
- ; CHECK-NEXT: str x30, [sp, #16] // 8-byte Folded Spill
452
- ; CHECK-NEXT: .cfi_def_cfa_offset 32
453
- ; CHECK-NEXT: .cfi_offset w30, -16
454
406
; CHECK-NEXT: add x0, sp, #24
455
407
; CHECK-NEXT: add x1, sp, #8
408
+ ; CHECK-NEXT: str x30, [sp, #16] // 8-byte Folded Spill
456
409
; CHECK-NEXT: bl sincos
457
410
; CHECK-NEXT: ldr d0, [sp, #24]
458
411
; CHECK-NEXT: ldr d1, [sp, #8]
@@ -464,10 +417,6 @@ define { double, double } @test_sincos_f64(double %a) {
464
417
; NO-LIBCALL: // %bb.0:
465
418
; NO-LIBCALL-NEXT: stp d9, d8, [sp, #-32]! // 16-byte Folded Spill
466
419
; NO-LIBCALL-NEXT: str x30, [sp, #16] // 8-byte Folded Spill
467
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 32
468
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -16
469
- ; NO-LIBCALL-NEXT: .cfi_offset b8, -24
470
- ; NO-LIBCALL-NEXT: .cfi_offset b9, -32
471
420
; NO-LIBCALL-NEXT: fmov d8, d0
472
421
; NO-LIBCALL-NEXT: bl sin
473
422
; NO-LIBCALL-NEXT: fmov d9, d0
@@ -482,18 +431,14 @@ define { double, double } @test_sincos_f64(double %a) {
482
431
ret { double , double } %result
483
432
}
484
433
485
- define { <2 x double >, <2 x double > } @test_sincos_v2f64 (<2 x double > %a ) {
434
+ define { <2 x double >, <2 x double > } @test_sincos_v2f64 (<2 x double > %a ) nounwind {
486
435
; CHECK-LABEL: test_sincos_v2f64:
487
436
; CHECK: // %bb.0:
488
437
; CHECK-NEXT: sub sp, sp, #80
489
- ; CHECK-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
490
- ; CHECK-NEXT: stp x20, x19, [sp, #64] // 16-byte Folded Spill
491
- ; CHECK-NEXT: .cfi_def_cfa_offset 80
492
- ; CHECK-NEXT: .cfi_offset w19, -8
493
- ; CHECK-NEXT: .cfi_offset w20, -16
494
- ; CHECK-NEXT: .cfi_offset w30, -32
495
438
; CHECK-NEXT: add x0, sp, #56
496
439
; CHECK-NEXT: add x1, sp, #40
440
+ ; CHECK-NEXT: str x30, [sp, #48] // 8-byte Folded Spill
441
+ ; CHECK-NEXT: stp x20, x19, [sp, #64] // 16-byte Folded Spill
497
442
; CHECK-NEXT: str q0, [sp] // 16-byte Folded Spill
498
443
; CHECK-NEXT: // kill: def $d0 killed $d0 killed $q0
499
444
; CHECK-NEXT: bl sincos
@@ -517,12 +462,9 @@ define { <2 x double>, <2 x double> } @test_sincos_v2f64(<2 x double> %a) {
517
462
; NO-LIBCALL: // %bb.0:
518
463
; NO-LIBCALL-NEXT: sub sp, sp, #64
519
464
; NO-LIBCALL-NEXT: str d8, [sp, #48] // 8-byte Folded Spill
520
- ; NO-LIBCALL-NEXT: str x30, [sp, #56] // 8-byte Folded Spill
521
- ; NO-LIBCALL-NEXT: .cfi_def_cfa_offset 64
522
- ; NO-LIBCALL-NEXT: .cfi_offset w30, -8
523
- ; NO-LIBCALL-NEXT: .cfi_offset b8, -16
524
465
; NO-LIBCALL-NEXT: mov d8, v0.d[1]
525
466
; NO-LIBCALL-NEXT: str q0, [sp, #32] // 16-byte Folded Spill
467
+ ; NO-LIBCALL-NEXT: str x30, [sp, #56] // 8-byte Folded Spill
526
468
; NO-LIBCALL-NEXT: fmov d0, d8
527
469
; NO-LIBCALL-NEXT: bl sin
528
470
; NO-LIBCALL-NEXT: // kill: def $d0 killed $d0 def $q0
0 commit comments