[all-commits] [llvm/llvm-project] 400ce1: [AMDGPU] Support AMDGPUClamp for bf16 on gfx1250 (...

Changpeng Fang via All-commits all-commits at lists.llvm.org
Fri Jul 25 12:13:28 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 400ce1a3d36fa513a88c9b336c77c46ae829049f
      https://github.com/llvm/llvm-project/commit/400ce1a3d36fa513a88c9b336c77c46ae829049f
  Author: Changpeng Fang <changpeng.fang at amd.com>
  Date:   2025-07-25 (Fri, 25 Jul 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/lib/Target/AMDGPU/SIInstrInfo.td
    M llvm/lib/Target/AMDGPU/SIInstructions.td
    M llvm/lib/Target/AMDGPU/VOP3PInstructions.td
    M llvm/test/CodeGen/AMDGPU/bf16-math.ll
    M llvm/test/CodeGen/AMDGPU/mad-mix-hi-bf16.ll
    M llvm/test/CodeGen/AMDGPU/mad-mix-lo-bf16.ll

  Log Message:
  -----------
  [AMDGPU] Support AMDGPUClamp for bf16 on gfx1250 (#150663)

Scalar version uses V_MAX_BF16_PSEUDO which is expanded to V_PK_MAX_BF16
with unused high bits. If V_PK_MAX_BF16 is produced directly instead
that creates problem with folding of the clamp into other scalar
instructions due to incompatible clamp bits.

FIXME-TRUE16: enable bf16 clamp with true16

---------

Co-authored-by: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>



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