[PATCH] D130040: [AMDGPU] Remove old operand from VOPC DPP

Joe Nash via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 13:51:27 PDT 2022


Joe_Nash created this revision.
Joe_Nash added reviewers: foad, arsenm, alex-t, vpykhtin, rampitec.
Herald added subscribers: kosarev, jsilvanus, kerbowa, kbarton, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, nemanjai, kzhuravl.
Herald added a project: All.
Joe_Nash requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

For most DPP instructions, the old operand stores the value that was in
the current lane before the DPP operation, and is tied to the
destination. For VOPC DPP, this is unnecessary and incorrect.

There appears to have been a latent bug related to D122737 <https://reviews.llvm.org/D122737> with
SIInstrInfo::isOperandLegal. If you checked if a register operand was legal
when the InstructionDesc expected an immediate, it reported that is valid.
Its fix is necessary for and tested in this patch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130040

Files:
  llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
  llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
  llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.td
  llvm/lib/Target/AMDGPU/VOPCInstructions.td
  llvm/test/CodeGen/AMDGPU/vopc_dpp.ll
  llvm/test/CodeGen/AMDGPU/vopc_dpp.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130040.445616.patch
Type: text/x-patch
Size: 21182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220718/151abc32/attachment.bin>


More information about the llvm-commits mailing list