[libclc] [libclc] Optimize generic CLC fmin/fmax (PR #128506)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 29 03:04:27 PDT 2025
================
@@ -43,8 +48,10 @@ _CLC_DEF _CLC_OVERLOAD half __clc_fmin(half x, half y) {
return (y < x) ? y : x;
----------------
frasercrmck wrote:
It doesn't generate the same IR, because SPIR-V isn't optimized. I wonder if we in fact want to have `half` use `__builtin_fminf16`? We can simplify the definitions if all types are using a builtin. What do you think? That would optimize the `half` case, rather than pessimize the `float`/`double` case.
https://github.com/llvm/llvm-project/pull/128506
More information about the cfe-commits
mailing list