Skip to content

Commit d97566a

Browse files
committed
[AArch64] NFC: Precommit test changes to sme-pstatesm-attrs.ll
The tests need feature attributes, in order for the inliner to make a more informed decision.
1 parent 66dd09a commit d97566a

File tree

2 files changed

+93
-89
lines changed

2 files changed

+93
-89
lines changed

llvm/test/Transforms/Inline/AArch64/sme-pstatesm-attrs-low-threshold.ll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
; However, if the call to @streaming_callee requires a streaming-mode change, it should always inline the call because the streaming-mode change is more expensive.
66
target triple = "aarch64"
77

8-
declare void @streaming_compatible_f() "aarch64_pstate_sm_compatible"
8+
declare void @streaming_compatible_f() #0 "aarch64_pstate_sm_compatible"
99

1010
; Function @streaming_callee doesn't contain any operations that may use ZA
1111
; state and therefore can be legally inlined into a normal function.
12-
define void @streaming_callee() "aarch64_pstate_sm_enabled" {
12+
define void @streaming_callee() #0 "aarch64_pstate_sm_enabled" {
1313
; CHECK-LABEL: define void @streaming_callee
1414
; CHECK-SAME: () #[[ATTR1:[0-9]+]] {
1515
; CHECK-NEXT: call void @streaming_compatible_f()
@@ -22,7 +22,7 @@ define void @streaming_callee() "aarch64_pstate_sm_enabled" {
2222
}
2323

2424
; Inline call to @streaming_callee to remove a streaming mode change.
25-
define void @non_streaming_caller_inline() {
25+
define void @non_streaming_caller_inline() #0 {
2626
; CHECK-LABEL: define void @non_streaming_caller_inline
2727
; CHECK-SAME: () #[[ATTR2:[0-9]+]] {
2828
; CHECK-NEXT: call void @streaming_compatible_f()
@@ -34,7 +34,7 @@ define void @non_streaming_caller_inline() {
3434
}
3535

3636
; Don't inline call to @streaming_callee when the inline-threshold is set to 1, because it does not eliminate a streaming-mode change.
37-
define void @streaming_caller_dont_inline() "aarch64_pstate_sm_enabled" {
37+
define void @streaming_caller_dont_inline() #0 "aarch64_pstate_sm_enabled" {
3838
; CHECK-LABEL: define void @streaming_caller_dont_inline
3939
; CHECK-SAME: () #[[ATTR1]] {
4040
; CHECK-NEXT: call void @streaming_callee()
@@ -43,3 +43,5 @@ define void @streaming_caller_dont_inline() "aarch64_pstate_sm_enabled" {
4343
call void @streaming_callee()
4444
ret void
4545
}
46+
47+
attributes #0 = { "target-features"="+sve,+sme" }

0 commit comments

Comments
 (0)