[PATCH] D124843: AMDGPU: Add G_AMDGPU_MAD_64_32 instructions

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 05:11:26 PDT 2022


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

These generic instructions are trivially selected to
V_MAD_[IU]64_[IU]32 instructions when run on the VALU.

When at least both factors are scalar, it is usually better to execute
some or all of the instruction on the SALU. To this end, we lower the
instruction to simpler instructions that are supported on the SALU
when applying the register bank mapping.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124843

Files:
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
  llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
  llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.h
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-mad_64_32.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mad_64_32.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124843.426653.patch
Type: text/x-patch
Size: 51744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220503/8f9d7e46/attachment.bin>


More information about the llvm-commits mailing list