[PATCH] D81649: [AMDGPU/MemOpsCluster] Compute `width` for `MIMG` instruction class.

Mahesha S via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 03:40:37 PDT 2020


hsmhsm marked 2 inline comments as done.
hsmhsm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:398-399
+    // Get appropriate operand, and compute width accordingly.
+    DataOpIdx = AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::vdst);
+    if (DataOpIdx == -1)
+      DataOpIdx = AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::vdata);
----------------
hsmhsm wrote:
> foad wrote:
> > Do you need this bit? Does it work if you just use "vdata" for all MIMG instructions?
> I do not know much about MIMG instructions, I added it based on my experience of dealing with other instructions. If you confirm only "vdata" is needed, then, I will update it.
Done


================
Comment at: llvm/test/CodeGen/AMDGPU/cluster_stores.ll:8-10
+
+; DBG: Num BaseOps: {{[1-9]+}}, Offset: {{[0-9]+}}, OffsetIsScalable: {{[01]}}, Width: {{[1-9]+}}
+
----------------
hsmhsm wrote:
> hsmhsm wrote:
> > foad wrote:
> > > I don't think this really adds any value to the test, unless you're going to check for specific numbers like "Width: 4" or similar?
> > I can do that by extracting width by dbg dump, and updating the same in the test.
> Morever, to clarify, my intension here was to test that `Width` is greather than 0 (should not be 0)
Done


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81649





More information about the llvm-commits mailing list