[all-commits] [llvm/llvm-project] 1e8c17: [AMDGPU] Allow folding to FMAMK with SGPR and imme...

Jay Foad via All-commits all-commits at lists.llvm.org
Wed Nov 15 02:58:14 PST 2023


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

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/test/CodeGen/AMDGPU/fmul-to-ldexp.ll

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

Allow foldImmediate to create instructions like:

  v_fmamk_f32 v0, s0, 0x42000000, v0

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