Author: Fraser Cormack Date: 2025-03-31T16:55:23+01:00 New Revision: 87602f6d03ada10d0de7f1440320ffec4eb86790
URL: https://github.com/llvm/llvm-project/commit/87602f6d03ada10d0de7f1440320ffec4eb86790 DIFF: https://github.com/llvm/llvm-project/commit/87602f6d03ada10d0de7f1440320ffec4eb86790.diff LOG: [libclc] Fix unresolved reference to missing table (#133691) Splitting the 'ln_tbl' into two in db98e292 wasn't done thoroughly enough as some references to the old table still remained. This commit fixes the unresolved references by updating to the new split table. Added: Modified: libclc/clc/include/clc/math/tables.h libclc/clc/lib/generic/math/clc_log_base.h Removed: ################################################################################ diff --git a/libclc/clc/include/clc/math/tables.h b/libclc/clc/include/clc/math/tables.h index f2118082b1bdb..3120a18cc996e 100644 --- a/libclc/clc/include/clc/math/tables.h +++ b/libclc/clc/include/clc/math/tables.h @@ -78,7 +78,6 @@ CLC_TABLE_FUNCTION_DECL(float, exp_tbl_ep_tail); #pragma OPENCL EXTENSION cl_khr_fp64 : enable -TABLE_FUNCTION_DECL(double2, ln_tbl); CLC_TABLE_FUNCTION_DECL(double, ln_tbl_lo); CLC_TABLE_FUNCTION_DECL(double, ln_tbl_hi); CLC_TABLE_FUNCTION_DECL(double, atan_jby256_tbl_head); diff --git a/libclc/clc/lib/generic/math/clc_log_base.h b/libclc/clc/lib/generic/math/clc_log_base.h index 7d084c037f67e..9418535db827d 100644 --- a/libclc/clc/lib/generic/math/clc_log_base.h +++ b/libclc/clc/lib/generic/math/clc_log_base.h @@ -261,9 +261,8 @@ __clc_log(double x) int index = __clc_as_int2(ux).hi >> 13; index = ((0x80 | (index & 0x7e)) >> 1) + (index & 0x1); - double2 tv = USE_TABLE(ln_tbl, index - 64); - double z1 = tv.s0; - double q = tv.s1; + double z1 = USE_TABLE(ln_tbl_lo, index - 64); + double q = USE_TABLE(ln_tbl_hi, index - 64); double f1 = index * 0x1.0p-7; double f2 = f - f1; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits