[llvm] [AArch64][SME] Handle SME state around TLS-descriptor calls (PR #155608)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 08:58:47 PST 2025


================
@@ -162,6 +162,12 @@ getZAStateBeforeInst(const TargetRegisterInfo &TRI, MachineInstr &MI,
   if (MI.getOpcode() == AArch64::RequiresZASavePseudo)
     return {ZAState::LOCAL_SAVED, std::prev(InsertPt)};
 
+  // TLS-descriptor calls don't use the standard call lowering, so handle them
+  // as a special case here. Assume a private ZA interface.
+  if (MI.getOpcode() == AArch64::TLSDESC_CALLSEQ ||
+      MI.getOpcode() == AArch64::TLSDESC_AUTH_CALLSEQ)
----------------
MacDue wrote:

I've done that now, but the marker needs to be placed after the CALLSEQ (and an assert adjusted in the SME ABI pass). 

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


More information about the llvm-commits mailing list