[all-commits] [llvm/llvm-project] 0d0ed9: AMDGPU: Pattern match fract instructions in AMDGPU...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu May 18 15:30:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0d0ed9a355ff0d4ca7268084fb3990c402e07641
      https://github.com/llvm/llvm-project/commit/0d0ed9a355ff0d4ca7268084fb3990c402e07641
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    M llvm/test/CodeGen/AMDGPU/fract-match.ll

  Log Message:
  -----------
  AMDGPU: Pattern match fract instructions in AMDGPUCodeGenPrepare

This will allow eliminating the intrinsic uses in the device
libraries, which will remove a subtarget dependency on the f16
version of the intrinsic.

We previously had some wrong patterns for this under unsafe math
which I've removed.

Do it in IR partially to take advantage of the much better isKnownNeverNaN
handling, and partially out of laziness to avoid repeating this in the DAG
and GlobalISel path. Plus I think this should be done much earlier. Ideally
this would be in InstCombine, but you can't introduce target intrinsics
from a generic instruction rooted pattern.


  Commit: 07365f4a40a62c5e366f3135e6e00a845b86eb2c
      https://github.com/llvm/llvm-project/commit/07365f4a40a62c5e366f3135e6e00a845b86eb2c
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp
    M llvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll

  Log Message:
  -----------
  InstSimplify: Combine computeKnownFPClass calls and pass AssumptionCache


  Commit: 494dee0f7a7701a57f7c5b755b4133844d0dcbdf
      https://github.com/llvm/llvm-project/commit/494dee0f7a7701a57f7c5b755b4133844d0dcbdf
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp

  Log Message:
  -----------
  InstSimplify: Use isKnownNeverInfOrNaN


Compare: https://github.com/llvm/llvm-project/compare/41714c959d65...494dee0f7a77


More information about the All-commits mailing list