https://github.com/wenju-he created 
https://github.com/llvm/llvm-project/pull/156280

clcmacro.h only defines _CLC_V_V_VP_VECTORIZE which is only used in 
clc/lib/generic/math/clc_lgamma_r.cl.

>From 4125c7faf2d70b4059da9f56d29024e359307513 Mon Sep 17 00:00:00 2001
From: Wenju He <[email protected]>
Date: Mon, 1 Sep 2025 07:49:16 +0200
Subject: [PATCH] [NFC][libclc] Move _CLC_V_V_VP_VECTORIZE macro into
 clc_lgamma_r.cl and delete clcmacro.h

clcmacro.h only defines _CLC_V_V_VP_VECTORIZE which is only used in
clc/lib/generic/math/clc_lgamma_r.cl.
---
 libclc/clc/include/clc/clc_convert.h          |  2 +-
 libclc/clc/include/clc/clcmacro.h             | 69 -------------------
 .../clc/lib/amdgcn/math/clc_ldexp_override.cl |  1 -
 libclc/clc/lib/amdgpu/math/clc_native_exp2.cl |  1 -
 libclc/clc/lib/amdgpu/math/clc_sqrt_fp64.cl   |  1 -
 libclc/clc/lib/clspv/math/clc_sw_fma.cl       |  1 -
 libclc/clc/lib/generic/common/clc_degrees.cl  |  1 -
 libclc/clc/lib/generic/common/clc_radians.cl  |  1 -
 .../clc/lib/generic/common/clc_smoothstep.cl  |  1 -
 libclc/clc/lib/generic/common/clc_step.cl     |  2 -
 libclc/clc/lib/generic/integer/clc_clz.cl     |  1 -
 libclc/clc/lib/generic/integer/clc_ctz.cl     |  1 -
 libclc/clc/lib/generic/integer/clc_mad_sat.cl |  1 -
 libclc/clc/lib/generic/math/clc_cbrt.cl       |  1 -
 libclc/clc/lib/generic/math/clc_cos.cl        |  1 -
 libclc/clc/lib/generic/math/clc_exp10.cl      |  1 -
 libclc/clc/lib/generic/math/clc_fmod.cl       |  1 -
 libclc/clc/lib/generic/math/clc_fract.cl      |  1 -
 libclc/clc/lib/generic/math/clc_frexp.inc     |  1 -
 libclc/clc/lib/generic/math/clc_hypot.cl      |  1 -
 libclc/clc/lib/generic/math/clc_ilogb.cl      |  1 -
 libclc/clc/lib/generic/math/clc_ldexp.cl      |  1 -
 libclc/clc/lib/generic/math/clc_lgamma_r.cl   | 54 +++++++++++++++
 libclc/clc/lib/generic/math/clc_log.cl        |  1 -
 libclc/clc/lib/generic/math/clc_log10.cl      |  1 -
 libclc/clc/lib/generic/math/clc_log2.cl       |  1 -
 libclc/clc/lib/generic/math/clc_logb.cl       |  1 -
 libclc/clc/lib/generic/math/clc_nextafter.cl  |  1 -
 libclc/clc/lib/generic/math/clc_pow.cl        |  1 -
 libclc/clc/lib/generic/math/clc_pown.cl       |  1 -
 libclc/clc/lib/generic/math/clc_powr.cl       |  1 -
 libclc/clc/lib/generic/math/clc_remainder.cl  |  1 -
 libclc/clc/lib/generic/math/clc_remquo.cl     |  1 -
 libclc/clc/lib/generic/math/clc_sin.cl        |  1 -
 libclc/clc/lib/generic/math/clc_sw_fma.cl     |  1 -
 .../lib/generic/relational/clc_bitselect.cl   |  1 -
 libclc/clc/lib/r600/math/clc_native_rsqrt.cl  |  1 -
 .../clc/lib/r600/math/clc_rsqrt_override.cl   |  1 -
 libclc/clc/lib/spirv/math/clc_fmax.cl         |  1 -
 libclc/clc/lib/spirv/math/clc_fmin.cl         |  1 -
 libclc/opencl/lib/generic/common/sign.cl      |  1 -
 .../opencl/lib/generic/common/smoothstep.cl   |  1 -
 libclc/opencl/lib/generic/math/atan2.cl       |  1 -
 libclc/opencl/lib/generic/math/atan2pi.cl     |  1 -
 libclc/opencl/lib/generic/math/log.cl         |  1 -
 libclc/opencl/lib/generic/math/log10.cl       |  1 -
 libclc/opencl/lib/generic/math/log2.cl        |  1 -
 libclc/opencl/lib/generic/math/nan.cl         |  1 -
 48 files changed, 55 insertions(+), 116 deletions(-)
 delete mode 100644 libclc/clc/include/clc/clcmacro.h

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 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 #include <clc/math/tables.h>
 
diff --git a/libclc/clc/lib/generic/math/clc_log2.cl 
b/libclc/clc/lib/generic/math/clc_log2.cl
index d9d8cef542557..432ea5737bc2c 100644
--- a/libclc/clc/lib/generic/math/clc_log2.cl
+++ b/libclc/clc/lib/generic/math/clc_log2.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 #include <clc/math/tables.h>
 
diff --git a/libclc/clc/lib/generic/math/clc_logb.cl 
b/libclc/clc/lib/generic/math/clc_logb.cl
index f571a11d0c387..879676eedff15 100644
--- a/libclc/clc/lib/generic/math/clc_logb.cl
+++ b/libclc/clc/lib/generic/math/clc_logb.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_nextafter.cl 
b/libclc/clc/lib/generic/math/clc_nextafter.cl
index 40e1b5a2c57f9..48e28c08edf75 100644
--- a/libclc/clc/lib/generic/math/clc_nextafter.cl
+++ b/libclc/clc/lib/generic/math/clc_nextafter.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 #include <clc/math/clc_fabs.h>
 #include <clc/relational/clc_isnan.h>
diff --git a/libclc/clc/lib/generic/math/clc_pow.cl 
b/libclc/clc/lib/generic/math/clc_pow.cl
index 3d371938e401a..70d3d614a8d36 100644
--- a/libclc/clc/lib/generic/math/clc_pow.cl
+++ b/libclc/clc/lib/generic/math/clc_pow.cl
@@ -7,7 +7,6 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 #include <clc/math/clc_fabs.h>
 #include <clc/math/clc_fma.h>
diff --git a/libclc/clc/lib/generic/math/clc_pown.cl 
b/libclc/clc/lib/generic/math/clc_pown.cl
index 074f212a31b72..5aa9560174b99 100644
--- a/libclc/clc/lib/generic/math/clc_pown.cl
+++ b/libclc/clc/lib/generic/math/clc_pown.cl
@@ -7,7 +7,6 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 #include <clc/math/clc_fabs.h>
 #include <clc/math/clc_fma.h>
diff --git a/libclc/clc/lib/generic/math/clc_powr.cl 
b/libclc/clc/lib/generic/math/clc_powr.cl
index c596a552f07fe..0556ec97d6f3c 100644
--- a/libclc/clc/lib/generic/math/clc_powr.cl
+++ b/libclc/clc/lib/generic/math/clc_powr.cl
@@ -7,7 +7,6 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 #include <clc/math/clc_fabs.h>
 #include <clc/math/clc_fma.h>
diff --git a/libclc/clc/lib/generic/math/clc_remainder.cl 
b/libclc/clc/lib/generic/math/clc_remainder.cl
index 488dde73f67a0..622f05f85100c 100644
--- a/libclc/clc/lib/generic/math/clc_remainder.cl
+++ b/libclc/clc/lib/generic/math/clc_remainder.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_remquo.cl 
b/libclc/clc/lib/generic/math/clc_remquo.cl
index 1505d1c3fb62f..fd83ead06d89a 100644
--- a/libclc/clc/lib/generic/math/clc_remquo.cl
+++ b/libclc/clc/lib/generic/math/clc_remquo.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_sin.cl 
b/libclc/clc/lib/generic/math/clc_sin.cl
index 0ff9739c6a846..741383f94c456 100644
--- a/libclc/clc/lib/generic/math/clc_sin.cl
+++ b/libclc/clc/lib/generic/math/clc_sin.cl
@@ -7,7 +7,6 @@
 
//===----------------------------------------------------------------------===//
 
 #include <clc/clc_convert.h>
-#include <clc/clcmacro.h>
 #include <clc/float/definitions.h>
 #include <clc/internal/clc.h>
 #include <clc/math/clc_fabs.h>
diff --git a/libclc/clc/lib/generic/math/clc_sw_fma.cl 
b/libclc/clc/lib/generic/math/clc_sw_fma.cl
index 550ca5e18f3f8..606e4df320a89 100644
--- a/libclc/clc/lib/generic/math/clc_sw_fma.cl
+++ b/libclc/clc/lib/generic/math/clc_sw_fma.cl
@@ -7,7 +7,6 @@
 
//===----------------------------------------------------------------------===//
 
 #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/relational/clc_bitselect.cl 
b/libclc/clc/lib/generic/relational/clc_bitselect.cl
index 9c6e82e6be4be..b58fb8d3233f8 100644
--- a/libclc/clc/lib/generic/relational/clc_bitselect.cl
+++ b/libclc/clc/lib/generic/relational/clc_bitselect.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 
 #define __CLC_BODY <clc_bitselect.inc>
diff --git a/libclc/clc/lib/r600/math/clc_native_rsqrt.cl 
b/libclc/clc/lib/r600/math/clc_native_rsqrt.cl
index da001574afc0c..cef106e3b4e97 100644
--- a/libclc/clc/lib/r600/math/clc_native_rsqrt.cl
+++ b/libclc/clc/lib/r600/math/clc_native_rsqrt.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 
 _CLC_OVERLOAD _CLC_DEF float __clc_native_rsqrt(float x) {
diff --git a/libclc/clc/lib/r600/math/clc_rsqrt_override.cl 
b/libclc/clc/lib/r600/math/clc_rsqrt_override.cl
index f20046b341177..5ef9ad541afb3 100644
--- a/libclc/clc/lib/r600/math/clc_rsqrt_override.cl
+++ b/libclc/clc/lib/r600/math/clc_rsqrt_override.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 
 _CLC_OVERLOAD _CLC_DEF float __clc_rsqrt(float x) {
diff --git a/libclc/clc/lib/spirv/math/clc_fmax.cl 
b/libclc/clc/lib/spirv/math/clc_fmax.cl
index f63a9d00c642d..101f35c7108c2 100644
--- a/libclc/clc/lib/spirv/math/clc_fmax.cl
+++ b/libclc/clc/lib/spirv/math/clc_fmax.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 
 _CLC_DEF _CLC_OVERLOAD float __clc_fmax(float x, float y) {
diff --git a/libclc/clc/lib/spirv/math/clc_fmin.cl 
b/libclc/clc/lib/spirv/math/clc_fmin.cl
index ddb0126035f8f..9bef3a92d5ba4 100644
--- a/libclc/clc/lib/spirv/math/clc_fmin.cl
+++ b/libclc/clc/lib/spirv/math/clc_fmin.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/internal/clc.h>
 
 _CLC_DEF _CLC_OVERLOAD float __clc_fmin(float x, float y) {
diff --git a/libclc/opencl/lib/generic/common/sign.cl 
b/libclc/opencl/lib/generic/common/sign.cl
index 7add739be6a9c..5508cd7bfab17 100644
--- a/libclc/opencl/lib/generic/common/sign.cl
+++ b/libclc/opencl/lib/generic/common/sign.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/common/clc_sign.h>
 #include <clc/opencl/common/sign.h>
 
diff --git a/libclc/opencl/lib/generic/common/smoothstep.cl 
b/libclc/opencl/lib/generic/common/smoothstep.cl
index fdf9a89dcbfdc..84ed7417de3cf 100644
--- a/libclc/opencl/lib/generic/common/smoothstep.cl
+++ b/libclc/opencl/lib/generic/common/smoothstep.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/common/clc_smoothstep.h>
 #include <clc/opencl/common/smoothstep.h>
 
diff --git a/libclc/opencl/lib/generic/math/atan2.cl 
b/libclc/opencl/lib/generic/math/atan2.cl
index 7db630608867c..5f4a9d991cd95 100644
--- a/libclc/opencl/lib/generic/math/atan2.cl
+++ b/libclc/opencl/lib/generic/math/atan2.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/math/clc_atan2.h>
 #include <clc/opencl/math/atan2.h>
 
diff --git a/libclc/opencl/lib/generic/math/atan2pi.cl 
b/libclc/opencl/lib/generic/math/atan2pi.cl
index ed57c920f1b2d..4e577c775ebb1 100644
--- a/libclc/opencl/lib/generic/math/atan2pi.cl
+++ b/libclc/opencl/lib/generic/math/atan2pi.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/math/clc_atan2pi.h>
 #include <clc/opencl/math/atan2pi.h>
 
diff --git a/libclc/opencl/lib/generic/math/log.cl 
b/libclc/opencl/lib/generic/math/log.cl
index 06209999bf2f1..4862b81f15129 100644
--- a/libclc/opencl/lib/generic/math/log.cl
+++ b/libclc/opencl/lib/generic/math/log.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/math/clc_log.h>
 #include <clc/opencl/math/log.h>
 
diff --git a/libclc/opencl/lib/generic/math/log10.cl 
b/libclc/opencl/lib/generic/math/log10.cl
index 466b602e18963..6702b4485b51f 100644
--- a/libclc/opencl/lib/generic/math/log10.cl
+++ b/libclc/opencl/lib/generic/math/log10.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/math/clc_log10.h>
 #include <clc/opencl/math/log10.h>
 
diff --git a/libclc/opencl/lib/generic/math/log2.cl 
b/libclc/opencl/lib/generic/math/log2.cl
index a52a52e28f63f..d072b313f8388 100644
--- a/libclc/opencl/lib/generic/math/log2.cl
+++ b/libclc/opencl/lib/generic/math/log2.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/math/clc_log2.h>
 #include <clc/opencl/math/log2.h>
 
diff --git a/libclc/opencl/lib/generic/math/nan.cl 
b/libclc/opencl/lib/generic/math/nan.cl
index 5597df8b2ac68..df0629fbf55ad 100644
--- a/libclc/opencl/lib/generic/math/nan.cl
+++ b/libclc/opencl/lib/generic/math/nan.cl
@@ -6,7 +6,6 @@
 //
 
//===----------------------------------------------------------------------===//
 
-#include <clc/clcmacro.h>
 #include <clc/math/clc_nan.h>
 
 #define __CLC_BODY <nan.inc>

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to