[llvm] [AArch64][PAC] Don't skip global legalization for AUTH_TCRETURN (PR #182513)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 07:04:42 PST 2026
================
@@ -0,0 +1,16 @@
+; RUN: llc --mattr=+pauth -filetype=asm < %s | FileCheck %s
+
+; CHECK: adrp x0, global
+; CHECK-NEXT: add x0, x0, :lo12:global
+; CHECK-NEXT: braaz x0
+
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32"
+target triple = "aarch64-unknown-linux-pauthtest"
+
+ at global = dso_local local_unnamed_addr global ptr null
+
+define dso_local void @foo() local_unnamed_addr {
+entry:
+ tail call void @global() [ "ptrauth"(i32 0, i64 0) ]
+ ret void
+}
----------------
atrosinenko wrote:
This test case looks over-reduced: if I understand the intention correctly, it looks like a rather strange way to express the following
```llvm
declare void @global()
define dso_local void @foo() local_unnamed_addr {
entry:
tail call void @global() [ "ptrauth"(i32 0, i64 0) ]
ret void
}
```
Though the latter is rejected by the verifier in the first place as a direct authenticated call:
```
Direct call cannot have a ptrauth bundle
tail call void @global() [ "ptrauth"(i32 0, i64 0) ]
llc: error: '<stdin>': input module cannot be verified
```
https://github.com/llvm/llvm-project/pull/182513
More information about the llvm-commits
mailing list