[libclc] [libclc] Move logb/ilogb to CLC library; optimize (PR #128028)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 20 08:55:27 PST 2025
================
@@ -0,0 +1,73 @@
+#if __CLC_FPSIZE == 32
+
+_CLC_OVERLOAD _CLC_DEF __CLC_INTN __clc_ilogb(__CLC_GENTYPE x) {
+ __CLC_UINTN ux = __CLC_AS_UINTN(x);
----------------
arsenm wrote:
although I guess this better if you have a dedicated frexp_exp instruction. Could factor out the frexp_exp part into a utility function, which does the bithacking or the intrinsic
https://github.com/llvm/llvm-project/pull/128028
More information about the cfe-commits
mailing list