[llvm] [AArch64] Dont inline streaming fn into non-streaming caller (PR #150595)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 25 08:43:23 PDT 2025


================
@@ -583,67 +583,67 @@ entry:
 
 
 
-declare void @streaming_body() "aarch64_pstate_sm_enabled"
+declare void @nonstreaming_body()
 
-define void @streaming_caller_single_streaming_callee() #0  "aarch64_pstate_sm_enabled" {
-; CHECK-LABEL: define void @streaming_caller_single_streaming_callee
-; CHECK-SAME: () #[[ATTR7]] {
-; CHECK-NEXT:    call void @streaming_body()
+define void @nonstreaming_caller_single_nonstreaming_callee() #0 {
+; CHECK-LABEL: define void @nonstreaming_caller_single_nonstreaming_callee
+; CHECK-SAME: () #[[ATTR1]] {
+; CHECK-NEXT:    call void @nonstreaming_body()
 ; CHECK-NEXT:    ret void
 ;
-  call void @streaming_body()
+  call void @nonstreaming_body()
   ret void
 }
 
-define void @streaming_caller_multiple_streaming_callees() #0  "aarch64_pstate_sm_enabled" {
-; CHECK-LABEL: define void @streaming_caller_multiple_streaming_callees
-; CHECK-SAME: () #[[ATTR7]] {
-; CHECK-NEXT:    call void @streaming_body()
-; CHECK-NEXT:    call void @streaming_body()
+define void @nonstreaming_caller_multiple_nonstreaming_callees() #0 {
+; CHECK-LABEL: define void @nonstreaming_caller_multiple_nonstreaming_callees
+; CHECK-SAME: () #[[ATTR1]] {
+; CHECK-NEXT:    call void @nonstreaming_body()
+; CHECK-NEXT:    call void @nonstreaming_body()
 ; CHECK-NEXT:    ret void
 ;
-  call void @streaming_body()
-  call void @streaming_body()
+  call void @nonstreaming_body()
+  call void @nonstreaming_body()
   ret void
 }
 
 ; Allow inlining, as inline it would not increase the number of streaming-mode changes.
-define void @streaming_caller_single_streaming_callee_inline() #0  {
+define void @streaming_caller_single_streaming_callee_inline() #0 "aarch64_pstate_sm_enabled" {
 ; CHECK-LABEL: define void @streaming_caller_single_streaming_callee_inline
-; CHECK-SAME: () #[[ATTR6]] {
-; CHECK-NEXT:    call void @streaming_body()
+; CHECK-SAME: () #[[ATTR2]] {
+; CHECK-NEXT:    call void @nonstreaming_body()
 ; CHECK-NEXT:    ret void
 ;
-  call void @streaming_caller_single_streaming_callee()
+  call void @nonstreaming_caller_single_nonstreaming_callee()
   ret void
 }
 
 ; Prevent inlining, as inline it would lead to multiple streaming-mode changes.
-define void @streaming_caller_multiple_streaming_callees_dont_inline() #0  {
-; CHECK-LABEL: define void @streaming_caller_multiple_streaming_callees_dont_inline
-; CHECK-SAME: () #[[ATTR6]] {
-; CHECK-NEXT:    call void @streaming_caller_multiple_streaming_callees()
+define void @nonstreaming_caller_multiple_nonstreaming_callees_dont_inline() #0 "aarch64_pstate_sm_enabled" {
----------------
MacDue wrote:

Is `aarch64_pstate_sm_enabled` intentional here? The function is `nonstreaming_caller`, so I'd guess not? Generally, I'd prefer that the precommit does not change any existing tests other than adding new cases (since it makes it harder to tell what's changed due to the LLVM change). If tests need tweaking, I'd be more obvious to see why as a commit after the LLVM change.

https://github.com/llvm/llvm-project/pull/150595


More information about the llvm-commits mailing list