[all-commits] [llvm/llvm-project] 54bda7: AMDGPU: Simplify and improve sincos matching

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Aug 2 14:48:49 PDT 2023


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

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.defined.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.defined.nobuiltin.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.nobuiltins.ll

  Log Message:
  -----------
  AMDGPU: Simplify and improve sincos matching

The first trivial example I tried failed to merge due to the user scan
logic. Remove the complicated scan of users handling with distance
thresholds, with a same block restriction. The actual expansion of
sincos is basically the same size as sin or cos individually. Copy the
technique the generic optimization uses, which is to just use the
input instruction as the insert point or just insert at the start of
the entry block.

https://reviews.llvm.org/D156706




More information about the All-commits mailing list