[all-commits] [llvm/llvm-project] 3828ea: [AMDGPU] Divergence-driven instruction selection f...

Jay Foad via All-commits all-commits at lists.llvm.org
Wed Sep 22 01:36:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3828ea6181fd007438379de70fc7b9fc9c8dbb02
      https://github.com/llvm/llvm-project/commit/3828ea6181fd007438379de70fc7b9fc9c8dbb02
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SOPInstructions.td
    M llvm/lib/Target/AMDGPU/VOP3Instructions.td
    M llvm/test/CodeGen/AMDGPU/urem-seteq-illegal-types.ll
    M llvm/test/CodeGen/AMDGPU/vgpr-liverange-ir.ll
    M llvm/test/CodeGen/AMDGPU/wwm-reserved-spill.ll
    M llvm/test/CodeGen/AMDGPU/wwm-reserved.ll

  Log Message:
  -----------
  [AMDGPU] Divergence-driven instruction selection for mul i32

Differential Revision: https://reviews.llvm.org/D109881


  Commit: 0205806d0fe5706c76ae1756e9180918dd495446
      https://github.com/llvm/llvm-project/commit/0205806d0fe5706c76ae1756e9180918dd495446
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-09-22 (Wed, 22 Sep 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
    M llvm/test/CodeGen/AMDGPU/mad-mix.ll

  Log Message:
  -----------
  [AMDGPU] Convert mac/fmac to mad/fma when folding output modifiers

Use of output modifiers forces VOP3 encoding for a VOP2 mac/fmac
instruction, so we might as well convert it to the more flexible VOP3-
only mad/fma form.

With this change, the only way we should emit VOP3-encoded mac/fmac is
if regalloc chooses registers that require the VOP3 encoding, e.g. sgprs
for both src0 and src1. In all other cases the mac/fmac should either be
converted to mad/fma or shrunk to VOP2 encoding.

Differential Revision: https://reviews.llvm.org/D110156


Compare: https://github.com/llvm/llvm-project/compare/636fc0ef86f6...0205806d0fe5


More information about the All-commits mailing list