[llvm] [AMDGPU] Optimize out s_barrier_signal/_wait (PR #116993)

Piotr Sobczak via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 05:39:53 PST 2024


================
@@ -0,0 +1,55 @@
+; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1200 < %s | FileCheck %s
+; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1200 < %s | FileCheck %s
+
+; CHECK-LABEL: {{^}}signal_unknown_wgs:
+; CHECK: s_barrier_signal
+define amdgpu_kernel void @signal_unknown_wgs() {
+  tail call void @llvm.amdgcn.s.barrier.signal(i32 -1)
+  ret void
+}
+
+; CHECK-LABEL: {{^}}signal_flat_wgs_attr_32_128:
+; CHECK: s_barrier_signal
+define amdgpu_kernel void @signal_flat_wgs_attr_32_128() #1 {
+  tail call void @llvm.amdgcn.s.barrier.signal(i32 -1)
+  ret void
+}
+
+; CHECK-LABEL: {{^}}signal_flat_wgs_attr_16_32:
+; CHECK: :
+; CHECK-NEXT: s_endpgm
----------------
piotrAMD wrote:

Good point - regenerated check lines with update_llc_test_checks.py to make it more robust.

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


More information about the llvm-commits mailing list