Skip to content

Commit 737fc35

Browse files
committed
[FPEnv][AArch64] Correct strictfp test.
Correct strictfp tests to follow the rules documented in the LangRef: https://llvm.org/docs/LangRef.html#constrained-floating-point-intrinsics These tests needed the strictfp attribute added to some function definitions and some function calls. Test changes verified with D146845.
1 parent 0ef7437 commit 737fc35

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

llvm/test/CodeGen/AArch64/fp-intrinsics.ll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,56 +1479,56 @@ define fp128 @fpext_f128_f64(double %x) #0 {
14791479

14801480
; CHECK-LABEL: sin_v1f64:
14811481
; CHECK: bl sin
1482-
define <1 x double> @sin_v1f64(<1 x double> %x, <1 x double> %y) {
1482+
define <1 x double> @sin_v1f64(<1 x double> %x, <1 x double> %y) #0 {
14831483
%val = call <1 x double> @llvm.experimental.constrained.sin.v1f64(<1 x double> %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
14841484
ret <1 x double> %val
14851485
}
14861486

14871487
; CHECK-LABEL: cos_v1f64:
14881488
; CHECK: bl cos
1489-
define <1 x double> @cos_v1f64(<1 x double> %x, <1 x double> %y) {
1489+
define <1 x double> @cos_v1f64(<1 x double> %x, <1 x double> %y) #0 {
14901490
%val = call <1 x double> @llvm.experimental.constrained.cos.v1f64(<1 x double> %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
14911491
ret <1 x double> %val
14921492
}
14931493

14941494
; CHECK-LABEL: pow_v1f64:
14951495
; CHECK: bl pow
1496-
define <1 x double> @pow_v1f64(<1 x double> %x, <1 x double> %y) {
1496+
define <1 x double> @pow_v1f64(<1 x double> %x, <1 x double> %y) #0 {
14971497
%val = call <1 x double> @llvm.experimental.constrained.pow.v1f64(<1 x double> %x, <1 x double> %y, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
14981498
ret <1 x double> %val
14991499
}
15001500

15011501
; CHECK-LABEL: log_v1f64:
15021502
; CHECK: bl log
1503-
define <1 x double> @log_v1f64(<1 x double> %x, <1 x double> %y) {
1503+
define <1 x double> @log_v1f64(<1 x double> %x, <1 x double> %y) #0 {
15041504
%val = call <1 x double> @llvm.experimental.constrained.log.v1f64(<1 x double> %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
15051505
ret <1 x double> %val
15061506
}
15071507

15081508
; CHECK-LABEL: log2_v1f64:
15091509
; CHECK: bl log2
1510-
define <1 x double> @log2_v1f64(<1 x double> %x, <1 x double> %y) {
1510+
define <1 x double> @log2_v1f64(<1 x double> %x, <1 x double> %y) #0 {
15111511
%val = call <1 x double> @llvm.experimental.constrained.log2.v1f64(<1 x double> %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
15121512
ret <1 x double> %val
15131513
}
15141514

15151515
; CHECK-LABEL: log10_v1f64:
15161516
; CHECK: bl log10
1517-
define <1 x double> @log10_v1f64(<1 x double> %x, <1 x double> %y) {
1517+
define <1 x double> @log10_v1f64(<1 x double> %x, <1 x double> %y) #0 {
15181518
%val = call <1 x double> @llvm.experimental.constrained.log10.v1f64(<1 x double> %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
15191519
ret <1 x double> %val
15201520
}
15211521

15221522
; CHECK-LABEL: exp_v1f64:
15231523
; CHECK: bl exp
1524-
define <1 x double> @exp_v1f64(<1 x double> %x, <1 x double> %y) {
1524+
define <1 x double> @exp_v1f64(<1 x double> %x, <1 x double> %y) #0 {
15251525
%val = call <1 x double> @llvm.experimental.constrained.exp.v1f64(<1 x double> %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
15261526
ret <1 x double> %val
15271527
}
15281528

15291529
; CHECK-LABEL: exp2_v1f64:
15301530
; CHECK: bl exp2
1531-
define <1 x double> @exp2_v1f64(<1 x double> %x, <1 x double> %y) {
1531+
define <1 x double> @exp2_v1f64(<1 x double> %x, <1 x double> %y) #0 {
15321532
%val = call <1 x double> @llvm.experimental.constrained.exp2.v1f64(<1 x double> %x, metadata !"round.tonearest", metadata !"fpexcept.strict") #0
15331533
ret <1 x double> %val
15341534
}

llvm/test/CodeGen/AArch64/strictfp_f16_abi_promote.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ define void @outgoing_v4f16_return(ptr %ptr) #0 {
273273
; NOFP16-NEXT: strh w0, [x19]
274274
; NOFP16-NEXT: ldp x30, x19, [sp], #16 // 16-byte Folded Reload
275275
; NOFP16-NEXT: ret
276-
%val = call <4 x half> @v4f16_result()
276+
%val = call <4 x half> @v4f16_result() #0
277277
store <4 x half> %val, ptr %ptr
278278
ret void
279279
}
@@ -297,7 +297,7 @@ define void @outgoing_v8f16_return(ptr %ptr) #0 {
297297
; NOFP16-NEXT: strh w0, [x19]
298298
; NOFP16-NEXT: ldp x30, x19, [sp], #16 // 16-byte Folded Reload
299299
; NOFP16-NEXT: ret
300-
%val = call <8 x half> @v8f16_result()
300+
%val = call <8 x half> @v8f16_result() #0
301301
store <8 x half> %val, ptr %ptr
302302
ret void
303303
}
@@ -312,7 +312,7 @@ define half @call_split_type_used_outside_block_v8f16() #0 {
312312
; NOFP16-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
313313
; NOFP16-NEXT: ret
314314
bb0:
315-
%split.ret.type = call <8 x half> @v8f16_result()
315+
%split.ret.type = call <8 x half> @v8f16_result() #0
316316
br label %bb1
317317

318318
bb1:

0 commit comments

Comments
 (0)