[llvm-branch-commits] [llvm] [AMDGPU] Enable atomic optimizer for divergent i64 and double values (PR #96934)

Jay Foad via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jul 1 03:23:58 PDT 2024


================
@@ -230,8 +245,7 @@ void AMDGPUAtomicOptimizerImpl::visitAtomicRMWInst(AtomicRMWInst &I) {
   // value to the atomic calculation. We can only optimize divergent values if
   // we have DPP available on our subtarget, and the atomic operation is 32
   // bits.
-  if (ValDivergent &&
-      (!ST->hasDPP() || DL->getTypeSizeInBits(I.getType()) != 32)) {
+  if (ValDivergent && (!ST->hasDPP() || !isOptimizableAtomic(I.getType()))) {
----------------
jayfoad wrote:

Pre-existing problem: this `hasDPP` check is in the wrong place. It should only be tested if we're using the DPP strategy.

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


More information about the llvm-branch-commits mailing list