Skip to content

Commit 3251573

Browse files
committed
Precommit test
1 parent 254bfe2 commit 3251573

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,4 +676,46 @@ define void @streaming_caller_multiple_streaming_compatible_callees_inline() #0
676676
ret void
677677
}
678678

679+
define void @simple_streaming_function(ptr %ptr) #0 "aarch64_pstate_sm_enabled" {
680+
; CHECK-LABEL: define void @simple_streaming_function
681+
; CHECK-SAME: (ptr [[PTR:%.*]]) #[[ATTR2]] {
682+
; CHECK-NEXT: store <vscale x 4 x i32> zeroinitializer, ptr [[PTR]], align 16
683+
; CHECK-NEXT: ret void
684+
;
685+
store <vscale x 4 x i32> zeroinitializer, ptr %ptr
686+
ret void
687+
}
688+
689+
; Don't allow inlining a streaming function into a non-streaming function.
690+
define void @non_streaming_caller_streaming_callee_dont_inline(ptr %ptr) #0 {
691+
; CHECK-LABEL: define void @non_streaming_caller_streaming_callee_dont_inline
692+
; CHECK-SAME: (ptr [[PTR:%.*]]) #[[ATTR1]] {
693+
; CHECK-NEXT: store <vscale x 4 x i32> zeroinitializer, ptr [[PTR]], align 16
694+
; CHECK-NEXT: ret void
695+
;
696+
call void @simple_streaming_function(ptr %ptr)
697+
ret void
698+
}
699+
700+
define void @simple_locally_streaming_function(ptr %ptr) #0 "aarch64_pstate_sm_body" {
701+
; CHECK-LABEL: define void @simple_locally_streaming_function
702+
; CHECK-SAME: (ptr [[PTR:%.*]]) #[[ATTR3]] {
703+
; CHECK-NEXT: store <vscale x 4 x i32> zeroinitializer, ptr [[PTR]], align 16
704+
; CHECK-NEXT: ret void
705+
;
706+
store <vscale x 4 x i32> zeroinitializer, ptr %ptr
707+
ret void
708+
}
709+
710+
; Don't allow inlining a locally-streaming function into a non-streaming function.
711+
define void @non_streaming_caller_locally_streaming_callee_dont_inline(ptr %ptr) #0 {
712+
; CHECK-LABEL: define void @non_streaming_caller_locally_streaming_callee_dont_inline
713+
; CHECK-SAME: (ptr [[PTR:%.*]]) #[[ATTR1]] {
714+
; CHECK-NEXT: store <vscale x 4 x i32> zeroinitializer, ptr [[PTR]], align 16
715+
; CHECK-NEXT: ret void
716+
;
717+
call void @simple_locally_streaming_function(ptr %ptr)
718+
ret void
719+
}
720+
679721
attributes #0 = { "target-features"="+sve,+sme" }

0 commit comments

Comments
 (0)