[llvm] [AArch64] SME implementation for agnostic-ZA functions (PR #120150)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 23 07:22:43 PST 2024
================
@@ -159,18 +221,104 @@ entry:
; [ ] S -> N
; [ ] S -> Z
; [x] S -> S
+; [ ] S -> A
define void @shared_za_caller_shared_za_callee_inline() "aarch64_inout_za" {
; CHECK-LABEL: define void @shared_za_caller_shared_za_callee_inline
; CHECK-SAME: () #[[ATTR1]] {
; CHECK-NEXT: entry:
+; CHECK-NEXT: call void asm sideeffect "
+; CHECK-NEXT: call void @inlined_body()
+; CHECK-NEXT: ret void
+;
+entry:
+ call void @shared_za_callee()
+ ret void
+}
+
+; [ ] S -> N
+; [ ] S -> Z
+; [ ] S -> S
+; [x] S -> A
+define void @shared_za_caller_agnostic_za_callee_inline() "aarch64_inout_za" {
+; CHECK-LABEL: define void @shared_za_caller_agnostic_za_callee_inline
+; CHECK-SAME: () #[[ATTR1]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: call void asm sideeffect "
; CHECK-NEXT: call void @inlined_body()
; CHECK-NEXT: ret void
;
+entry:
+ call void @agnostic_za_callee()
+ ret void
+}
+
+; [x] A -> N
+; [ ] A -> Z
+; [ ] A -> S
+; [ ] A -> A
+define void @agnostic_za_caller_nonza_callee_dont_inline() "aarch64_za_state_agnostic" {
+; CHECK-LABEL: define void @agnostic_za_caller_nonza_callee_dont_inline
+; CHECK-SAME: () #[[ATTR3]] {
+; CHECK-NEXT: entry:
+; CHECK-NEXT: call void @nonza_callee()
+; CHECK-NEXT: ret void
+;
+entry:
+ call void @nonza_callee()
+ ret void
+}
+
+; [ ] A -> N
+; [x] A -> Z
+; [ ] A -> S
+; [ ] A -> A
+define void @agnostic_za_caller_now_za_callee_dont_inline() "aarch64_za_state_agnostic" {
----------------
paulwalker-arm wrote:
s/now/new/
https://github.com/llvm/llvm-project/pull/120150
More information about the llvm-commits
mailing list