[libclc] [NFC][libclc] Move _CLC_V_V_VP_VECTORIZE macro into clc_lgamma_r.cl and delete clcmacro.h (PR #156280)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 31 22:53:03 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Wenju He (wenju-he)
<details>
<summary>Changes</summary>
clcmacro.h only defines _CLC_V_V_VP_VECTORIZE which is only used in clc/lib/generic/math/clc_lgamma_r.cl.
---
Patch is 30.44 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/156280.diff
48 Files Affected:
- (modified) libclc/clc/include/clc/clc_convert.h (+1-1)
- (removed) libclc/clc/include/clc/clcmacro.h (-69)
- (modified) libclc/clc/lib/amdgcn/math/clc_ldexp_override.cl (-1)
- (modified) libclc/clc/lib/amdgpu/math/clc_native_exp2.cl (-1)
- (modified) libclc/clc/lib/amdgpu/math/clc_sqrt_fp64.cl (-1)
- (modified) libclc/clc/lib/clspv/math/clc_sw_fma.cl (-1)
- (modified) libclc/clc/lib/generic/common/clc_degrees.cl (-1)
- (modified) libclc/clc/lib/generic/common/clc_radians.cl (-1)
- (modified) libclc/clc/lib/generic/common/clc_smoothstep.cl (-1)
- (modified) libclc/clc/lib/generic/common/clc_step.cl (-2)
- (modified) libclc/clc/lib/generic/integer/clc_clz.cl (-1)
- (modified) libclc/clc/lib/generic/integer/clc_ctz.cl (-1)
- (modified) libclc/clc/lib/generic/integer/clc_mad_sat.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_cbrt.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_cos.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_exp10.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_fmod.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_fract.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_frexp.inc (-1)
- (modified) libclc/clc/lib/generic/math/clc_hypot.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_ilogb.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_ldexp.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_lgamma_r.cl (+54)
- (modified) libclc/clc/lib/generic/math/clc_log.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_log10.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_log2.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_logb.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_nextafter.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_pow.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_pown.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_powr.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_remainder.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_remquo.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_sin.cl (-1)
- (modified) libclc/clc/lib/generic/math/clc_sw_fma.cl (-1)
- (modified) libclc/clc/lib/generic/relational/clc_bitselect.cl (-1)
- (modified) libclc/clc/lib/r600/math/clc_native_rsqrt.cl (-1)
- (modified) libclc/clc/lib/r600/math/clc_rsqrt_override.cl (-1)
- (modified) libclc/clc/lib/spirv/math/clc_fmax.cl (-1)
- (modified) libclc/clc/lib/spirv/math/clc_fmin.cl (-1)
- (modified) libclc/opencl/lib/generic/common/sign.cl (-1)
- (modified) libclc/opencl/lib/generic/common/smoothstep.cl (-1)
- (modified) libclc/opencl/lib/generic/math/atan2.cl (-1)
- (modified) libclc/opencl/lib/generic/math/atan2pi.cl (-1)
- (modified) libclc/opencl/lib/generic/math/log.cl (-1)
- (modified) libclc/opencl/lib/generic/math/log10.cl (-1)
- (modified) libclc/opencl/lib/generic/math/log2.cl (-1)
- (modified) libclc/opencl/lib/generic/math/nan.cl (-1)
``````````diff
diff --git a/libclc/clc/include/clc/clc_convert.h b/libclc/clc/include/clc/clc_convert.h
index ab41e5abb9d6c..97cfa667c8b16 100644
--- a/libclc/clc/include/clc/clc_convert.h
+++ b/libclc/clc/include/clc/clc_convert.h
@@ -9,7 +9,7 @@
#ifndef __CLC_CLC_CONVERT_H__
#define __CLC_CLC_CONVERT_H__
-#include <clc/clcmacro.h>
+#include <clc/internal/clc.h>
#define _CLC_CONVERT_DECL(FROM_TYPE, TO_TYPE, SUFFIX) \
_CLC_OVERLOAD _CLC_DECL TO_TYPE __clc_convert_##TO_TYPE##SUFFIX(FROM_TYPE x);
diff --git a/libclc/clc/include/clc/clcmacro.h b/libclc/clc/include/clc/clcmacro.h
deleted file mode 100644
index 9fa11489b1457..0000000000000
--- a/libclc/clc/include/clc/clcmacro.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef __CLC_CLCMACRO_H__
-#define __CLC_CLCMACRO_H__
-
-#include <clc/internal/clc.h>
-#include <clc/utils.h>
-
-#define _CLC_V_V_VP_VECTORIZE(DECLSPEC, RET_TYPE, __CLC_FUNCTION, ARG1_TYPE, \
- ADDR_SPACE, ARG2_TYPE) \
- DECLSPEC __CLC_XCONCAT(RET_TYPE, 2) \
- __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 2) x, \
- ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 2) * y) { \
- ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
- return (__CLC_XCONCAT(RET_TYPE, 2))(__CLC_FUNCTION(x.s0, ptr), \
- __CLC_FUNCTION(x.s1, ptr + 1)); \
- } \
- \
- DECLSPEC __CLC_XCONCAT(RET_TYPE, 3) \
- __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 3) x, \
- ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 3) * y) { \
- ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
- return (__CLC_XCONCAT(RET_TYPE, 3))(__CLC_FUNCTION(x.s0, ptr), \
- __CLC_FUNCTION(x.s1, ptr + 1), \
- __CLC_FUNCTION(x.s2, ptr + 2)); \
- } \
- \
- DECLSPEC __CLC_XCONCAT(RET_TYPE, 4) \
- __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 4) x, \
- ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 4) * y) { \
- ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
- return (__CLC_XCONCAT(RET_TYPE, 4))( \
- __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
- __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3)); \
- } \
- \
- DECLSPEC __CLC_XCONCAT(RET_TYPE, 8) \
- __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 8) x, \
- ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 8) * y) { \
- ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
- return (__CLC_XCONCAT(RET_TYPE, 8))( \
- __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
- __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3), \
- __CLC_FUNCTION(x.s4, ptr + 4), __CLC_FUNCTION(x.s5, ptr + 5), \
- __CLC_FUNCTION(x.s6, ptr + 6), __CLC_FUNCTION(x.s7, ptr + 7)); \
- } \
- \
- DECLSPEC __CLC_XCONCAT(RET_TYPE, 16) \
- __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 16) x, \
- ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 16) * y) { \
- ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
- return (__CLC_XCONCAT(RET_TYPE, 16))( \
- __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
- __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3), \
- __CLC_FUNCTION(x.s4, ptr + 4), __CLC_FUNCTION(x.s5, ptr + 5), \
- __CLC_FUNCTION(x.s6, ptr + 6), __CLC_FUNCTION(x.s7, ptr + 7), \
- __CLC_FUNCTION(x.s8, ptr + 8), __CLC_FUNCTION(x.s9, ptr + 9), \
- __CLC_FUNCTION(x.sa, ptr + 10), __CLC_FUNCTION(x.sb, ptr + 11), \
- __CLC_FUNCTION(x.sc, ptr + 12), __CLC_FUNCTION(x.sd, ptr + 13), \
- __CLC_FUNCTION(x.se, ptr + 14), __CLC_FUNCTION(x.sf, ptr + 15)); \
- }
-
-#endif // __CLC_CLCMACRO_H__
diff --git a/libclc/clc/lib/amdgcn/math/clc_ldexp_override.cl b/libclc/clc/lib/amdgcn/math/clc_ldexp_override.cl
index 90bd50ac15512..611f60d1f563f 100644
--- a/libclc/clc/lib/amdgcn/math/clc_ldexp_override.cl
+++ b/libclc/clc/lib/amdgcn/math/clc_ldexp_override.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_ldexp.h>
diff --git a/libclc/clc/lib/amdgpu/math/clc_native_exp2.cl b/libclc/clc/lib/amdgpu/math/clc_native_exp2.cl
index 5959ea2786a51..a940323b60a71 100644
--- a/libclc/clc/lib/amdgpu/math/clc_native_exp2.cl
+++ b/libclc/clc/lib/amdgpu/math/clc_native_exp2.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#define __CLC_FLOAT_ONLY
diff --git a/libclc/clc/lib/amdgpu/math/clc_sqrt_fp64.cl b/libclc/clc/lib/amdgpu/math/clc_sqrt_fp64.cl
index d2790f3a82605..3a4310baa224d 100644
--- a/libclc/clc/lib/amdgpu/math/clc_sqrt_fp64.cl
+++ b/libclc/clc/lib/amdgpu/math/clc_sqrt_fp64.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_fma.h>
#include <clc/math/clc_ldexp.h>
diff --git a/libclc/clc/lib/clspv/math/clc_sw_fma.cl b/libclc/clc/lib/clspv/math/clc_sw_fma.cl
index 1dc9a0e6407ba..c28b9441b05ff 100644
--- a/libclc/clc/lib/clspv/math/clc_sw_fma.cl
+++ b/libclc/clc/lib/clspv/math/clc_sw_fma.cl
@@ -11,7 +11,6 @@
// been updated as appropriate.
#include <clc/clc_as_type.h>
-#include <clc/clcmacro.h>
#include <clc/float/definitions.h>
#include <clc/integer/clc_abs.h>
#include <clc/integer/clc_clz.h>
diff --git a/libclc/clc/lib/generic/common/clc_degrees.cl b/libclc/clc/lib/generic/common/clc_degrees.cl
index b5b07df5075e7..79b97f0ca75b0 100644
--- a/libclc/clc/lib/generic/common/clc_degrees.cl
+++ b/libclc/clc/lib/generic/common/clc_degrees.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#define DEGREES_SINGLE_DEF(TYPE, LITERAL) \
diff --git a/libclc/clc/lib/generic/common/clc_radians.cl b/libclc/clc/lib/generic/common/clc_radians.cl
index 497263a15f516..3f013019ad974 100644
--- a/libclc/clc/lib/generic/common/clc_radians.cl
+++ b/libclc/clc/lib/generic/common/clc_radians.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#define __CLC_RADIANS_SINGLE_DEF(TYPE, LITERAL) \
diff --git a/libclc/clc/lib/generic/common/clc_smoothstep.cl b/libclc/clc/lib/generic/common/clc_smoothstep.cl
index cf143b8fac231..b409c7d7b6440 100644
--- a/libclc/clc/lib/generic/common/clc_smoothstep.cl
+++ b/libclc/clc/lib/generic/common/clc_smoothstep.cl
@@ -5,7 +5,6 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#include <clc/shared/clc_clamp.h>
diff --git a/libclc/clc/lib/generic/common/clc_step.cl b/libclc/clc/lib/generic/common/clc_step.cl
index c21c27a3e9404..721489948233c 100644
--- a/libclc/clc/lib/generic/common/clc_step.cl
+++ b/libclc/clc/lib/generic/common/clc_step.cl
@@ -6,7 +6,5 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
-
#define __CLC_BODY <clc_step.inc>
#include <clc/math/gentype.inc>
diff --git a/libclc/clc/lib/generic/integer/clc_clz.cl b/libclc/clc/lib/generic/integer/clc_clz.cl
index 37ba4dbfd8094..48c4400f199f5 100644
--- a/libclc/clc/lib/generic/integer/clc_clz.cl
+++ b/libclc/clc/lib/generic/integer/clc_clz.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/integer/clc_clz.h>
#include <clc/internal/clc.h>
diff --git a/libclc/clc/lib/generic/integer/clc_ctz.cl b/libclc/clc/lib/generic/integer/clc_ctz.cl
index 5cf4c19811db2..42cfa90c3e66a 100644
--- a/libclc/clc/lib/generic/integer/clc_ctz.cl
+++ b/libclc/clc/lib/generic/integer/clc_ctz.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/integer/clc_ctz.h>
#include <clc/internal/clc.h>
diff --git a/libclc/clc/lib/generic/integer/clc_mad_sat.cl b/libclc/clc/lib/generic/integer/clc_mad_sat.cl
index 7c6aaffe6c5c7..93088dc9f0b69 100644
--- a/libclc/clc/lib/generic/integer/clc_mad_sat.cl
+++ b/libclc/clc/lib/generic/integer/clc_mad_sat.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
#include <clc/integer/clc_add_sat.h>
#include <clc/integer/clc_mad24.h>
#include <clc/integer/clc_mul_hi.h>
diff --git a/libclc/clc/lib/generic/math/clc_cbrt.cl b/libclc/clc/lib/generic/math/clc_cbrt.cl
index 26869085933a3..105f6329d5bad 100644
--- a/libclc/clc/lib/generic/math/clc_cbrt.cl
+++ b/libclc/clc/lib/generic/math/clc_cbrt.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_copysign.h>
#include <clc/math/clc_fabs.h>
diff --git a/libclc/clc/lib/generic/math/clc_cos.cl b/libclc/clc/lib/generic/math/clc_cos.cl
index 0c9dc287aa0b4..e7e4d6ad39ede 100644
--- a/libclc/clc/lib/generic/math/clc_cos.cl
+++ b/libclc/clc/lib/generic/math/clc_cos.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
#include <clc/float/definitions.h>
#include <clc/math/clc_fabs.h>
#include <clc/math/clc_sincos_helpers.h>
diff --git a/libclc/clc/lib/generic/math/clc_exp10.cl b/libclc/clc/lib/generic/math/clc_exp10.cl
index 04e912ed98885..0c394ee19475a 100644
--- a/libclc/clc/lib/generic/math/clc_exp10.cl
+++ b/libclc/clc/lib/generic/math/clc_exp10.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_fma.h>
#include <clc/math/clc_ldexp.h>
diff --git a/libclc/clc/lib/generic/math/clc_fmod.cl b/libclc/clc/lib/generic/math/clc_fmod.cl
index 3cb01e67292ed..f17757c9c370b 100644
--- a/libclc/clc/lib/generic/math/clc_fmod.cl
+++ b/libclc/clc/lib/generic/math/clc_fmod.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
#include <clc/integer/clc_clz.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_floor.h>
diff --git a/libclc/clc/lib/generic/math/clc_fract.cl b/libclc/clc/lib/generic/math/clc_fract.cl
index 7db43ef878710..681077cb9c899 100644
--- a/libclc/clc/lib/generic/math/clc_fract.cl
+++ b/libclc/clc/lib/generic/math/clc_fract.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_floor.h>
#include <clc/math/clc_fmin.h>
diff --git a/libclc/clc/lib/generic/math/clc_frexp.inc b/libclc/clc/lib/generic/math/clc_frexp.inc
index d212b6a1b3376..763266bc04931 100644
--- a/libclc/clc/lib/generic/math/clc_frexp.inc
+++ b/libclc/clc/lib/generic/math/clc_frexp.inc
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/utils.h>
#if __CLC_FPSIZE == 32
diff --git a/libclc/clc/lib/generic/math/clc_hypot.cl b/libclc/clc/lib/generic/math/clc_hypot.cl
index 6990be3083eb6..c934ab29da91b 100644
--- a/libclc/clc/lib/generic/math/clc_hypot.cl
+++ b/libclc/clc/lib/generic/math/clc_hypot.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
#include <clc/integer/clc_abs.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_fma.h>
diff --git a/libclc/clc/lib/generic/math/clc_ilogb.cl b/libclc/clc/lib/generic/math/clc_ilogb.cl
index c33ed9fe9b043..1ccc5754ca7f7 100644
--- a/libclc/clc/lib/generic/math/clc_ilogb.cl
+++ b/libclc/clc/lib/generic/math/clc_ilogb.cl
@@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//
#include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
#include <clc/float/definitions.h>
#include <clc/integer/clc_clz.h>
#include <clc/internal/clc.h>
diff --git a/libclc/clc/lib/generic/math/clc_ldexp.cl b/libclc/clc/lib/generic/math/clc_ldexp.cl
index a5327c58e424a..8b41751e40282 100644
--- a/libclc/clc/lib/generic/math/clc_ldexp.cl
+++ b/libclc/clc/lib/generic/math/clc_ldexp.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/integer/clc_add_sat.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_subnormal_config.h>
diff --git a/libclc/clc/lib/generic/math/clc_lgamma_r.cl b/libclc/clc/lib/generic/math/clc_lgamma_r.cl
index ffacfc17a4d01..662b34a69bb72 100644
--- a/libclc/clc/lib/generic/math/clc_lgamma_r.cl
+++ b/libclc/clc/lib/generic/math/clc_lgamma_r.cl
@@ -16,6 +16,60 @@
#include <clc/math/clc_sinpi.h>
#include <clc/math/math.h>
+#define _CLC_V_V_VP_VECTORIZE(DECLSPEC, RET_TYPE, __CLC_FUNCTION, ARG1_TYPE, \
+ ADDR_SPACE, ARG2_TYPE) \
+ DECLSPEC __CLC_XCONCAT(RET_TYPE, 2) \
+ __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 2) x, \
+ ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 2) * y) { \
+ ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
+ return (__CLC_XCONCAT(RET_TYPE, 2))(__CLC_FUNCTION(x.s0, ptr), \
+ __CLC_FUNCTION(x.s1, ptr + 1)); \
+ } \
+ \
+ DECLSPEC __CLC_XCONCAT(RET_TYPE, 3) \
+ __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 3) x, \
+ ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 3) * y) { \
+ ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
+ return (__CLC_XCONCAT(RET_TYPE, 3))(__CLC_FUNCTION(x.s0, ptr), \
+ __CLC_FUNCTION(x.s1, ptr + 1), \
+ __CLC_FUNCTION(x.s2, ptr + 2)); \
+ } \
+ \
+ DECLSPEC __CLC_XCONCAT(RET_TYPE, 4) \
+ __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 4) x, \
+ ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 4) * y) { \
+ ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
+ return (__CLC_XCONCAT(RET_TYPE, 4))( \
+ __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
+ __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3)); \
+ } \
+ \
+ DECLSPEC __CLC_XCONCAT(RET_TYPE, 8) \
+ __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 8) x, \
+ ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 8) * y) { \
+ ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
+ return (__CLC_XCONCAT(RET_TYPE, 8))( \
+ __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
+ __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3), \
+ __CLC_FUNCTION(x.s4, ptr + 4), __CLC_FUNCTION(x.s5, ptr + 5), \
+ __CLC_FUNCTION(x.s6, ptr + 6), __CLC_FUNCTION(x.s7, ptr + 7)); \
+ } \
+ \
+ DECLSPEC __CLC_XCONCAT(RET_TYPE, 16) \
+ __CLC_FUNCTION(__CLC_XCONCAT(ARG1_TYPE, 16) x, \
+ ADDR_SPACE __CLC_XCONCAT(ARG2_TYPE, 16) * y) { \
+ ADDR_SPACE ARG2_TYPE *ptr = (ADDR_SPACE ARG2_TYPE *)y; \
+ return (__CLC_XCONCAT(RET_TYPE, 16))( \
+ __CLC_FUNCTION(x.s0, ptr), __CLC_FUNCTION(x.s1, ptr + 1), \
+ __CLC_FUNCTION(x.s2, ptr + 2), __CLC_FUNCTION(x.s3, ptr + 3), \
+ __CLC_FUNCTION(x.s4, ptr + 4), __CLC_FUNCTION(x.s5, ptr + 5), \
+ __CLC_FUNCTION(x.s6, ptr + 6), __CLC_FUNCTION(x.s7, ptr + 7), \
+ __CLC_FUNCTION(x.s8, ptr + 8), __CLC_FUNCTION(x.s9, ptr + 9), \
+ __CLC_FUNCTION(x.sa, ptr + 10), __CLC_FUNCTION(x.sb, ptr + 11), \
+ __CLC_FUNCTION(x.sc, ptr + 12), __CLC_FUNCTION(x.sd, ptr + 13), \
+ __CLC_FUNCTION(x.se, ptr + 14), __CLC_FUNCTION(x.sf, ptr + 15)); \
+ }
+
// ====================================================
// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
//
diff --git a/libclc/clc/lib/generic/math/clc_log.cl b/libclc/clc/lib/generic/math/clc_log.cl
index 7eb0180de971e..74ee1ed713751 100644
--- a/libclc/clc/lib/generic/math/clc_log.cl
+++ b/libclc/clc/lib/generic/math/clc_log.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//
-#include <clc/clcmacro.h>
#include <clc/float/definitions.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_log2.h>
diff --git a/libclc/clc/lib/generic/math/clc_log10.cl b/libclc/clc/lib/generic/math/clc_log10.cl
index 35489f4675629..741d21b5d831a 100644
--- a/libclc/clc/lib/generic/math/clc_log10.cl
+++ b/libclc/clc/lib/generic/math/clc_log10.cl
@@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/156280
More information about the cfe-commits
mailing list