Skip to content

Commit 482acab

Browse files
committed
Precommit test
1 parent d97566a commit 482acab

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

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

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

679+
define void @nosve_streaming_function(ptr %ptr) "target-features"="+sme" "aarch64_pstate_sm_enabled" {
680+
; CHECK-LABEL: define void @nosve_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+
; if the non-streaming function has no SVE.
691+
define void @nosve_non_streaming_caller_streaming_callee_dont_inline(ptr %ptr) "target-features"="+sme" {
692+
; CHECK-LABEL: define void @nosve_non_streaming_caller_streaming_callee_dont_inline
693+
; CHECK-SAME: (ptr [[PTR:%.*]]) #[[ATTR1]] {
694+
; CHECK-NEXT: store <vscale x 4 x i32> zeroinitializer, ptr [[PTR]], align 16
695+
; CHECK-NEXT: ret void
696+
;
697+
call void @nosve_streaming_function(ptr %ptr)
698+
ret void
699+
}
700+
679701
attributes #0 = { "target-features"="+sve,+sme" }

0 commit comments

Comments
 (0)