[PATCH] D127869: [AMDGPU] Change use null for dead sdst to be gfx1030+

David Stuttard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 15 08:52:54 PDT 2022


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

Pre gfx1030 null for sdst is different.
c97436f8b6e2 <https://reviews.llvm.org/rGc97436f8b6e2718286e8496faf53a2c800e281cf> [AMDGPU] Use null for dead sdst operand - requires a change to make
it not apply to pre gfx1030


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127869

Files:
  llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp


Index: llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@ -690,9 +690,9 @@
   return nullptr;
 }
 
-// If an instruction has dead sdst replace it with NULL register on gfx10+
+// If an instruction has dead sdst replace it with NULL register on gfx1030+
 bool SIShrinkInstructions::tryReplaceDeadSDST(MachineInstr &MI) const {
-  if (ST->getGeneration() < AMDGPUSubtarget::GFX10)
+  if (!ST->hasGFX10_3Insts())
     return false;
 
   MachineOperand *Op = TII->getNamedOperand(MI, AMDGPU::OpName::sdst);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127869.437198.patch
Type: text/x-patch
Size: 675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220615/4b99a85c/attachment.bin>


More information about the llvm-commits mailing list