[llvm] [AArch64][SME2] Extend SMEABIPass to handle functions with new ZT0 state (PR #78848)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 04:13:02 PST 2024
================
@@ -164,18 +164,25 @@ define void @zt0_in_caller_zt0_new_callee() "aarch64_in_zt0" nounwind {
define void @zt0_new_caller() "aarch64_new_zt0" nounwind {
; CHECK-LABEL: zt0_new_caller:
; CHECK: // %bb.0: // %prelude
-; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
+; CHECK-NEXT: sub sp, sp, #80
+; CHECK-NEXT: str x30, [sp, #64] // 8-byte Folded Spill
; CHECK-NEXT: mrs x8, TPIDR2_EL0
; CHECK-NEXT: cbz x8, .LBB6_2
; CHECK-NEXT: // %bb.1: // %save.za
+; CHECK-NEXT: mov x8, sp
+; CHECK-NEXT: str zt0, [x8]
+; CHECK-NEXT: smstop za
----------------
sdesmalen-arm wrote:
I don't think it's valid to `smstop za` before caling `__arm_tpidr2_save` if there is an active lazy-save buffer set up. This leads to a state that is not defined in the ABI.
https://github.com/llvm/llvm-project/pull/78848
More information about the llvm-commits
mailing list