[all-commits] [llvm/llvm-project] e24d99: AMDGPU: Use fpmath metadata on f16 log/log10 intri...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Feb 9 01:11:59 PST 2026


  Branch: refs/heads/users/arsenm/amdgpu/use-fpmath-metadata-f16-log-log10
  Home:   https://github.com/llvm/llvm-project
  Commit: e24d998106d0bb4568d2659b06943123ae522439
      https://github.com/llvm/llvm-project/commit/e24d998106d0bb4568d2659b06943123ae522439
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2026-02-09 (Mon, 09 Feb 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
    A llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-log.ll
    M llvm/test/CodeGen/AMDGPU/llvm.log.ll
    M llvm/test/CodeGen/AMDGPU/llvm.log10.ll

  Log Message:
  -----------
  AMDGPU: Use fpmath metadata on f16 log/log10 intrinsics

result by default, and the old expansion with the afn flag. The
old result was good enough for OpenCL conformance, so consider
the fpmath metadata and use the fast path. This is done in
AMDGPUCodeGenPrepare for the same reason that sqrt is handled here,
which is the DAG does not have a way to access fpmath metadata
from the original instruction.

This is not yet of practical use, because the log calls sourced
from OpenCL are not actually marked with this metadata and there
isn't a method to produce it from the source languages.



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