[llvm] Attributor: Infer noalias.addrspace metadata for memory instructions (PR #136553)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue May 6 11:13:32 PDT 2025
================
@@ -0,0 +1,497 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=amdgpu-attributor %s | FileCheck %s
+
+ at gptr = protected addrspace(1) externally_initialized global i32 0, align 4
+
+define amdgpu_kernel void @no_alias_addr_space_select(ptr addrspace(3) %sptr, i1 %cond1, i1 %cond2, i32 %val, i32 %offset) #0 {
----------------
shiltian wrote:
I think you also need to test a leaf device function with a flat pointer and then the function is called both directly and indirectly with different potential underlying objects and check whether it can infer the metadata correctly. Having everything in one kernel is less interesting.
https://github.com/llvm/llvm-project/pull/136553
More information about the llvm-commits
mailing list