[llvm] [AMDGPU] Rewrite GFX12 SGPR hazard handling to dedicated pass (PR #118750)
Carl Ritson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 22 01:19:58 PST 2025
================
@@ -0,0 +1,331 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=amdgcn -mcpu=gfx1200 -verify-machineinstrs -run-pass post-RA-hazard-rec,amdgpu-wait-sgpr-hazards -o - %s | FileCheck -check-prefix=GCN %s
+
+--- |
+ @mem = internal unnamed_addr addrspace(4) constant [4 x <4 x i32>] [<4 x i32> <i32 0, i32 0, i32 0, i32 0>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>, <4 x i32> <i32 0, i32 0, i32 0, i32 0>]
+
+ define amdgpu_gs void @hazard_disable() #0 { ret void }
+ define amdgpu_cs void @hazard_calls() #1 { ret void }
+ define void @hazard_callee1() #1 { ret void }
+ define void @hazard_callee2() #1 { ret void }
+ define amdgpu_cs void @hazard_cull_vmem() #2 { ret void }
+ define amdgpu_cs void @hazard_cull_vmem2() #3 { ret void }
+ define amdgpu_cs void @hazard_cull_sample() #2 { ret void }
+ define amdgpu_cs void @hazard_cull_bvh() #2 { ret void }
+ define amdgpu_cs void @hazard_nocull_scratch() #2 { ret void }
+ define amdgpu_cs void @hazard_cull_global() #2 { ret void }
+ define amdgpu_cs void @hazard_nocull_flat() #2 { ret void }
+
+ attributes #0 = { "amdgpu-sgpr-hazard-wait"="0" }
----------------
perlfu wrote:
Added another test for this.
https://github.com/llvm/llvm-project/pull/118750
More information about the llvm-commits
mailing list