[llvm] 0d4d86c - [AMDGPU] Precommit test for D79481. NFC
Carl Ritson via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 03:02:38 PDT 2020
Author: Carl Ritson
Date: 2020-05-07T19:01:51+09:00
New Revision: 0d4d86cbd19603e8919701a3b58c5f1c002a9736
URL: https://github.com/llvm/llvm-project/commit/0d4d86cbd19603e8919701a3b58c5f1c002a9736
DIFF: https://github.com/llvm/llvm-project/commit/0d4d86cbd19603e8919701a3b58c5f1c002a9736.diff
LOG: [AMDGPU] Precommit test for D79481. NFC
Test shows unnecessary s_waitcnt between shader exports.
Added:
Modified:
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.exp.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.exp.ll b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.exp.ll
index cdfe9b460a01..1bbd209c21af 100644
--- a/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.exp.ll
+++ b/llvm/test/CodeGen/AMDGPU/llvm.amdgcn.exp.ll
@@ -540,5 +540,23 @@ end:
ret void
}
+; GCN-LABEL: {{^}}test_export_clustering:
+; GCN-DAG: v_mov_b32_e32 [[W0:v[0-9]+]], 0
+; GCN-DAG: v_mov_b32_e32 [[X:v[0-9]+]], s0
+; GCN-DAG: v_mov_b32_e32 [[Y:v[0-9]+]], s1
+; GCN-DAG: v_add_f32_e32 [[Z0:v[0-9]+]]
+; GCN-DAG: exp param0 [[X]], [[Y]], [[Z0]], [[W0]]{{$}}
+; GCN-DAG: v_sub_f32_e32 [[Z1:v[0-9]+]]
+; GCN: s_waitcnt expcnt(0)
+; GCN: v_mov_b32_e32 [[W1:v[0-9]+]], 1.0
+; GCN: exp param1 [[X]], [[Y]], [[Z1]], [[W1]] done{{$}}
+define amdgpu_kernel void @test_export_clustering(float %x, float %y) #0 {
+ %z0 = fadd float %x, %y
+ call void @llvm.amdgcn.exp.f32(i32 32, i32 15, float %x, float %y, float %z0, float 0.0, i1 false, i1 false)
+ %z1 = fsub float %y, %x
+ call void @llvm.amdgcn.exp.f32(i32 33, i32 15, float %x, float %y, float %z1, float 1.0, i1 true, i1 false)
+ ret void
+}
+
attributes #0 = { nounwind }
attributes #1 = { nounwind inaccessiblememonly }
More information about the llvm-commits
mailing list