[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
Thu Jun 16 01:19:22 PDT 2022


dstuttard marked 3 inline comments as done.
dstuttard added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp:695
 bool SIShrinkInstructions::tryReplaceDeadSDST(MachineInstr &MI) const {
-  if (ST->getGeneration() < AMDGPUSubtarget::GFX10)
+  if (!ST->hasGFX10_3Insts())
     return false;
----------------
rampitec wrote:
> This should be allowed on gfx11 as well, I suppose. I.e. we may need a new subtarget function if null can be used as an sdst and alike.
gfx11 also has FeatureGFX10_3Insts so is covered with this change.

However, do you think a new subtarget function would be better? I was undecided. The current change works for now - if I submit this one and we decide to implement a new subtarget function that can go in as a separate commit?


================
Comment at: llvm/test/CodeGen/AMDGPU/mad_u64_u32.ll:18
 ; GFX11-NEXT:    v_mov_b32_e32 v4, v0
 ; GFX11-NEXT:    v_mad_u64_u32 v[0:1], null, v4, v3, v[2:3]
 ; GFX11-NEXT:    ; return to shader part epilog
----------------
rampitec wrote:
> This is strange, I do not see FeatureGFX10_3Insts listed for gfx11.
Yes, it is there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127869



More information about the llvm-commits mailing list