[all-commits] [llvm/llvm-project] c8a4f2: AMDGPU: Add baseline tests for fmul-to-ldexp patterns

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Aug 11 04:58:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8a4f2a8c16dd4bd9003f107a9b817d897cac695
      https://github.com/llvm/llvm-project/commit/c8a4f2a8c16dd4bd9003f107a9b817d897cac695
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    A llvm/test/CodeGen/AMDGPU/fmul-to-ldexp.ll

  Log Message:
  -----------
  AMDGPU: Add baseline tests for fmul-to-ldexp patterns

We can better some multiply-by-power-of-2 patterns as ldexp.


  Commit: 29fff3e2ab880449182626810c326d21944a88bf
      https://github.com/llvm/llvm-project/commit/29fff3e2ab880449182626810c326d21944a88bf
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-08-11 (Fri, 11 Aug 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUGISel.td
    M llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
    M llvm/lib/Target/AMDGPU/SIInstructions.td
    M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fmul.mir
    M llvm/test/CodeGen/AMDGPU/fmul-to-ldexp.ll
    M llvm/test/CodeGen/AMDGPU/fp_to_sint.f64.ll
    M llvm/test/CodeGen/AMDGPU/fp_to_uint.f64.ll

  Log Message:
  -----------
  AMDGPU: Try to select fmul by power of 2 to ldexp

For the f64 case, this gives us a cheaper to materialize 32-bit
constant. It's less obviously a win for f32 and f16. It forces us to
use a VOP3 encoding so it's a neutral code size change.

GlobalISel cases don't work because of the constant-is-copy-to-vgpr
problem.

https://reviews.llvm.org/D157111


Compare: https://github.com/llvm/llvm-project/compare/0ce056a814f8...29fff3e2ab88


More information about the All-commits mailing list