[all-commits] [llvm/llvm-project] 992f0d: [Clang][SPIRV][AMDGPU] Override `supportsLibCall` ...

Alex Voicu via All-commits all-commits at lists.llvm.org
Wed Jun 25 03:23:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 992f0d12255a4a9ae18e45f09700097cbd3739b5
      https://github.com/llvm/llvm-project/commit/992f0d12255a4a9ae18e45f09700097cbd3739b5
  Author: Alex Voicu <alexandru.voicu at amd.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M clang/lib/CodeGen/Targets/SPIR.cpp
    M clang/test/CodeGen/logb_scalbn.c

  Log Message:
  -----------
  [Clang][SPIRV][AMDGPU] Override `supportsLibCall` for AMDGCNSPIRV (#143814)

The `supportsLibCall` predicate is used to select whether some math builtins get expanded in the FE or they get lowered into libcalls. The default implementation unconditionally returns true, which is problematic for AMDGCN-flavoured SPIRV, as AMDGPU does not support any libcalls at the moment. This change overrides the predicate in order to reflect this and correctly do the expected FE expansion when targeting AMDGCN-flavoured SPIRV.



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