[PATCH] D117844: [AMDGPU] Prevent aliasing of SrcC and Dst in MAI

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 20 15:54:57 PST 2022


rampitec created this revision.
rampitec added reviewers: arsenm, foad, bcahoon, krzysz00.
Herald added subscribers: jeroen.dobbelaere, mstorsjo, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, mgorny, nhaehnle, jvesely, kzhuravl, qcolombet.
rampitec requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Form the MAI spec: It’s ok that Src_C and vDst are the exact same VGPRs
or Src_C and vDst are completely separated. The case that Src_C and vDst
are overlapping should be avoid as new value could be written to accumulator
input before it gets read.

Note that this inevitably increases register pressure to the point where
some programs will become uncompilable.

Fixes: SWDEV-318900


https://reviews.llvm.org/D117844

Files:
  llvm/lib/Target/AMDGPU/AMDGPU.h
  llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  llvm/lib/Target/AMDGPU/CMakeLists.txt
  llvm/lib/Target/AMDGPU/GCNPreRaFixups.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.h
  llvm/test/CodeGen/AMDGPU/acc-ldst.ll
  llvm/test/CodeGen/AMDGPU/llc-pipeline.ll
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.ll
  llvm/test/CodeGen/AMDGPU/mfma-no-register-aliasing.ll
  llvm/test/CodeGen/AMDGPU/schedule-xdl-resource.ll
  llvm/test/CodeGen/AMDGPU/spill-agpr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117844.401809.patch
Type: text/x-patch
Size: 18925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220120/38ade17a/attachment-0001.bin>


More information about the llvm-commits mailing list