[PATCH] D118458: [AMDGPU] Add test for a problem with noclobber metadata

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 03:09:48 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGae68b3a45776: [AMDGPU] Add test for a problem with noclobber metadata (authored by foad).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118458/new/

https://reviews.llvm.org/D118458

Files:
  llvm/test/CodeGen/AMDGPU/global_smrd.ll


Index: llvm/test/CodeGen/AMDGPU/global_smrd.ll
===================================================================
--- llvm/test/CodeGen/AMDGPU/global_smrd.ll
+++ llvm/test/CodeGen/AMDGPU/global_smrd.ll
@@ -23,6 +23,24 @@
   ret void
 }
 
+; uniform loads before and after an aliasing store
+; FIXME: The second load should not be converted to an SMEM load!
+; CHECK-LABEL: @uniform_load_store_load
+; CHECK: s_load_dwordx4
+; CHECK: s_load_dword
+; CHECK: flat_store_dword
+; CHECK: s_load_dword
+; CHECK: flat_store_dword
+
+define amdgpu_kernel void @uniform_load_store_load(float addrspace(1)* %arg0, float addrspace(1)* %arg1) {
+bb:
+  %tmp2 = load float, float addrspace(1)* %arg0, !tbaa !8
+  store float %tmp2, float addrspace(1)* %arg1, !tbaa !8
+  %tmp3 = load float, float addrspace(1)* %arg0, !tbaa !8
+  store float %tmp3, float addrspace(1)* %arg1, !tbaa !8
+  ret void
+}
+
 ; non-uniform loads
 ; CHECK-LABEL: @non-uniform_load
 ; CHECK: flat_load_dword


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118458.404469.patch
Type: text/x-patch
Size: 971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220131/c536f41a/attachment.bin>


More information about the llvm-commits mailing list