[all-commits] [llvm/llvm-project] 0d4083: [AMDGPU] Allow folding to FMAAK with SGPR and imme...

Jay Foad via All-commits all-commits at lists.llvm.org
Tue Nov 28 06:36:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0d408317650930d550e6bc88cdf9ff3d03557495
      https://github.com/llvm/llvm-project/commit/0d408317650930d550e6bc88cdf9ff3d03557495
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/test/CodeGen/AMDGPU/code-size-estimate.ll
    M llvm/test/CodeGen/AMDGPU/fma.f16.ll
    M llvm/test/CodeGen/AMDGPU/madak.ll

  Log Message:
  -----------
  [AMDGPU] Allow folding to FMAAK with SGPR and immediate operand on GFX10+ (#72266)

Allow foldImmediate to create instructions like:

  v_fmaak_f32 v0, s0, v0, 0x42000000

This instruction has two "scalar values": s0 and 0x42000000. On GFX10+
this is allowed. This fold was originally implemented before the
compiler supported GFX10, when all ASICs were limited to one scalar
value.




More information about the All-commits mailing list