[all-commits] [llvm/llvm-project] f01f08: AMDGPU: Make v2f32 -> v2f16 legal when target supp...

Changpeng Fang via All-commits all-commits at lists.llvm.org
Thu May 15 15:09:43 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f01f08292e894a565baa1b2741b31fbcf53a18cb
      https://github.com/llvm/llvm-project/commit/f01f08292e894a565baa1b2741b31fbcf53a18cb
  Author: Changpeng Fang <changpeng.fang at amd.com>
  Date:   2025-05-15 (Thu, 15 May 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    A llvm/test/CodeGen/AMDGPU/fptrunc.v2f16.no.fast.math.ll
    R llvm/test/CodeGen/AMDGPU/fptrunc.v2f16.no.fast.path.ll

  Log Message:
  -----------
  AMDGPU: Make v2f32 -> v2f16 legal when target supports v_cvt_pk_f16_f32 (#139956)

If targets support v_cvt_pk_f16_f32 instruction, v2f32 -> v2f16 should
be legal. However, SelectionDAG does not allow us to specify the source
type in the legalization rules. To workaround this, we make FP_ROUND
Custom for v2f16 then set up v2f32 -> v2f16 to be legal during custom
lowering.

Fixes: SWDEV-532608 -- expected v_cvt_pk_f16_f32 was not generated.



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