[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:08:22 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);
----------------
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.
================
Comment at: llvm/test/CodeGen/AMDGPU/cluster_stores.ll:8-10
+
+; DBG: Num BaseOps: {{[1-9]+}}, Offset: {{[0-9]+}}, OffsetIsScalable: {{[01]}}, Width: {{[1-9]+}}
+
----------------
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.
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