[PATCH] D156301: [AMDGPU] Support FAdd/FSub global atomics in AMDGPUAtomicOptimizer.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 02:23:31 PDT 2023


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp:391-392
+  Type *Int32Ty = B.getInt32Ty();
+  bool isAtomicFloatingPointTy = AtomicTy->isFloatingPointTy();
+  Type *UpdateDPPTy = isAtomicFloatingPointTy ? Int32Ty : AtomicTy;
+
----------------
Simplify this, here and in other functions


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp:545
     Value *Old = V;
+    if (isAtomicFloatingPointTy) {
+      V = B.CreateBitCast(V, Int32Ty);
----------------
Do these bitcasts unconditionally, here and below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D156301



More information about the llvm-commits mailing list