[all-commits] [llvm/llvm-project] fdffea: [AMDGPU] Prefer packed minimum/maximum ops for two...

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Tue Sep 8 06:16:09 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fdffea81bc29094eb11eddf85309a6615c4f0049
      https://github.com/llvm/llvm-project/commit/fdffea81bc29094eb11eddf85309a6615c4f0049
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/VOP3PInstructions.td
    M llvm/test/CodeGen/AMDGPU/fmaximum3.ll
    M llvm/test/CodeGen/AMDGPU/fmaximum3.v2f16.ll
    M llvm/test/CodeGen/AMDGPU/fminimum3.ll
    M llvm/test/CodeGen/AMDGPU/fminimum3.v2f16.ll

  Log Message:
  -----------
  [AMDGPU] Prefer packed minimum/maximum ops for two-input ops (#215449)

A two-input f16 fminimum or fmaximum operation should translate to a
packed two-input minimum/maximum instruction when the target supports
one.

It currently can be selected through the minimum3/maximum3 fallback
pattern instead. That emits a three-input instruction with one input
operand duplicated.

Keep the fallback for nested min/max expressions that can use the real
three-input instruction. Add a higher-priority direct pattern for
non-nested two-input operations on targets with packed IEEE
minimum/maximum opcodes.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list