[all-commits] [llvm/llvm-project] 4609b6: [libclc] Move fmin & fmax to CLC library (#134218)
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Tue Apr 29 02:51:45 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4609b6a3e76e604463bab2a303c6da737f303237
https://github.com/llvm/llvm-project/commit/4609b6a3e76e604463bab2a303c6da737f303237
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2025-04-29 (Tue, 29 Apr 2025)
Changed paths:
M libclc/amdgcn/lib/SOURCES
R libclc/amdgcn/lib/math/fmax.cl
R libclc/amdgcn/lib/math/fmin.cl
A libclc/clc/include/clc/math/clc_fmax.h
A libclc/clc/include/clc/math/clc_fmin.h
A libclc/clc/include/clc/shared/binary_decl_with_scalar_second_arg.inc
A libclc/clc/include/clc/shared/binary_def_with_scalar_second_arg.inc
M libclc/clc/lib/amdgcn/SOURCES
A libclc/clc/lib/amdgcn/math/clc_fmax.cl
A libclc/clc/lib/amdgcn/math/clc_fmin.cl
M libclc/clc/lib/generic/SOURCES
A libclc/clc/lib/generic/math/clc_fmax.cl
A libclc/clc/lib/generic/math/clc_fmin.cl
M libclc/clc/lib/r600/SOURCES
A libclc/clc/lib/r600/math/clc_fmax.cl
A libclc/clc/lib/r600/math/clc_fmin.cl
M libclc/generic/lib/math/fmax.cl
M libclc/generic/lib/math/fmin.cl
M libclc/r600/lib/SOURCES
R libclc/r600/lib/math/fmax.cl
R libclc/r600/lib/math/fmin.cl
Log Message:
-----------
[libclc] Move fmin & fmax to CLC library (#134218)
This is an alternative to #128506 which doesn't attempt to change the
codegen for fmin and fmax on their way to the CLC library.
The amdgcn and r600 custom definitions of fmin/fmax are now converted to
custom definitions of __clc_fmin and __clc_fmax.
For simplicity, the CLC library doesn't provide vector/scalar versions
of these builtins. The OpenCL layer wraps those up to the vector/vector
versions.
The only codegen change is that non-standard vector/scalar overloads of
fmin/fmax have been removed. We were currently (accidentally,
presumably) providing overloads with mixed elment types such as
fmin(double2, float), fmax(half4, double), etc. The only vector/scalar
overloads in the OpenCL spec are those with scalars of the same element
type as the vector in the first argument.
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