[all-commits] [llvm/llvm-project] cfc8ef: [libclc] Move copysign to CLC library; fix & optim...
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Tue Jan 28 01:18:56 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cfc8ef0ad8f70be22b44a8e1b56856795eb18282
https://github.com/llvm/llvm-project/commit/cfc8ef0ad8f70be22b44a8e1b56856795eb18282
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2025-01-28 (Tue, 28 Jan 2025)
Changed paths:
A libclc/clc/include/clc/math/clc_copysign.h
A libclc/clc/include/clc/shared/binary_def.inc
M libclc/clc/lib/clspv/SOURCES
M libclc/clc/lib/generic/SOURCES
A libclc/clc/lib/generic/math/clc_copysign.cl
M libclc/clc/lib/spirv/SOURCES
M libclc/clc/lib/spirv64/SOURCES
M libclc/generic/lib/math/copysign.cl
Log Message:
-----------
[libclc] Move copysign to CLC library; fix & optimize (#124598)
This commit moves the implementation of the copysign builtin to the CLC
library.
It simultaneously optimizes it for vector types by avoiding
scalarization. It does so by using the __builtin_elementwise_copysign
clang builtins, which can handle vector types.
It also fixes a bug in the half/fp16 implementation of the builtin. This
version was using an incorrect mask (0x7FFFF instead of 0x7FFF) and was
thus preserving the original sign bit, rather than masking it out.
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