[llvm] 28345d7 - [amdgpu] Add regression test for LDS in metadata
Jon Chesterfield via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 13 05:35:59 PST 2021
Author: Jon Chesterfield
Date: 2021-12-13T13:35:38Z
New Revision: 28345d7f6fc220c9a001f0ecb5fee634276abfd1
URL: https://github.com/llvm/llvm-project/commit/28345d7f6fc220c9a001f0ecb5fee634276abfd1
DIFF: https://github.com/llvm/llvm-project/commit/28345d7f6fc220c9a001f0ecb5fee634276abfd1.diff
LOG: [amdgpu] Add regression test for LDS in metadata
Added:
llvm/test/CodeGen/AMDGPU/lower-module-lds-check-metadata.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds-check-metadata.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds-check-metadata.ll
new file mode 100644
index 0000000000000..e6ca5bb9472f2
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds-check-metadata.ll
@@ -0,0 +1,23 @@
+; RUN: llc -mcpu=gfx906 -o - < %s | FileCheck --check-prefix=CHECK %s
+target triple = "amdgcn-amd-amdhsa"
+
+; Check the group segment has size 4, not zero.
+; CHECK: .amdhsa_kernel __device_start
+; CHECK: .amdhsa_group_segment_fixed_size 4
+; CHECK: .end_amdhsa_kernel
+
+ at global_barrier_state = hidden addrspace(3) global i32 undef, align 4
+
+define i32 @rw() #0 {
+entry:
+ %0 = atomicrmw add i32 addrspace(3)* @global_barrier_state, i32 1 acq_rel, align 4
+ ret i32 %0
+}
+
+define amdgpu_kernel void @__device_start() {
+entry:
+ %0 = call i32 @rw()
+ ret void
+}
+
+attributes #0 = { noinline }
More information about the llvm-commits
mailing list