[PATCH] D157712: [AMDGPU] Auto-upgrade & pre-commit tests for D156301 and D157388

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 10:33:25 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/global_atomics_optimizer_fp.ll:15
+;
+  %result = atomicrmw fadd ptr addrspace(1) %ptr, float 4.0 seq_cst
+  ret void
----------------
you probably want to add some syncscopes to ensure they are preserved (maybe other metadata too)


================
Comment at: llvm/test/CodeGen/AMDGPU/global_atomics_optimizer_fp.ll:33-34
+;
+  %id.x = call i32 @llvm.amdgcn.workitem.id.x()
+  %divValue = bitcast i32 %id.x to float
+  %result = atomicrmw fadd ptr addrspace(1) %ptr, float %divValue seq_cst
----------------
you could also just use a regular function and use a function argument


================
Comment at: llvm/test/CodeGen/AMDGPU/global_atomics_optimizer_fp.ll:36
+  %result = atomicrmw fadd ptr addrspace(1) %ptr, float %divValue seq_cst
+  ret void
+}
----------------
Probably should test return and no return variants


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157712



More information about the llvm-commits mailing list