[llvm] [AMDGPU][Attributor] Stop inferring amdgpu-no-flat-scratch-init in sanitized functions. (PR #161319)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 30 05:00:36 PDT 2025


================
@@ -0,0 +1,17 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals all --version 4
+; RUN: opt -S -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx90a -passes=amdgpu-attributor %s | FileCheck %s
+
+ at lds_1 = internal addrspace(3) global [1 x i8] poison, align 4
+
+; CHECK-LABEL: @k0
+define amdgpu_kernel void @k0() #0 {
+  store i8 7, ptr addrspace(3) @lds_1, align 4
+  ret void
+}
+
+attributes #0 = { sanitize_address}
+
+!llvm.module.flags = !{!0}
+!0 = !{i32 4, !"nosanitize_address", i32 1}
+
+; CHECK-NOT: attributes {{.*}} = {{.*}} amdgpu-no-flat-scratch-init
----------------
skc7 wrote:

Updated. Thanks.

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


More information about the llvm-commits mailing list