[llvm] [MTE] Allow stack history for API level >=35 (PR #110328)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 14:16:43 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: Florian Mayer (fmayer)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/110328.diff
5 Files Affected:
- (modified) llvm/lib/Target/AArch64/AArch64StackTagging.cpp (+2-3)
- (modified) llvm/test/CodeGen/AArch64/stack-tagging-dbg-assign-tag-offset.ll (+1-1)
- (modified) llvm/test/CodeGen/AArch64/stack-tagging-dbg-declare-tag-offset.ll (+1-1)
- (modified) llvm/test/CodeGen/AArch64/stack-tagging-dbg-value-tag-offset-nopad.ll (+1-1)
- (modified) llvm/test/CodeGen/AArch64/stack-tagging-prologue.ll (+1-1)
``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
index 72823fdcd858df..1d2b2573778283 100644
--- a/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
+++ b/llvm/lib/Target/AArch64/AArch64StackTagging.cpp
@@ -487,12 +487,11 @@ Instruction *AArch64StackTagging::insertBaseTaggedPointer(
IRB.CreateCall(IRG_SP, {Constant::getNullValue(IRB.getInt64Ty())});
Base->setName("basetag");
auto TargetTriple = Triple(M.getTargetTriple());
- // This is not a stable ABI for now, so only allow in dev builds with API
- // level 10000.
+ // This ABI will make it into Android API level 35.
// The ThreadLong format is the same as with HWASan, but the entries for
// stack MTE take two slots (16 bytes).
if (ClRecordStackHistory == instr && TargetTriple.isAndroid() &&
- TargetTriple.isAArch64() && !TargetTriple.isAndroidVersionLT(10000) &&
+ TargetTriple.isAArch64() && !TargetTriple.isAndroidVersionLT(35) &&
!AllocasToInstrument.empty()) {
constexpr int StackMteSlot = -3;
constexpr uint64_t TagMask = 0xFULL << 56;
diff --git a/llvm/test/CodeGen/AArch64/stack-tagging-dbg-assign-tag-offset.ll b/llvm/test/CodeGen/AArch64/stack-tagging-dbg-assign-tag-offset.ll
index a48a885a6c68e0..1e78e98bb78b28 100644
--- a/llvm/test/CodeGen/AArch64/stack-tagging-dbg-assign-tag-offset.ll
+++ b/llvm/test/CodeGen/AArch64/stack-tagging-dbg-assign-tag-offset.ll
@@ -3,7 +3,7 @@
source_filename = "test.ll"
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
-target triple = "aarch64--linux-android10000"
+target triple = "aarch64--linux-android35"
declare void @g(ptr, ptr, ptr, ptr, ptr, ptr)
diff --git a/llvm/test/CodeGen/AArch64/stack-tagging-dbg-declare-tag-offset.ll b/llvm/test/CodeGen/AArch64/stack-tagging-dbg-declare-tag-offset.ll
index e0efd37aad2c00..a2e6096d8cb920 100644
--- a/llvm/test/CodeGen/AArch64/stack-tagging-dbg-declare-tag-offset.ll
+++ b/llvm/test/CodeGen/AArch64/stack-tagging-dbg-declare-tag-offset.ll
@@ -6,7 +6,7 @@
; RUN: opt --try-experimental-debuginfo-iterators -aarch64-stack-tagging -stack-tagging-record-stack-history=instr -S -o - %s | FileCheck %s
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
-target triple = "aarch64--linux-android10000"
+target triple = "aarch64--linux-android35"
declare void @g(ptr, ptr, ptr, ptr, ptr, ptr)
diff --git a/llvm/test/CodeGen/AArch64/stack-tagging-dbg-value-tag-offset-nopad.ll b/llvm/test/CodeGen/AArch64/stack-tagging-dbg-value-tag-offset-nopad.ll
index 093ddd3be3a56e..dc7c4039a44d24 100644
--- a/llvm/test/CodeGen/AArch64/stack-tagging-dbg-value-tag-offset-nopad.ll
+++ b/llvm/test/CodeGen/AArch64/stack-tagging-dbg-value-tag-offset-nopad.ll
@@ -1,7 +1,7 @@
; RUN: opt -aarch64-stack-tagging -stack-tagging-record-stack-history=instr -S -o - %s | 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-android10000"
+target triple = "aarch64-unknown-linux-android35"
define dso_local void @f() sanitize_memtag !dbg !14 {
%a1 = alloca i128, align 4
diff --git a/llvm/test/CodeGen/AArch64/stack-tagging-prologue.ll b/llvm/test/CodeGen/AArch64/stack-tagging-prologue.ll
index 40bc8bdd70703a..3eed6d45c77102 100644
--- a/llvm/test/CodeGen/AArch64/stack-tagging-prologue.ll
+++ b/llvm/test/CodeGen/AArch64/stack-tagging-prologue.ll
@@ -4,7 +4,7 @@
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
-target triple = "aarch64--linux-android10000"
+target triple = "aarch64--linux-android35"
declare void @use32(ptr)
``````````
</details>
https://github.com/llvm/llvm-project/pull/110328
More information about the llvm-commits
mailing list