[PATCH] D51969: [AMDGPU] Add an AMDGPU specific atomic optimizer.

Neil Henning via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 24 07:21:20 PDT 2018


sheredom added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp:139-140
+
+  const unsigned PtrIdx = 0;
+  const unsigned ValIdx = 1;
+
----------------
arsenm wrote:
> You can use I.getPointerOperand/getValOperand
So I had that originally - but because I am using ValIdx so that I can have a single optimizeAtomic call that works for atomicrmw insts and our atomic intrinsics, I thought this was slightly nicer overall.


https://reviews.llvm.org/D51969





More information about the llvm-commits mailing list