[libclc] f65339b - libclc: Stop requiring SPV_KHR_fma (#226186)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 10 02:42:26 PST 2026
Author: Karol Herbst
Date: 2026-11-10T11:42:21+01:00
New Revision: f65339bce441f4f238b2a87490af3bb2067bdb1d
URL: https://github.com/llvm/llvm-project/commit/f65339bce441f4f238b2a87490af3bb2067bdb1d
DIFF: https://github.com/llvm/llvm-project/commit/f65339bce441f4f238b2a87490af3bb2067bdb1d.diff
LOG: libclc: Stop requiring SPV_KHR_fma (#226186)
SPV_KHR_fma and the OpenCL Extended Instruction fma are equivalent. The
latter however is required to be supported by OpenCL runtimes where the
former is not.
Let's remove this requirement, because it adds no value over the
functionality in the OpenCL core spec and only makes it more difficult
to consume a SPIR-V that uses optional features.
The use of `SPV_KHR_fma` breaks with e.g. mesa at this point in time and
might only be resolved in a future release.
This should also be backported to llvm-23.1
Added:
Modified:
libclc/cmake/modules/AddLibclc.cmake
Removed:
################################################################################
diff --git a/libclc/cmake/modules/AddLibclc.cmake b/libclc/cmake/modules/AddLibclc.cmake
index 64f1a6f12fa181..f610c09c8b168c 100644
--- a/libclc/cmake/modules/AddLibclc.cmake
+++ b/libclc/cmake/modules/AddLibclc.cmake
@@ -170,7 +170,6 @@ function(libclc_add_library target_name)
if(LIBCLC_USE_SPIRV_BACKEND)
add_custom_command(OUTPUT ${builtins_lib}
COMMAND ${CMAKE_CLC_COMPILER} -c --target=${ARG_TRIPLE}
- -mllvm --spirv-ext=+SPV_KHR_fma
-x ir -o ${builtins_lib} ${linked_bc}
DEPENDS ${linked_bc}
)
@@ -178,7 +177,6 @@ function(libclc_add_library target_name)
add_custom_command(OUTPUT ${builtins_lib}
COMMAND ${llvm-spirv_exe}
--spirv-max-version=1.1
- --spirv-ext=+SPV_KHR_fma
-o ${builtins_lib} ${linked_bc}
DEPENDS ${linked_bc}
)
More information about the cfe-commits
mailing list