[llvm] [AMDGPU][ASAN] Handle special GVs lowering in amdgpu-sw-lower-lds (PR #161827)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 3 08:40:19 PDT 2025
================
@@ -0,0 +1,241 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals all --version 6
+; RUN: opt < %s -passes=amdgpu-sw-lower-lds -S -amdgpu-asan-instrument-lds=false -mtriple=amdgcn-amd-amdhsa | FileCheck %s
+; RUN: llc < %s -enable-new-pm -stop-after=amdgpu-sw-lower-lds -amdgpu-asan-instrument-lds=false -mtriple=amdgcn-amd-amdhsa | FileCheck %s
+
+; This test checks that named barriers in LDS and other LDS in moduleare lowered correctly by the
+; amdgpu-sw-lower-lds pass.
+ at bar2 = internal addrspace(3) global target("amdgcn.named.barrier", 0) poison
----------------
skc7 wrote:
AFAIU, LDS globals with TargetExtType and name as "amdgcn.named.barrier" are called named barriers in backend.
This test in particular, has a static LDS global with kernel accessing it directly and also in-directly using device functions. So, the IR generated has asan specific lowering handling all the scenarios. And, named barrier LDS are lowered following lower-module-lds pass.
https://github.com/llvm/llvm-project/pull/161827
More information about the llvm-commits
mailing list