[clang] [llvm] [ARM][AArch64] BTI, GCS, PAC Module flag update. (PR #86212)
Daniel Kiss via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 8 10:03:53 PDT 2024
================
@@ -0,0 +1,35 @@
+; This file contains the new semantic of the branch-target-enforcement, sign-return-address.
+; Used for test mixing a mixed link case and also verify the import too in llc.
+
+; RUN: llc %s -o - | FileCheck %s
+
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64-unknown-linux-gnu"
+
+define dso_local void @bar() #0 {
+entry:
+ ret void
+}
+; CHECK-LABEL: bar:
----------------
DanielKristofKiss wrote:
`bar` could come from a function that is decorated with `__attribute__((branch-protection=none))` while the file compiled with `-mbranch-protection=bti+pac-ret+b_key`.
Frontend already assigns the function attributes so in this case we want bar to not have any pac instruction.
https://github.com/llvm/llvm-project/pull/86212
More information about the cfe-commits
mailing list