From 1e33e12f252f55245d78e01fc25a99147c794247 Mon Sep 17 00:00:00 2001 From: Sameer Sahasrabuddhe Date: Tue, 9 Dec 2025 07:35:46 +0530 Subject: [PATCH 01/11] [AMDGPU][NFC] fix function names in debug log for SIInsertWaitcnts --- llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp index 664ce126e64a1..c62773daac53e 100644 --- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp +++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp @@ -1540,7 +1540,7 @@ bool WaitcntGeneratorPreGFX12::createNewWaitcnt( BuildMI(Block, It, DL, TII->get(AMDGPU::S_WAITCNT)).addImm(Enc); Modified = true; - LLVM_DEBUG(dbgs() << "generateWaitcnt\n"; + LLVM_DEBUG(dbgs() << "PreGFX12::createNewWaitcnt\n"; if (It != Block.instr_end()) dbgs() << "Old Instr: " << *It; dbgs() << "New Instr: " << *SWaitInst << '\n'); } @@ -1554,7 +1554,7 @@ bool WaitcntGeneratorPreGFX12::createNewWaitcnt( .addImm(Wait.StoreCnt); Modified = true; - LLVM_DEBUG(dbgs() << "generateWaitcnt\n"; + LLVM_DEBUG(dbgs() << "PreGFX12::createNewWaitcnt\n"; if (It != Block.instr_end()) dbgs() << "Old Instr: " << *It; dbgs() << "New Instr: " << *SWaitInst << '\n'); } @@ -1821,7 +1821,7 @@ bool WaitcntGeneratorGFX12Plus::createNewWaitcnt( if (SWaitInst) { Modified = true; - LLVM_DEBUG(dbgs() << "generateWaitcnt\n"; + LLVM_DEBUG(dbgs() << "GFX12Plus::createNewWaitcnt\n"; if (It != Block.instr_end()) dbgs() << "Old Instr: " << *It; dbgs() << "New Instr: " << *SWaitInst << '\n'); } @@ -1841,7 +1841,7 @@ bool WaitcntGeneratorGFX12Plus::createNewWaitcnt( Modified = true; - LLVM_DEBUG(dbgs() << "generateWaitcnt\n"; + LLVM_DEBUG(dbgs() << "GFX12Plus::createNewWaitcnt\n"; if (It != Block.instr_end()) dbgs() << "Old Instr: " << *It; dbgs() << "New Instr: " << *SWaitInst << '\n'); } From 8c8196c8021f21fd39145d03337bf0e8fd214857 Mon Sep 17 00:00:00 2001 From: Sameer Sahasrabuddhe Date: Tue, 9 Dec 2025 07:42:37 +0530 Subject: [PATCH 02/11] [AMDGPU][NFC] cleanup whitespace in debug log of SIInsertWaitcnts --- llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp index c62773daac53e..146f3604d9f8f 100644 --- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp +++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp @@ -1114,33 +1114,33 @@ void WaitcntBrackets::print(raw_ostream &OS) const { switch (T) { case LOAD_CNT: OS << " " << (ST->hasExtendedWaitCounts() ? "LOAD" : "VM") << "_CNT(" - << SR << "): "; + << SR << "):"; break; case DS_CNT: OS << " " << (ST->hasExtendedWaitCounts() ? "DS" : "LGKM") << "_CNT(" - << SR << "): "; + << SR << "):"; break; case EXP_CNT: - OS << " EXP_CNT(" << SR << "): "; + OS << " EXP_CNT(" << SR << "):"; break; case STORE_CNT: OS << " " << (ST->hasExtendedWaitCounts() ? "STORE" : "VS") << "_CNT(" - << SR << "): "; + << SR << "):"; break; case SAMPLE_CNT: - OS << " SAMPLE_CNT(" << SR << "): "; + OS << " SAMPLE_CNT(" << SR << "):"; break; case BVH_CNT: - OS << " BVH_CNT(" << SR << "): "; + OS << " BVH_CNT(" << SR << "):"; break; case KM_CNT: - OS << " KM_CNT(" << SR << "): "; + OS << " KM_CNT(" << SR << "):"; break; case X_CNT: - OS << " X_CNT(" << SR << "): "; + OS << " X_CNT(" << SR << "):"; break; default: - OS << " UNKNOWN(" << SR << "): "; + OS << " UNKNOWN(" << SR << "):"; break; } @@ -1154,9 +1154,9 @@ void WaitcntBrackets::print(raw_ostream &OS) const { continue; unsigned RelScore = RegScore - LB - 1; if (J < FIRST_LDS_VGPR) { - OS << RelScore << ":v" << J << " "; + OS << ' ' << RelScore << ":v" << J; } else { - OS << RelScore << ":ds "; + OS << ' ' << RelScore << ":ds"; } } // Also need to print sgpr scores for lgkm_cnt or xcnt. @@ -1166,11 +1166,11 @@ void WaitcntBrackets::print(raw_ostream &OS) const { if (RegScore <= LB) continue; unsigned RelScore = RegScore - LB - 1; - OS << RelScore << ":s" << J << " "; + OS << ' ' << RelScore << ":s" << J; } } if (T == KM_CNT && SCCScore > 0) - OS << SCCScore << ":scc "; + OS << ' ' << SCCScore << ":scc"; } OS << '\n'; } From 9fc1c49e4a98e1c312e7ff6028eb4e74787ebfdf Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 9 Dec 2025 11:08:29 +0800 Subject: [PATCH 03/11] [NFC][libclc] Delete OpenCL builtin declarations (#170803) This is follow-up of comment https://github.com/llvm/llvm-project/pull/168318#discussion_r2588117855 libclc OpenCL library is already compiled with flag `-fdeclare-opencl-builtins -finclude-default-header`. --- .../clc/opencl/async/async_work_group_copy.h | 30 ---- .../opencl/async/async_work_group_copy.inc | 12 -- .../async/async_work_group_strided_copy.h | 30 ---- .../async/async_work_group_strided_copy.inc | 12 -- .../include/clc/opencl/async/prefetch.h | 18 --- .../include/clc/opencl/async/prefetch.inc | 10 -- .../clc/opencl/async/wait_group_events.h | 17 --- .../include/clc/opencl/atomic/atom_add.h | 31 ---- .../include/clc/opencl/atomic/atom_and.h | 31 ---- .../include/clc/opencl/atomic/atom_cmpxchg.h | 46 ------ .../include/clc/opencl/atomic/atom_dec.h | 35 ----- .../clc/opencl/atomic/atom_decl_int32.inc | 18 --- .../clc/opencl/atomic/atom_decl_int64.inc | 19 --- .../include/clc/opencl/atomic/atom_inc.h | 35 ----- .../include/clc/opencl/atomic/atom_max.h | 31 ---- .../include/clc/opencl/atomic/atom_min.h | 31 ---- .../include/clc/opencl/atomic/atom_or.h | 31 ---- .../include/clc/opencl/atomic/atom_sub.h | 31 ---- .../include/clc/opencl/atomic/atom_xchg.h | 31 ---- .../include/clc/opencl/atomic/atom_xor.h | 31 ---- .../include/clc/opencl/atomic/atomic_add.h | 17 --- .../include/clc/opencl/atomic/atomic_and.h | 17 --- .../clc/opencl/atomic/atomic_cmpxchg.h | 19 --- .../atomic/atomic_compare_exchange_strong.h | 26 ---- .../atomic/atomic_compare_exchange_weak.h | 26 ---- .../include/clc/opencl/atomic/atomic_dec.h | 19 --- .../include/clc/opencl/atomic/atomic_decl.inc | 134 ------------------ .../clc/opencl/atomic/atomic_decl_legacy.inc | 22 --- .../clc/opencl/atomic/atomic_exchange.h | 24 ---- .../clc/opencl/atomic/atomic_fetch_add.h | 24 ---- .../clc/opencl/atomic/atomic_fetch_and.h | 21 --- .../clc/opencl/atomic/atomic_fetch_max.h | 24 ---- .../clc/opencl/atomic/atomic_fetch_min.h | 24 ---- .../clc/opencl/atomic/atomic_fetch_or.h | 21 --- .../clc/opencl/atomic/atomic_fetch_sub.h | 24 ---- .../clc/opencl/atomic/atomic_fetch_xor.h | 21 --- .../clc/opencl/atomic/atomic_flag_clear.h | 45 ------ .../opencl/atomic/atomic_flag_test_and_set.h | 49 ------- .../include/clc/opencl/atomic/atomic_inc.h | 19 --- .../include/clc/opencl/atomic/atomic_init.h | 24 ---- .../include/clc/opencl/atomic/atomic_init.inc | 44 ------ .../include/clc/opencl/atomic/atomic_load.h | 26 ---- .../include/clc/opencl/atomic/atomic_max.h | 17 --- .../include/clc/opencl/atomic/atomic_min.h | 17 --- .../include/clc/opencl/atomic/atomic_or.h | 17 --- .../include/clc/opencl/atomic/atomic_store.h | 26 ---- .../include/clc/opencl/atomic/atomic_sub.h | 17 --- .../include/clc/opencl/atomic/atomic_xchg.h | 20 --- .../include/clc/opencl/atomic/atomic_xor.h | 17 --- .../include/clc/opencl/common/degrees.h | 19 --- libclc/opencl/include/clc/opencl/common/mix.h | 15 -- .../opencl/include/clc/opencl/common/mix.inc | 17 --- .../include/clc/opencl/common/radians.h | 19 --- .../opencl/include/clc/opencl/common/sign.h | 17 --- .../include/clc/opencl/common/smoothstep.h | 15 -- .../include/clc/opencl/common/smoothstep.inc | 20 --- .../opencl/include/clc/opencl/common/step.h | 15 -- .../opencl/include/clc/opencl/common/step.inc | 15 -- .../explicit_fence/explicit_memory_fence.h | 18 --- .../include/clc/opencl/geometric/cross.h | 20 --- .../include/clc/opencl/geometric/distance.h | 19 --- .../opencl/include/clc/opencl/geometric/dot.h | 19 --- .../clc/opencl/geometric/fast_distance.h | 20 --- .../clc/opencl/geometric/fast_length.h | 20 --- .../clc/opencl/geometric/fast_normalize.h | 22 --- .../include/clc/opencl/geometric/length.h | 19 --- .../include/clc/opencl/geometric/normalize.h | 21 --- .../opencl/include/clc/opencl/image/image.h | 55 ------- .../include/clc/opencl/image/image_defines.h | 62 -------- .../opencl/include/clc/opencl/integer/abs.h | 17 --- .../opencl/include/clc/opencl/integer/abs.inc | 9 -- .../include/clc/opencl/integer/abs_diff.h | 17 --- .../include/clc/opencl/integer/abs_diff.inc | 10 -- .../include/clc/opencl/integer/add_sat.h | 21 --- .../include/clc/opencl/integer/bit_reverse.h | 25 ---- .../opencl/integer/bitfield_extract_signed.h | 27 ---- .../integer/bitfield_extract_unsigned.h | 27 ---- .../clc/opencl/integer/bitfield_insert.h | 23 --- .../opencl/include/clc/opencl/integer/clz.h | 21 --- .../opencl/include/clc/opencl/integer/ctz.h | 25 ---- .../opencl/include/clc/opencl/integer/hadd.h | 21 --- .../opencl/include/clc/opencl/integer/mad24.h | 21 --- .../include/clc/opencl/integer/mad_hi.h | 21 --- .../include/clc/opencl/integer/mad_sat.h | 21 --- .../opencl/include/clc/opencl/integer/mul24.h | 21 --- .../include/clc/opencl/integer/mul_hi.h | 21 --- .../include/clc/opencl/integer/popcount.h | 21 --- .../opencl/include/clc/opencl/integer/rhadd.h | 19 --- .../include/clc/opencl/integer/rotate.h | 21 --- .../include/clc/opencl/integer/sub_sat.h | 19 --- .../include/clc/opencl/integer/upsample.h | 39 ----- libclc/opencl/include/clc/opencl/math/acos.h | 19 --- libclc/opencl/include/clc/opencl/math/acosh.h | 19 --- .../opencl/include/clc/opencl/math/acospi.h | 19 --- libclc/opencl/include/clc/opencl/math/asin.h | 19 --- libclc/opencl/include/clc/opencl/math/asinh.h | 19 --- .../opencl/include/clc/opencl/math/asinpi.h | 19 --- libclc/opencl/include/clc/opencl/math/atan.h | 19 --- libclc/opencl/include/clc/opencl/math/atan2.h | 19 --- .../opencl/include/clc/opencl/math/atan2pi.h | 19 --- libclc/opencl/include/clc/opencl/math/atanh.h | 19 --- .../opencl/include/clc/opencl/math/atanpi.h | 19 --- libclc/opencl/include/clc/opencl/math/cbrt.h | 19 --- libclc/opencl/include/clc/opencl/math/ceil.h | 19 --- .../opencl/include/clc/opencl/math/copysign.h | 19 --- libclc/opencl/include/clc/opencl/math/cos.h | 19 --- libclc/opencl/include/clc/opencl/math/cosh.h | 19 --- libclc/opencl/include/clc/opencl/math/cospi.h | 19 --- libclc/opencl/include/clc/opencl/math/erf.h | 21 --- libclc/opencl/include/clc/opencl/math/erfc.h | 21 --- libclc/opencl/include/clc/opencl/math/exp.h | 21 --- libclc/opencl/include/clc/opencl/math/exp10.h | 21 --- libclc/opencl/include/clc/opencl/math/exp2.h | 19 --- libclc/opencl/include/clc/opencl/math/expm1.h | 21 --- libclc/opencl/include/clc/opencl/math/fabs.h | 19 --- libclc/opencl/include/clc/opencl/math/fdim.h | 19 --- libclc/opencl/include/clc/opencl/math/floor.h | 19 --- libclc/opencl/include/clc/opencl/math/fma.h | 19 --- libclc/opencl/include/clc/opencl/math/fmax.h | 19 --- libclc/opencl/include/clc/opencl/math/fmin.h | 19 --- libclc/opencl/include/clc/opencl/math/fmod.h | 17 --- libclc/opencl/include/clc/opencl/math/fract.h | 17 --- libclc/opencl/include/clc/opencl/math/frexp.h | 18 --- .../opencl/include/clc/opencl/math/half_cos.h | 20 --- .../include/clc/opencl/math/half_divide.h | 19 --- .../opencl/include/clc/opencl/math/half_exp.h | 20 --- .../include/clc/opencl/math/half_exp10.h | 20 --- .../include/clc/opencl/math/half_exp2.h | 20 --- .../opencl/include/clc/opencl/math/half_log.h | 20 --- .../include/clc/opencl/math/half_log10.h | 20 --- .../include/clc/opencl/math/half_log2.h | 20 --- .../include/clc/opencl/math/half_powr.h | 19 --- .../include/clc/opencl/math/half_recip.h | 20 --- .../include/clc/opencl/math/half_rsqrt.h | 18 --- .../opencl/include/clc/opencl/math/half_sin.h | 20 --- .../include/clc/opencl/math/half_sqrt.h | 18 --- .../opencl/include/clc/opencl/math/half_tan.h | 20 --- libclc/opencl/include/clc/opencl/math/hypot.h | 19 --- libclc/opencl/include/clc/opencl/math/ilogb.h | 19 --- libclc/opencl/include/clc/opencl/math/ldexp.h | 20 --- .../opencl/include/clc/opencl/math/ldexp.inc | 13 -- .../opencl/include/clc/opencl/math/lgamma.h | 19 --- .../opencl/include/clc/opencl/math/lgamma_r.h | 19 --- libclc/opencl/include/clc/opencl/math/log.h | 19 --- libclc/opencl/include/clc/opencl/math/log10.h | 19 --- libclc/opencl/include/clc/opencl/math/log1p.h | 19 --- libclc/opencl/include/clc/opencl/math/log2.h | 19 --- libclc/opencl/include/clc/opencl/math/logb.h | 19 --- libclc/opencl/include/clc/opencl/math/mad.h | 19 --- .../opencl/include/clc/opencl/math/maxmag.h | 19 --- .../opencl/include/clc/opencl/math/minmag.h | 19 --- libclc/opencl/include/clc/opencl/math/modf.h | 18 --- libclc/opencl/include/clc/opencl/math/nan.h | 15 -- libclc/opencl/include/clc/opencl/math/nan.inc | 9 -- .../include/clc/opencl/math/native_cos.h | 20 --- .../include/clc/opencl/math/native_divide.h | 19 --- .../include/clc/opencl/math/native_exp.h | 20 --- .../include/clc/opencl/math/native_exp10.h | 20 --- .../include/clc/opencl/math/native_exp2.h | 20 --- .../include/clc/opencl/math/native_log.h | 20 --- .../include/clc/opencl/math/native_log10.h | 20 --- .../include/clc/opencl/math/native_log2.h | 20 --- .../include/clc/opencl/math/native_powr.h | 19 --- .../include/clc/opencl/math/native_recip.h | 20 --- .../include/clc/opencl/math/native_rsqrt.h | 20 --- .../include/clc/opencl/math/native_sin.h | 20 --- .../include/clc/opencl/math/native_sqrt.h | 20 --- .../include/clc/opencl/math/native_tan.h | 20 --- .../include/clc/opencl/math/nextafter.h | 19 --- libclc/opencl/include/clc/opencl/math/pow.h | 17 --- libclc/opencl/include/clc/opencl/math/pown.h | 19 --- libclc/opencl/include/clc/opencl/math/powr.h | 17 --- .../include/clc/opencl/math/remainder.h | 17 --- .../opencl/include/clc/opencl/math/remquo.h | 26 ---- libclc/opencl/include/clc/opencl/math/rint.h | 19 --- libclc/opencl/include/clc/opencl/math/rootn.h | 19 --- libclc/opencl/include/clc/opencl/math/round.h | 19 --- libclc/opencl/include/clc/opencl/math/rsqrt.h | 19 --- libclc/opencl/include/clc/opencl/math/sin.h | 19 --- .../opencl/include/clc/opencl/math/sincos.h | 17 --- libclc/opencl/include/clc/opencl/math/sinh.h | 19 --- libclc/opencl/include/clc/opencl/math/sinpi.h | 19 --- libclc/opencl/include/clc/opencl/math/sqrt.h | 19 --- libclc/opencl/include/clc/opencl/math/tan.h | 19 --- libclc/opencl/include/clc/opencl/math/tanh.h | 19 --- libclc/opencl/include/clc/opencl/math/tanpi.h | 19 --- .../opencl/include/clc/opencl/math/tgamma.h | 19 --- libclc/opencl/include/clc/opencl/math/trunc.h | 19 --- .../opencl/include/clc/opencl/misc/shuffle.h | 24 ---- .../opencl/include/clc/opencl/misc/shuffle2.h | 24 ---- .../include/clc/opencl/relational/all.h | 32 ----- .../include/clc/opencl/relational/any.h | 32 ----- .../include/clc/opencl/relational/bitselect.h | 19 --- .../clc/opencl/relational/bitselect.inc | 11 -- .../include/clc/opencl/relational/isequal.h | 39 ----- .../include/clc/opencl/relational/isfinite.h | 21 --- .../include/clc/opencl/relational/isgreater.h | 21 --- .../clc/opencl/relational/isgreaterequal.h | 21 --- .../include/clc/opencl/relational/isinf.h | 40 ------ .../include/clc/opencl/relational/isless.h | 21 --- .../clc/opencl/relational/islessequal.h | 21 --- .../clc/opencl/relational/islessgreater.h | 21 --- .../include/clc/opencl/relational/isnan.h | 40 ------ .../include/clc/opencl/relational/isnormal.h | 21 --- .../clc/opencl/relational/isnotequal.h | 21 --- .../include/clc/opencl/relational/isordered.h | 21 --- .../clc/opencl/relational/isunordered.h | 21 --- .../include/clc/opencl/relational/select.h | 23 --- .../include/clc/opencl/relational/signbit.h | 21 --- .../opencl/include/clc/opencl/shared/clamp.h | 18 --- .../include/clc/opencl/shared/clamp.inc | 17 --- libclc/opencl/include/clc/opencl/shared/max.h | 18 --- .../opencl/include/clc/opencl/shared/max.inc | 15 -- libclc/opencl/include/clc/opencl/shared/min.h | 18 --- .../opencl/include/clc/opencl/shared/min.inc | 15 -- .../opencl/include/clc/opencl/shared/vload.h | 88 ------------ .../opencl/include/clc/opencl/shared/vstore.h | 91 ------------ .../clc/opencl/synchronization/barrier.h | 16 --- .../clc/opencl/workitem/get_global_id.h | 16 --- .../clc/opencl/workitem/get_global_offset.h | 16 --- .../clc/opencl/workitem/get_global_size.h | 16 --- .../clc/opencl/workitem/get_group_id.h | 16 --- .../clc/opencl/workitem/get_local_id.h | 16 --- .../clc/opencl/workitem/get_local_linear_id.h | 16 --- .../clc/opencl/workitem/get_local_size.h | 16 --- .../opencl/workitem/get_max_sub_group_size.h | 16 --- .../clc/opencl/workitem/get_num_groups.h | 16 --- .../clc/opencl/workitem/get_num_sub_groups.h | 16 --- .../clc/opencl/workitem/get_sub_group_id.h | 16 --- .../opencl/workitem/get_sub_group_local_id.h | 16 --- .../clc/opencl/workitem/get_sub_group_size.h | 16 --- .../clc/opencl/workitem/get_work_dim.h | 16 --- .../amdgcn-amdhsa/workitem/get_global_size.cl | 2 +- .../amdgcn-amdhsa/workitem/get_local_size.cl | 2 +- .../amdgcn-amdhsa/workitem/get_num_groups.cl | 4 +- libclc/opencl/lib/amdgcn/mem_fence/fence.cl | 1 - .../lib/amdgcn/synchronization/barrier.cl | 1 - .../lib/amdgcn/workitem/get_global_offset.cl | 1 - .../lib/amdgcn/workitem/get_global_size.cl | 1 - .../lib/amdgcn/workitem/get_group_id.cl | 1 - .../lib/amdgcn/workitem/get_local_id.cl | 1 - .../lib/amdgcn/workitem/get_local_size.cl | 2 +- .../lib/amdgcn/workitem/get_num_groups.cl | 2 +- .../lib/amdgcn/workitem/get_work_dim.cl | 1 - libclc/opencl/lib/clspv/math/fma.cl | 1 - libclc/opencl/lib/clspv/shared/vstore_half.cl | 8 +- .../generic/async/async_work_group_copy.cl | 3 +- .../async/async_work_group_strided_copy.cl | 4 +- libclc/opencl/lib/generic/async/prefetch.cl | 1 - .../lib/generic/async/wait_group_events.cl | 3 +- libclc/opencl/lib/generic/atomic/atom_add.cl | 1 - libclc/opencl/lib/generic/atomic/atom_and.cl | 1 - .../opencl/lib/generic/atomic/atom_cmpxchg.cl | 1 - libclc/opencl/lib/generic/atomic/atom_dec.cl | 1 - libclc/opencl/lib/generic/atomic/atom_inc.cl | 1 - libclc/opencl/lib/generic/atomic/atom_max.cl | 1 - libclc/opencl/lib/generic/atomic/atom_min.cl | 1 - libclc/opencl/lib/generic/atomic/atom_or.cl | 1 - libclc/opencl/lib/generic/atomic/atom_sub.cl | 1 - libclc/opencl/lib/generic/atomic/atom_xchg.cl | 1 - libclc/opencl/lib/generic/atomic/atom_xor.cl | 1 - .../opencl/lib/generic/atomic/atomic_add.cl | 1 - .../opencl/lib/generic/atomic/atomic_and.cl | 1 - .../lib/generic/atomic/atomic_cmpxchg.cl | 1 - .../atomic/atomic_compare_exchange_strong.cl | 1 - .../atomic/atomic_compare_exchange_weak.cl | 1 - .../opencl/lib/generic/atomic/atomic_dec.cl | 1 - .../lib/generic/atomic/atomic_exchange.cl | 1 - .../lib/generic/atomic/atomic_fetch_add.cl | 1 - .../lib/generic/atomic/atomic_fetch_and.cl | 1 - .../lib/generic/atomic/atomic_fetch_max.cl | 1 - .../lib/generic/atomic/atomic_fetch_min.cl | 1 - .../lib/generic/atomic/atomic_fetch_or.cl | 1 - .../lib/generic/atomic/atomic_fetch_sub.cl | 1 - .../lib/generic/atomic/atomic_fetch_xor.cl | 1 - .../lib/generic/atomic/atomic_flag_clear.cl | 1 - .../atomic/atomic_flag_test_and_set.cl | 1 - .../opencl/lib/generic/atomic/atomic_inc.cl | 1 - .../opencl/lib/generic/atomic/atomic_init.cl | 1 - .../opencl/lib/generic/atomic/atomic_load.cl | 1 - .../opencl/lib/generic/atomic/atomic_max.cl | 1 - .../opencl/lib/generic/atomic/atomic_min.cl | 1 - libclc/opencl/lib/generic/atomic/atomic_or.cl | 1 - .../opencl/lib/generic/atomic/atomic_store.cl | 1 - .../opencl/lib/generic/atomic/atomic_sub.cl | 1 - .../opencl/lib/generic/atomic/atomic_xchg.cl | 1 - .../opencl/lib/generic/atomic/atomic_xor.cl | 1 - libclc/opencl/lib/generic/common/degrees.cl | 1 - libclc/opencl/lib/generic/common/mix.cl | 1 - libclc/opencl/lib/generic/common/radians.cl | 1 - libclc/opencl/lib/generic/common/sign.cl | 1 - .../opencl/lib/generic/common/smoothstep.cl | 1 - libclc/opencl/lib/generic/common/step.cl | 1 - libclc/opencl/lib/generic/geometric/cross.cl | 1 - .../opencl/lib/generic/geometric/distance.cl | 1 - libclc/opencl/lib/generic/geometric/dot.cl | 1 - .../lib/generic/geometric/fast_distance.cl | 1 - .../lib/generic/geometric/fast_length.cl | 1 - .../lib/generic/geometric/fast_normalize.cl | 1 - libclc/opencl/lib/generic/geometric/length.cl | 1 - .../opencl/lib/generic/geometric/normalize.cl | 1 - libclc/opencl/lib/generic/integer/abs.cl | 1 - libclc/opencl/lib/generic/integer/abs_diff.cl | 1 - libclc/opencl/lib/generic/integer/add_sat.cl | 1 - .../opencl/lib/generic/integer/bit_reverse.cl | 1 - .../integer/bitfield_extract_signed.cl | 1 - .../integer/bitfield_extract_unsigned.cl | 1 - .../lib/generic/integer/bitfield_insert.cl | 1 - libclc/opencl/lib/generic/integer/clz.cl | 1 - libclc/opencl/lib/generic/integer/ctz.cl | 1 - libclc/opencl/lib/generic/integer/hadd.cl | 1 - libclc/opencl/lib/generic/integer/mad24.cl | 1 - libclc/opencl/lib/generic/integer/mad_hi.cl | 1 - libclc/opencl/lib/generic/integer/mad_sat.cl | 1 - libclc/opencl/lib/generic/integer/mul24.cl | 1 - libclc/opencl/lib/generic/integer/mul_hi.cl | 1 - libclc/opencl/lib/generic/integer/popcount.cl | 1 - libclc/opencl/lib/generic/integer/rhadd.cl | 1 - libclc/opencl/lib/generic/integer/rotate.cl | 1 - libclc/opencl/lib/generic/integer/sub_sat.cl | 1 - libclc/opencl/lib/generic/integer/upsample.cl | 1 - libclc/opencl/lib/generic/math/acos.cl | 1 - libclc/opencl/lib/generic/math/acosh.cl | 1 - libclc/opencl/lib/generic/math/acospi.cl | 1 - libclc/opencl/lib/generic/math/asin.cl | 1 - libclc/opencl/lib/generic/math/asinh.cl | 1 - libclc/opencl/lib/generic/math/asinpi.cl | 1 - libclc/opencl/lib/generic/math/atan.cl | 1 - libclc/opencl/lib/generic/math/atan2.cl | 1 - libclc/opencl/lib/generic/math/atan2pi.cl | 1 - libclc/opencl/lib/generic/math/atanh.cl | 1 - libclc/opencl/lib/generic/math/atanpi.cl | 1 - libclc/opencl/lib/generic/math/cbrt.cl | 1 - libclc/opencl/lib/generic/math/ceil.cl | 1 - libclc/opencl/lib/generic/math/copysign.cl | 1 - libclc/opencl/lib/generic/math/cos.cl | 1 - libclc/opencl/lib/generic/math/cosh.cl | 1 - libclc/opencl/lib/generic/math/cospi.cl | 1 - libclc/opencl/lib/generic/math/erf.cl | 1 - libclc/opencl/lib/generic/math/erfc.cl | 1 - libclc/opencl/lib/generic/math/exp.cl | 1 - libclc/opencl/lib/generic/math/exp10.cl | 1 - libclc/opencl/lib/generic/math/exp2.cl | 1 - libclc/opencl/lib/generic/math/expm1.cl | 1 - libclc/opencl/lib/generic/math/fabs.cl | 1 - libclc/opencl/lib/generic/math/fdim.cl | 1 - libclc/opencl/lib/generic/math/floor.cl | 1 - libclc/opencl/lib/generic/math/fma.cl | 1 - libclc/opencl/lib/generic/math/fmax.cl | 1 - libclc/opencl/lib/generic/math/fmin.cl | 1 - libclc/opencl/lib/generic/math/fmod.cl | 1 - libclc/opencl/lib/generic/math/fract.cl | 1 - libclc/opencl/lib/generic/math/frexp.cl | 1 - libclc/opencl/lib/generic/math/half_cos.cl | 1 - libclc/opencl/lib/generic/math/half_divide.cl | 1 - libclc/opencl/lib/generic/math/half_exp.cl | 1 - libclc/opencl/lib/generic/math/half_exp10.cl | 1 - libclc/opencl/lib/generic/math/half_exp2.cl | 1 - libclc/opencl/lib/generic/math/half_log.cl | 1 - libclc/opencl/lib/generic/math/half_log10.cl | 1 - libclc/opencl/lib/generic/math/half_log2.cl | 1 - libclc/opencl/lib/generic/math/half_powr.cl | 1 - libclc/opencl/lib/generic/math/half_recip.cl | 1 - libclc/opencl/lib/generic/math/half_rsqrt.cl | 1 - libclc/opencl/lib/generic/math/half_sin.cl | 1 - libclc/opencl/lib/generic/math/half_sqrt.cl | 1 - libclc/opencl/lib/generic/math/half_tan.cl | 1 - libclc/opencl/lib/generic/math/hypot.cl | 1 - libclc/opencl/lib/generic/math/ilogb.cl | 1 - libclc/opencl/lib/generic/math/ldexp.cl | 1 - libclc/opencl/lib/generic/math/lgamma.cl | 1 - libclc/opencl/lib/generic/math/lgamma_r.cl | 1 - libclc/opencl/lib/generic/math/log.cl | 1 - libclc/opencl/lib/generic/math/log10.cl | 1 - libclc/opencl/lib/generic/math/log1p.cl | 1 - libclc/opencl/lib/generic/math/log2.cl | 1 - libclc/opencl/lib/generic/math/logb.cl | 1 - libclc/opencl/lib/generic/math/mad.cl | 1 - libclc/opencl/lib/generic/math/maxmag.cl | 1 - libclc/opencl/lib/generic/math/minmag.cl | 1 - libclc/opencl/lib/generic/math/modf.cl | 1 - libclc/opencl/lib/generic/math/native_cos.cl | 1 - .../opencl/lib/generic/math/native_divide.cl | 1 - libclc/opencl/lib/generic/math/native_exp.cl | 1 - .../opencl/lib/generic/math/native_exp10.cl | 1 - libclc/opencl/lib/generic/math/native_exp2.cl | 1 - libclc/opencl/lib/generic/math/native_log.cl | 1 - .../opencl/lib/generic/math/native_log10.cl | 1 - libclc/opencl/lib/generic/math/native_log2.cl | 1 - libclc/opencl/lib/generic/math/native_powr.cl | 1 - .../opencl/lib/generic/math/native_recip.cl | 1 - .../opencl/lib/generic/math/native_rsqrt.cl | 1 - libclc/opencl/lib/generic/math/native_sin.cl | 1 - libclc/opencl/lib/generic/math/native_sqrt.cl | 1 - libclc/opencl/lib/generic/math/native_tan.cl | 1 - libclc/opencl/lib/generic/math/nextafter.cl | 1 - libclc/opencl/lib/generic/math/pow.cl | 1 - libclc/opencl/lib/generic/math/pown.cl | 1 - libclc/opencl/lib/generic/math/powr.cl | 1 - libclc/opencl/lib/generic/math/remainder.cl | 1 - libclc/opencl/lib/generic/math/remquo.cl | 1 - libclc/opencl/lib/generic/math/rint.cl | 1 - libclc/opencl/lib/generic/math/rootn.cl | 1 - libclc/opencl/lib/generic/math/round.cl | 1 - libclc/opencl/lib/generic/math/rsqrt.cl | 1 - libclc/opencl/lib/generic/math/sin.cl | 1 - libclc/opencl/lib/generic/math/sincos.cl | 1 - libclc/opencl/lib/generic/math/sinh.cl | 1 - libclc/opencl/lib/generic/math/sinpi.cl | 1 - libclc/opencl/lib/generic/math/sqrt.cl | 1 - libclc/opencl/lib/generic/math/tan.cl | 1 - libclc/opencl/lib/generic/math/tanh.cl | 1 - libclc/opencl/lib/generic/math/tanpi.cl | 1 - libclc/opencl/lib/generic/math/tgamma.cl | 1 - libclc/opencl/lib/generic/math/trunc.cl | 1 - libclc/opencl/lib/generic/misc/shuffle.cl | 1 - libclc/opencl/lib/generic/misc/shuffle2.cl | 1 - libclc/opencl/lib/generic/relational/all.cl | 1 - libclc/opencl/lib/generic/relational/any.cl | 1 - .../lib/generic/relational/bitselect.cl | 1 - .../opencl/lib/generic/relational/isequal.cl | 1 - .../opencl/lib/generic/relational/isfinite.cl | 1 - .../lib/generic/relational/isgreater.cl | 1 - .../lib/generic/relational/isgreaterequal.cl | 1 - libclc/opencl/lib/generic/relational/isinf.cl | 1 - .../opencl/lib/generic/relational/isless.cl | 1 - .../lib/generic/relational/islessequal.cl | 1 - .../lib/generic/relational/islessgreater.cl | 1 - libclc/opencl/lib/generic/relational/isnan.cl | 1 - .../opencl/lib/generic/relational/isnormal.cl | 1 - .../lib/generic/relational/isnotequal.cl | 1 - .../lib/generic/relational/isordered.cl | 1 - .../lib/generic/relational/isunordered.cl | 1 - .../opencl/lib/generic/relational/select.cl | 1 - .../opencl/lib/generic/relational/signbit.cl | 1 - libclc/opencl/lib/generic/shared/clamp.cl | 1 - libclc/opencl/lib/generic/shared/max.cl | 1 - libclc/opencl/lib/generic/shared/min.cl | 1 - libclc/opencl/lib/generic/shared/vload.cl | 1 - libclc/opencl/lib/generic/shared/vstore.cl | 1 - .../lib/generic/workitem/get_global_id.cl | 6 +- .../lib/generic/workitem/get_global_size.cl | 4 +- .../lib/ptx-nvidiacl/mem_fence/fence.cl | 1 - .../ptx-nvidiacl/synchronization/barrier.cl | 1 - .../ptx-nvidiacl/workitem/get_global_id.cl | 1 - .../lib/ptx-nvidiacl/workitem/get_group_id.cl | 1 - .../lib/ptx-nvidiacl/workitem/get_local_id.cl | 1 - .../workitem/get_local_linear_id.cl | 1 - .../ptx-nvidiacl/workitem/get_local_size.cl | 1 - .../workitem/get_max_sub_group_size.cl | 1 - .../ptx-nvidiacl/workitem/get_num_groups.cl | 1 - .../workitem/get_num_sub_groups.cl | 1 - .../ptx-nvidiacl/workitem/get_sub_group_id.cl | 1 - .../workitem/get_sub_group_local_id.cl | 1 - .../workitem/get_sub_group_size.cl | 1 - .../r600/image/get_image_channel_data_type.cl | 2 +- .../lib/r600/image/get_image_channel_order.cl | 2 +- .../opencl/lib/r600/image/get_image_depth.cl | 2 +- libclc/opencl/lib/r600/image/get_image_dim.cl | 2 +- .../opencl/lib/r600/image/get_image_height.cl | 2 +- .../opencl/lib/r600/image/get_image_width.cl | 2 +- libclc/opencl/lib/r600/image/read_imagef.cl | 2 +- libclc/opencl/lib/r600/image/read_imagei.cl | 2 +- libclc/opencl/lib/r600/image/read_imageui.cl | 2 +- libclc/opencl/lib/r600/image/write_imagef.cl | 2 +- libclc/opencl/lib/r600/image/write_imagei.cl | 2 +- libclc/opencl/lib/r600/image/write_imageui.cl | 2 +- .../lib/r600/synchronization/barrier.cl | 2 +- .../lib/r600/workitem/get_global_offset.cl | 2 +- .../lib/r600/workitem/get_global_size.cl | 2 +- .../opencl/lib/r600/workitem/get_group_id.cl | 2 +- .../opencl/lib/r600/workitem/get_local_id.cl | 2 +- .../lib/r600/workitem/get_local_size.cl | 2 +- .../lib/r600/workitem/get_num_groups.cl | 2 +- .../opencl/lib/r600/workitem/get_work_dim.cl | 2 +- libclc/opencl/lib/spirv/math/fma.cl | 1 - 476 files changed, 31 insertions(+), 5389 deletions(-) delete mode 100644 libclc/opencl/include/clc/opencl/async/async_work_group_copy.h delete mode 100644 libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc delete mode 100644 libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h delete mode 100644 libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc delete mode 100644 libclc/opencl/include/clc/opencl/async/prefetch.h delete mode 100644 libclc/opencl/include/clc/opencl/async/prefetch.inc delete mode 100644 libclc/opencl/include/clc/opencl/async/wait_group_events.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_add.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_and.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_dec.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_inc.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_max.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_min.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_or.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_sub.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_xchg.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atom_xor.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_add.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_and.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_strong.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_weak.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_dec.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_decl_legacy.inc delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_exchange.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_add.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_and.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_max.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_min.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_or.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_sub.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_fetch_xor.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_flag_clear.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_flag_test_and_set.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_inc.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_init.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_init.inc delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_load.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_max.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_min.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_or.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_store.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_sub.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h delete mode 100644 libclc/opencl/include/clc/opencl/atomic/atomic_xor.h delete mode 100644 libclc/opencl/include/clc/opencl/common/degrees.h delete mode 100644 libclc/opencl/include/clc/opencl/common/mix.h delete mode 100644 libclc/opencl/include/clc/opencl/common/mix.inc delete mode 100644 libclc/opencl/include/clc/opencl/common/radians.h delete mode 100644 libclc/opencl/include/clc/opencl/common/sign.h delete mode 100644 libclc/opencl/include/clc/opencl/common/smoothstep.h delete mode 100644 libclc/opencl/include/clc/opencl/common/smoothstep.inc delete mode 100644 libclc/opencl/include/clc/opencl/common/step.h delete mode 100644 libclc/opencl/include/clc/opencl/common/step.inc delete mode 100644 libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h delete mode 100644 libclc/opencl/include/clc/opencl/geometric/cross.h delete mode 100644 libclc/opencl/include/clc/opencl/geometric/distance.h delete mode 100644 libclc/opencl/include/clc/opencl/geometric/dot.h delete mode 100644 libclc/opencl/include/clc/opencl/geometric/fast_distance.h delete mode 100644 libclc/opencl/include/clc/opencl/geometric/fast_length.h delete mode 100644 libclc/opencl/include/clc/opencl/geometric/fast_normalize.h delete mode 100644 libclc/opencl/include/clc/opencl/geometric/length.h delete mode 100644 libclc/opencl/include/clc/opencl/geometric/normalize.h delete mode 100644 libclc/opencl/include/clc/opencl/image/image.h delete mode 100644 libclc/opencl/include/clc/opencl/image/image_defines.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/abs.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/abs.inc delete mode 100644 libclc/opencl/include/clc/opencl/integer/abs_diff.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/abs_diff.inc delete mode 100644 libclc/opencl/include/clc/opencl/integer/add_sat.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/bit_reverse.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/bitfield_extract_signed.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/bitfield_extract_unsigned.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/bitfield_insert.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/clz.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/ctz.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/hadd.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/mad24.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/mad_hi.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/mad_sat.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/mul24.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/mul_hi.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/popcount.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/rhadd.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/rotate.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/sub_sat.h delete mode 100644 libclc/opencl/include/clc/opencl/integer/upsample.h delete mode 100644 libclc/opencl/include/clc/opencl/math/acos.h delete mode 100644 libclc/opencl/include/clc/opencl/math/acosh.h delete mode 100644 libclc/opencl/include/clc/opencl/math/acospi.h delete mode 100644 libclc/opencl/include/clc/opencl/math/asin.h delete mode 100644 libclc/opencl/include/clc/opencl/math/asinh.h delete mode 100644 libclc/opencl/include/clc/opencl/math/asinpi.h delete mode 100644 libclc/opencl/include/clc/opencl/math/atan.h delete mode 100644 libclc/opencl/include/clc/opencl/math/atan2.h delete mode 100644 libclc/opencl/include/clc/opencl/math/atan2pi.h delete mode 100644 libclc/opencl/include/clc/opencl/math/atanh.h delete mode 100644 libclc/opencl/include/clc/opencl/math/atanpi.h delete mode 100644 libclc/opencl/include/clc/opencl/math/cbrt.h delete mode 100644 libclc/opencl/include/clc/opencl/math/ceil.h delete mode 100644 libclc/opencl/include/clc/opencl/math/copysign.h delete mode 100644 libclc/opencl/include/clc/opencl/math/cos.h delete mode 100644 libclc/opencl/include/clc/opencl/math/cosh.h delete mode 100644 libclc/opencl/include/clc/opencl/math/cospi.h delete mode 100644 libclc/opencl/include/clc/opencl/math/erf.h delete mode 100644 libclc/opencl/include/clc/opencl/math/erfc.h delete mode 100644 libclc/opencl/include/clc/opencl/math/exp.h delete mode 100644 libclc/opencl/include/clc/opencl/math/exp10.h delete mode 100644 libclc/opencl/include/clc/opencl/math/exp2.h delete mode 100644 libclc/opencl/include/clc/opencl/math/expm1.h delete mode 100644 libclc/opencl/include/clc/opencl/math/fabs.h delete mode 100644 libclc/opencl/include/clc/opencl/math/fdim.h delete mode 100644 libclc/opencl/include/clc/opencl/math/floor.h delete mode 100644 libclc/opencl/include/clc/opencl/math/fma.h delete mode 100644 libclc/opencl/include/clc/opencl/math/fmax.h delete mode 100644 libclc/opencl/include/clc/opencl/math/fmin.h delete mode 100644 libclc/opencl/include/clc/opencl/math/fmod.h delete mode 100644 libclc/opencl/include/clc/opencl/math/fract.h delete mode 100644 libclc/opencl/include/clc/opencl/math/frexp.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_cos.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_divide.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_exp.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_exp10.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_exp2.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_log.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_log10.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_log2.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_powr.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_recip.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_rsqrt.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_sin.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_sqrt.h delete mode 100644 libclc/opencl/include/clc/opencl/math/half_tan.h delete mode 100644 libclc/opencl/include/clc/opencl/math/hypot.h delete mode 100644 libclc/opencl/include/clc/opencl/math/ilogb.h delete mode 100644 libclc/opencl/include/clc/opencl/math/ldexp.h delete mode 100644 libclc/opencl/include/clc/opencl/math/ldexp.inc delete mode 100644 libclc/opencl/include/clc/opencl/math/lgamma.h delete mode 100644 libclc/opencl/include/clc/opencl/math/lgamma_r.h delete mode 100644 libclc/opencl/include/clc/opencl/math/log.h delete mode 100644 libclc/opencl/include/clc/opencl/math/log10.h delete mode 100644 libclc/opencl/include/clc/opencl/math/log1p.h delete mode 100644 libclc/opencl/include/clc/opencl/math/log2.h delete mode 100644 libclc/opencl/include/clc/opencl/math/logb.h delete mode 100644 libclc/opencl/include/clc/opencl/math/mad.h delete mode 100644 libclc/opencl/include/clc/opencl/math/maxmag.h delete mode 100644 libclc/opencl/include/clc/opencl/math/minmag.h delete mode 100644 libclc/opencl/include/clc/opencl/math/modf.h delete mode 100644 libclc/opencl/include/clc/opencl/math/nan.h delete mode 100644 libclc/opencl/include/clc/opencl/math/nan.inc delete mode 100644 libclc/opencl/include/clc/opencl/math/native_cos.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_divide.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_exp.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_exp10.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_exp2.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_log.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_log10.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_log2.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_powr.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_recip.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_rsqrt.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_sin.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_sqrt.h delete mode 100644 libclc/opencl/include/clc/opencl/math/native_tan.h delete mode 100644 libclc/opencl/include/clc/opencl/math/nextafter.h delete mode 100644 libclc/opencl/include/clc/opencl/math/pow.h delete mode 100644 libclc/opencl/include/clc/opencl/math/pown.h delete mode 100644 libclc/opencl/include/clc/opencl/math/powr.h delete mode 100644 libclc/opencl/include/clc/opencl/math/remainder.h delete mode 100644 libclc/opencl/include/clc/opencl/math/remquo.h delete mode 100644 libclc/opencl/include/clc/opencl/math/rint.h delete mode 100644 libclc/opencl/include/clc/opencl/math/rootn.h delete mode 100644 libclc/opencl/include/clc/opencl/math/round.h delete mode 100644 libclc/opencl/include/clc/opencl/math/rsqrt.h delete mode 100644 libclc/opencl/include/clc/opencl/math/sin.h delete mode 100644 libclc/opencl/include/clc/opencl/math/sincos.h delete mode 100644 libclc/opencl/include/clc/opencl/math/sinh.h delete mode 100644 libclc/opencl/include/clc/opencl/math/sinpi.h delete mode 100644 libclc/opencl/include/clc/opencl/math/sqrt.h delete mode 100644 libclc/opencl/include/clc/opencl/math/tan.h delete mode 100644 libclc/opencl/include/clc/opencl/math/tanh.h delete mode 100644 libclc/opencl/include/clc/opencl/math/tanpi.h delete mode 100644 libclc/opencl/include/clc/opencl/math/tgamma.h delete mode 100644 libclc/opencl/include/clc/opencl/math/trunc.h delete mode 100644 libclc/opencl/include/clc/opencl/misc/shuffle.h delete mode 100644 libclc/opencl/include/clc/opencl/misc/shuffle2.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/all.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/any.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/bitselect.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/bitselect.inc delete mode 100644 libclc/opencl/include/clc/opencl/relational/isequal.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isfinite.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isgreater.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isgreaterequal.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isinf.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isless.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/islessequal.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/islessgreater.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isnan.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isnormal.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isnotequal.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isordered.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/isunordered.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/select.h delete mode 100644 libclc/opencl/include/clc/opencl/relational/signbit.h delete mode 100644 libclc/opencl/include/clc/opencl/shared/clamp.h delete mode 100644 libclc/opencl/include/clc/opencl/shared/clamp.inc delete mode 100644 libclc/opencl/include/clc/opencl/shared/max.h delete mode 100644 libclc/opencl/include/clc/opencl/shared/max.inc delete mode 100644 libclc/opencl/include/clc/opencl/shared/min.h delete mode 100644 libclc/opencl/include/clc/opencl/shared/min.inc delete mode 100644 libclc/opencl/include/clc/opencl/shared/vload.h delete mode 100644 libclc/opencl/include/clc/opencl/shared/vstore.h delete mode 100644 libclc/opencl/include/clc/opencl/synchronization/barrier.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_global_id.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_global_offset.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_global_size.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_group_id.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_local_id.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_local_linear_id.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_local_size.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_max_sub_group_size.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_num_groups.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_num_sub_groups.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_sub_group_id.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_sub_group_local_id.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_sub_group_size.h delete mode 100644 libclc/opencl/include/clc/opencl/workitem/get_work_dim.h diff --git a/libclc/opencl/include/clc/opencl/async/async_work_group_copy.h b/libclc/opencl/include/clc/opencl/async/async_work_group_copy.h deleted file mode 100644 index 1bd16a411554a..0000000000000 --- a/libclc/opencl/include/clc/opencl/async/async_work_group_copy.h +++ /dev/null @@ -1,30 +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_OPENCL_ASYNC_ASYNC_WORK_GROUP_COPY_H__ -#define __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_COPY_H__ - -#define __CLC_DST_ADDR_SPACE local -#define __CLC_SRC_ADDR_SPACE global -#define __CLC_BODY -#include -#define __CLC_BODY -#include -#undef __CLC_DST_ADDR_SPACE -#undef __CLC_SRC_ADDR_SPACE - -#define __CLC_DST_ADDR_SPACE global -#define __CLC_SRC_ADDR_SPACE local -#define __CLC_BODY -#include -#define __CLC_BODY -#include -#undef __CLC_DST_ADDR_SPACE -#undef __CLC_SRC_ADDR_SPACE - -#endif // __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_COPY_H__ diff --git a/libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc b/libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc deleted file mode 100644 index cc4174970cb25..0000000000000 --- a/libclc/opencl/include/clc/opencl/async/async_work_group_copy.inc +++ /dev/null @@ -1,12 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL event_t -async_work_group_copy(__CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst, - const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src, - size_t num_gentypes, event_t event); diff --git a/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h b/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h deleted file mode 100644 index 5929ce73a9317..0000000000000 --- a/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.h +++ /dev/null @@ -1,30 +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_OPENCL_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__ -#define __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__ - -#define __CLC_DST_ADDR_SPACE local -#define __CLC_SRC_ADDR_SPACE global -#define __CLC_BODY -#include -#define __CLC_BODY -#include -#undef __CLC_DST_ADDR_SPACE -#undef __CLC_SRC_ADDR_SPACE - -#define __CLC_DST_ADDR_SPACE global -#define __CLC_SRC_ADDR_SPACE local -#define __CLC_BODY -#include -#define __CLC_BODY -#include -#undef __CLC_DST_ADDR_SPACE -#undef __CLC_SRC_ADDR_SPACE - -#endif // __CLC_OPENCL_ASYNC_ASYNC_WORK_GROUP_STRIDED_COPY_H__ diff --git a/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc b/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc deleted file mode 100644 index 9df894e4fa29e..0000000000000 --- a/libclc/opencl/include/clc/opencl/async/async_work_group_strided_copy.inc +++ /dev/null @@ -1,12 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL event_t async_work_group_strided_copy( - __CLC_DST_ADDR_SPACE __CLC_GENTYPE *dst, - const __CLC_SRC_ADDR_SPACE __CLC_GENTYPE *src, size_t num_gentypes, - size_t stride, event_t event); diff --git a/libclc/opencl/include/clc/opencl/async/prefetch.h b/libclc/opencl/include/clc/opencl/async/prefetch.h deleted file mode 100644 index 1ba4414d9eb10..0000000000000 --- a/libclc/opencl/include/clc/opencl/async/prefetch.h +++ /dev/null @@ -1,18 +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_OPENCL_ASYNC_PREFETCH_H__ -#define __CLC_OPENCL_ASYNC_PREFETCH_H__ - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_ASYNC_PREFETCH_H__ diff --git a/libclc/opencl/include/clc/opencl/async/prefetch.inc b/libclc/opencl/include/clc/opencl/async/prefetch.inc deleted file mode 100644 index 4a78778fa7604..0000000000000 --- a/libclc/opencl/include/clc/opencl/async/prefetch.inc +++ /dev/null @@ -1,10 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL void prefetch(const global __CLC_GENTYPE *p, - size_t num_gentypes); diff --git a/libclc/opencl/include/clc/opencl/async/wait_group_events.h b/libclc/opencl/include/clc/opencl/async/wait_group_events.h deleted file mode 100644 index d3ace9c34a25d..0000000000000 --- a/libclc/opencl/include/clc/opencl/async/wait_group_events.h +++ /dev/null @@ -1,17 +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_OPENCL_ASYNC_WAIT_GROUP_EVENTS_H__ -#define __CLC_OPENCL_ASYNC_WAIT_GROUP_EVENTS_H__ - -#include - -_CLC_DECL _CLC_OVERLOAD void wait_group_events(int num_events, - event_t *event_list); - -#endif // __CLC_OPENCL_ASYNC_WAIT_GROUP_EVENTS_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_add.h b/libclc/opencl/include/clc/opencl/atomic/atom_add.h deleted file mode 100644 index b26a2a5361b6f..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_add.h +++ /dev/null @@ -1,31 +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_OPENCL_ATOMIC_ATOM_ADD_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_ADD_H__ - -#include - -#ifdef cl_khr_global_int32_base_atomics -#define __CLC_FUNCTION atom_add -#define __CLC_ADDRESS_SPACE global -#include -#endif // cl_khr_global_int32_base_atomics - -#ifdef cl_khr_local_int32_base_atomics -#define __CLC_FUNCTION atom_add -#define __CLC_ADDRESS_SPACE local -#include -#endif // cl_khr_local_int32_base_atomics - -#ifdef cl_khr_int64_base_atomics -#define __CLC_FUNCTION atom_add -#include -#endif // cl_khr_int64_base_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_ADD_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_and.h b/libclc/opencl/include/clc/opencl/atomic/atom_and.h deleted file mode 100644 index eacbd7a33b6ee..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_and.h +++ /dev/null @@ -1,31 +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_OPENCL_ATOMIC_ATOM_AND_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_AND_H__ - -#include - -#ifdef cl_khr_global_int32_extended_atomics -#define __CLC_FUNCTION atom_and -#define __CLC_ADDRESS_SPACE global -#include -#endif // cl_khr_global_int32_extended_atomics - -#ifdef cl_khr_local_int32_extended_atomics -#define __CLC_FUNCTION atom_and -#define __CLC_ADDRESS_SPACE local -#include -#endif // cl_khr_local_int32_extended_atomics - -#ifdef cl_khr_int64_extended_atomics -#define __CLC_FUNCTION atom_and -#include -#endif // cl_khr_int64_extended_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_AND_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h b/libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h deleted file mode 100644 index 83ee99f414241..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_cmpxchg.h +++ /dev/null @@ -1,46 +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_OPENCL_ATOMIC_ATOM_CMPXCHG_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_CMPXCHG_H__ - -#include - -#include -#include - -#ifdef cl_khr_global_int32_base_atomics -_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(volatile global int *p, int cmp, - int val); -_CLC_OVERLOAD _CLC_DECL unsigned int -atom_cmpxchg(volatile global unsigned int *p, unsigned int cmp, - unsigned int val); -#endif // cl_khr_global_int32_base_atomics - -#ifdef cl_khr_local_int32_base_atomics -_CLC_OVERLOAD _CLC_DECL int atom_cmpxchg(volatile local int *p, int cmp, - int val); -_CLC_OVERLOAD _CLC_DECL unsigned int -atom_cmpxchg(volatile local unsigned int *p, unsigned int cmp, - unsigned int val); -#endif // cl_khr_local_int32_base_atomics - -#ifdef cl_khr_int64_base_atomics -_CLC_OVERLOAD _CLC_DECL long atom_cmpxchg(volatile global long *p, long cmp, - long val); -_CLC_OVERLOAD _CLC_DECL unsigned long -atom_cmpxchg(volatile global unsigned long *p, unsigned long cmp, - unsigned long val); -_CLC_OVERLOAD _CLC_DECL long atom_cmpxchg(volatile local long *p, long cmp, - long val); -_CLC_OVERLOAD _CLC_DECL unsigned long -atom_cmpxchg(volatile local unsigned long *p, unsigned long cmp, - unsigned long val); -#endif // cl_khr_int64_base_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_CMPXCHG_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_dec.h b/libclc/opencl/include/clc/opencl/atomic/atom_dec.h deleted file mode 100644 index f57d9c6afca5d..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_dec.h +++ /dev/null @@ -1,35 +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_OPENCL_ATOMIC_ATOM_DEC_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_DEC_H__ - -#include - -#include -#include - -#ifdef cl_khr_global_int32_base_atomics -_CLC_OVERLOAD _CLC_DECL int atom_dec(volatile global int *p); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec(volatile global unsigned int *p); -#endif // cl_khr_global_int32_base_atomics - -#ifdef cl_khr_local_int32_base_atomics -_CLC_OVERLOAD _CLC_DECL int atom_dec(volatile local int *p); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_dec(volatile local unsigned int *p); -#endif // cl_khr_local_int32_base_atomics - -#ifdef cl_khr_int64_base_atomics -_CLC_OVERLOAD _CLC_DECL long atom_dec(volatile global long *p); -_CLC_OVERLOAD _CLC_DECL unsigned long -atom_dec(volatile global unsigned long *p); -_CLC_OVERLOAD _CLC_DECL long atom_dec(volatile local long *p); -_CLC_OVERLOAD _CLC_DECL unsigned long atom_dec(volatile local unsigned long *p); -#endif // cl_khr_int64_base_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_DEC_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc deleted file mode 100644 index 8a0ec9481c595..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int32.inc +++ /dev/null @@ -1,18 +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 -// -//===----------------------------------------------------------------------===// - -#define __CLC_DECLARE_ATOM(ADDRSPACE, TYPE) \ - _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE); - -__CLC_DECLARE_ATOM(__CLC_ADDRESS_SPACE, int) -__CLC_DECLARE_ATOM(__CLC_ADDRESS_SPACE, uint) - -#undef __CLC_DECLARE_ATOM - -#undef __CLC_FUNCTION -#undef __CLC_ADDRESS_SPACE diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc b/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc deleted file mode 100644 index 45489df0609ca..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_decl_int64.inc +++ /dev/null @@ -1,19 +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 -// -//===----------------------------------------------------------------------===// - -#define __CLC_DECLARE_ATOM(ADDRSPACE, TYPE) \ - _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE); - -__CLC_DECLARE_ATOM(local, long) -__CLC_DECLARE_ATOM(local, ulong) -__CLC_DECLARE_ATOM(global, long) -__CLC_DECLARE_ATOM(global, ulong) - -#undef __CLC_DECLARE_ATOM - -#undef __CLC_FUNCTION diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_inc.h b/libclc/opencl/include/clc/opencl/atomic/atom_inc.h deleted file mode 100644 index 96d3faa593fc9..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_inc.h +++ /dev/null @@ -1,35 +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_OPENCL_ATOMIC_ATOM_INC_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_INC_H__ - -#include - -#include -#include - -#ifdef cl_khr_global_int32_base_atomics -_CLC_OVERLOAD _CLC_DECL int atom_inc(volatile global int *p); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc(volatile global unsigned int *p); -#endif // cl_khr_global_int32_base_atomics - -#ifdef cl_khr_local_int32_base_atomics -_CLC_OVERLOAD _CLC_DECL int atom_inc(volatile local int *p); -_CLC_OVERLOAD _CLC_DECL unsigned int atom_inc(volatile local unsigned int *p); -#endif // cl_khr_local_int32_base_atomics - -#ifdef cl_khr_int64_base_atomics -_CLC_OVERLOAD _CLC_DECL long atom_inc(volatile global long *p); -_CLC_OVERLOAD _CLC_DECL unsigned long -atom_inc(volatile global unsigned long *p); -_CLC_OVERLOAD _CLC_DECL long atom_inc(volatile local long *p); -_CLC_OVERLOAD _CLC_DECL unsigned long atom_inc(volatile local unsigned long *p); -#endif // cl_khr_int64_base_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_INC_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_max.h b/libclc/opencl/include/clc/opencl/atomic/atom_max.h deleted file mode 100644 index 35a1e2aa06d48..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_max.h +++ /dev/null @@ -1,31 +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_OPENCL_ATOMIC_ATOM_MAX_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_MAX_H__ - -#include - -#ifdef cl_khr_global_int32_extended_atomics -#define __CLC_FUNCTION atom_max -#define __CLC_ADDRESS_SPACE global -#include -#endif // cl_khr_global_int32_extended_atomics - -#ifdef cl_khr_local_int32_extended_atomics -#define __CLC_FUNCTION atom_max -#define __CLC_ADDRESS_SPACE local -#include -#endif // cl_khr_local_int32_extended_atomics - -#ifdef cl_khr_int64_extended_atomics -#define __CLC_FUNCTION atom_max -#include -#endif // cl_khr_int64_extended_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_MAX_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_min.h b/libclc/opencl/include/clc/opencl/atomic/atom_min.h deleted file mode 100644 index ded96a5b29a48..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_min.h +++ /dev/null @@ -1,31 +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_OPENCL_ATOMIC_ATOM_MIN_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_MIN_H__ - -#include - -#ifdef cl_khr_global_int32_extended_atomics -#define __CLC_FUNCTION atom_min -#define __CLC_ADDRESS_SPACE global -#include -#endif // cl_khr_global_int32_extended_atomics - -#ifdef cl_khr_local_int32_extended_atomics -#define __CLC_FUNCTION atom_min -#define __CLC_ADDRESS_SPACE local -#include -#endif // cl_khr_local_int32_extended_atomics - -#ifdef cl_khr_int64_extended_atomics -#define __CLC_FUNCTION atom_min -#include -#endif // cl_khr_int64_extended_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_MIN_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_or.h b/libclc/opencl/include/clc/opencl/atomic/atom_or.h deleted file mode 100644 index 42a69bd3f7b46..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_or.h +++ /dev/null @@ -1,31 +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_OPENCL_ATOMIC_ATOM_OR_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_OR_H__ - -#include - -#ifdef cl_khr_global_int32_extended_atomics -#define __CLC_FUNCTION atom_or -#define __CLC_ADDRESS_SPACE global -#include -#endif // cl_khr_global_int32_extended_atomics - -#ifdef cl_khr_local_int32_extended_atomics -#define __CLC_FUNCTION atom_or -#define __CLC_ADDRESS_SPACE local -#include -#endif // cl_khr_local_int32_extended_atomics - -#ifdef cl_khr_int64_extended_atomics -#define __CLC_FUNCTION atom_or -#include -#endif // cl_khr_int64_extended_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_OR_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_sub.h b/libclc/opencl/include/clc/opencl/atomic/atom_sub.h deleted file mode 100644 index 9763ee6033410..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_sub.h +++ /dev/null @@ -1,31 +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_OPENCL_ATOMIC_ATOM_SUB_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_SUB_H__ - -#include - -#ifdef cl_khr_global_int32_base_atomics -#define __CLC_FUNCTION atom_sub -#define __CLC_ADDRESS_SPACE global -#include -#endif // cl_khr_global_int32_base_atomics - -#ifdef cl_khr_local_int32_base_atomics -#define __CLC_FUNCTION atom_sub -#define __CLC_ADDRESS_SPACE local -#include -#endif // cl_khr_local_int32_base_atomics - -#ifdef cl_khr_int64_base_atomics -#define __CLC_FUNCTION atom_sub -#include -#endif // cl_khr_int64_base_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_SUB_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h b/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h deleted file mode 100644 index ab2c5b5156d68..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_xchg.h +++ /dev/null @@ -1,31 +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_OPENCL_ATOMIC_ATOM_XCHG_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_XCHG_H__ - -#include - -#ifdef cl_khr_global_int32_base_atomics -#define __CLC_FUNCTION atom_xchg -#define __CLC_ADDRESS_SPACE global -#include -#endif // cl_khr_global_int32_base_atomics - -#ifdef cl_khr_local_int32_base_atomics -#define __CLC_FUNCTION atom_xchg -#define __CLC_ADDRESS_SPACE local -#include -#endif // cl_khr_local_int32_base_atomics - -#ifdef cl_khr_int64_base_atomics -#define __CLC_FUNCTION atom_xchg -#include -#endif // cl_khr_int64_base_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_XCHG_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atom_xor.h b/libclc/opencl/include/clc/opencl/atomic/atom_xor.h deleted file mode 100644 index b33168db72cf0..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atom_xor.h +++ /dev/null @@ -1,31 +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_OPENCL_ATOMIC_ATOM_XOR_H__ -#define __CLC_OPENCL_ATOMIC_ATOM_XOR_H__ - -#include - -#ifdef cl_khr_global_int32_extended_atomics -#define __CLC_FUNCTION atom_xor -#define __CLC_ADDRESS_SPACE global -#include -#endif // cl_khr_global_int32_extended_atomics - -#ifdef cl_khr_local_int32_extended_atomics -#define __CLC_FUNCTION atom_xor -#define __CLC_ADDRESS_SPACE local -#include -#endif // cl_khr_local_int32_extended_atomics - -#ifdef cl_khr_int64_extended_atomics -#define __CLC_FUNCTION atom_xor -#include -#endif // cl_khr_int64_extended_atomics - -#endif // __CLC_OPENCL_ATOMIC_ATOM_XOR_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_add.h b/libclc/opencl/include/clc/opencl/atomic/atomic_add.h deleted file mode 100644 index edb13bd6bde49..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_add.h +++ /dev/null @@ -1,17 +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_OPENCL_ATOMIC_ATOMIC_ADD_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_ADD_H__ - -#include - -#define __CLC_FUNCTION atomic_add -#include - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_ADD_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_and.h b/libclc/opencl/include/clc/opencl/atomic/atomic_and.h deleted file mode 100644 index 4875f5374c692..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_and.h +++ /dev/null @@ -1,17 +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_OPENCL_ATOMIC_ATOMIC_AND_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_AND_H__ - -#include - -#define __CLC_FUNCTION atomic_and -#include - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_AND_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h b/libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h deleted file mode 100644 index f784984299344..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_cmpxchg.h +++ /dev/null @@ -1,19 +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_OPENCL_ATOMIC_ATOMIC_CMPXCHG_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_CMPXCHG_H__ - -#include - -_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg(volatile local int *, int, int); -_CLC_OVERLOAD _CLC_DECL int atomic_cmpxchg(volatile global int *, int, int); -_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg(volatile local uint *, uint, uint); -_CLC_OVERLOAD _CLC_DECL uint atomic_cmpxchg(volatile global uint *, uint, uint); - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_CMPXCHG_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_strong.h b/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_strong.h deleted file mode 100644 index cae033b17173a..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_strong.h +++ /dev/null @@ -1,26 +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_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_STRONG_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_STRONG_H__ - -#include - -#define __CLC_FUNCTION atomic_compare_exchange_strong -#define __CLC_COMPARE_EXCHANGE - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_COMPARE_EXCHANGE -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_STRONG_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_weak.h b/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_weak.h deleted file mode 100644 index e8d9f8728bc6a..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_compare_exchange_weak.h +++ /dev/null @@ -1,26 +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_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_WEAK_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_WEAK_H__ - -#include - -#define __CLC_FUNCTION atomic_compare_exchange_weak -#define __CLC_COMPARE_EXCHANGE - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_COMPARE_EXCHANGE -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_COMPARE_EXCHANGE_WEAK_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h b/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h deleted file mode 100644 index 253a64f491fb4..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_dec.h +++ /dev/null @@ -1,19 +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_OPENCL_ATOMIC_ATOMIC_DEC_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_DEC_H__ - -#include - -_CLC_OVERLOAD _CLC_DECL int atomic_dec(volatile local int *); -_CLC_OVERLOAD _CLC_DECL int atomic_dec(volatile global int *); -_CLC_OVERLOAD _CLC_DECL uint atomic_dec(volatile local uint *); -_CLC_OVERLOAD _CLC_DECL uint atomic_dec(volatile global uint *); - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_DEC_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc b/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc deleted file mode 100644 index a36e68bca86a2..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_decl.inc +++ /dev/null @@ -1,134 +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 -// -//===----------------------------------------------------------------------===// - -#ifdef __CLC_SCALAR - -#if defined(__opencl_c_fp64) && (defined(cl_khr_int64_base_atomics) && \ - defined(cl_khr_int64_extended_atomics)) -#define __CLC_HAVE_64_ATOMIC -#endif -#if defined(__CLC_FPSIZE) && \ - (__CLC_FPSIZE < 64 || defined(__CLC_HAVE_64_ATOMIC)) -#define __CLC_HAVE_FP_ATOMIC -#endif -#if defined(__CLC_GENSIZE) && \ - ((__CLC_GENSIZE == 32) || \ - (__CLC_GENSIZE == 64 && defined(__CLC_HAVE_64_ATOMIC))) -#define __CLC_HAVE_INT_ATOMIC -#endif -#if defined(__CLC_HAVE_FP_ATOMIC) || defined(__CLC_HAVE_INT_ATOMIC) - -#define __CLC_ATOMIC_GENTYPE __CLC_XCONCAT(atomic_, __CLC_GENTYPE) - -#define __CLC_FUNCTION_EXPLICIT __CLC_XCONCAT(__CLC_FUNCTION, _explicit) - -#ifdef __CLC_NO_VALUE_ARG -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION_EXPLICIT( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, memory_order Order, \ - memory_scope Scope); -#elif defined(__CLC_RETURN_VOID) -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL void __CLC_FUNCTION_EXPLICIT( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value, \ - memory_order Order, memory_scope Scope); -#elif defined(__CLC_COMPARE_EXCHANGE) -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL bool __CLC_FUNCTION_EXPLICIT( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, \ - ADDRSPACE __CLC_GENTYPE *Expected, __CLC_GENTYPE Desired, \ - memory_order Order, memory_scope Scope); -#else -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION_EXPLICIT( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value, \ - memory_order Order, memory_scope Scope); -#endif - -__CLC_DECL_ATOMIC(global) -__CLC_DECL_ATOMIC(local) -#if _CLC_GENERIC_AS_SUPPORTED -__CLC_DECL_ATOMIC() -#endif - -#undef __CLC_DECL_ATOMIC - -#if defined(__opencl_c_atomic_scope_device) - -#ifdef __CLC_NO_VALUE_ARG -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION_EXPLICIT( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, memory_order Order); -#elif defined(__CLC_RETURN_VOID) -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL void __CLC_FUNCTION_EXPLICIT( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value, \ - memory_order Order); -#elif defined(__CLC_COMPARE_EXCHANGE) -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL bool __CLC_FUNCTION_EXPLICIT( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, \ - ADDRSPACE __CLC_GENTYPE *Expected, __CLC_GENTYPE Desired, \ - memory_order Success, memory_order Failure); -#else -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION_EXPLICIT( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value, \ - memory_order Order); -#endif - -__CLC_DECL_ATOMIC(global) -__CLC_DECL_ATOMIC(local) -#if _CLC_GENERIC_AS_SUPPORTED -__CLC_DECL_ATOMIC() -#endif - -#undef __CLC_DECL_ATOMIC - -#endif // defined(__opencl_c_atomic_scope_device) - -#if defined(__opencl_c_atomic_order_seq_cst) && \ - defined(__opencl_c_atomic_scope_device) - -#ifdef __CLC_NO_VALUE_ARG -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr); -#elif defined(__CLC_RETURN_VOID) -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL void __CLC_FUNCTION( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value); -#elif defined(__CLC_COMPARE_EXCHANGE) -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL bool __CLC_FUNCTION( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, \ - ADDRSPACE __CLC_GENTYPE *Expected, __CLC_GENTYPE Desired); -#else -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL __CLC_GENTYPE __CLC_FUNCTION( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value); -#endif - -__CLC_DECL_ATOMIC(global) -__CLC_DECL_ATOMIC(local) -#if _CLC_GENERIC_AS_SUPPORTED -__CLC_DECL_ATOMIC() -#endif - -#undef __CLC_DECL_ATOMIC - -#endif // defined(__opencl_c_atomic_order_seq_cst) && - // defined(__opencl_c_atomic_scope_device) - -#endif // __CLC_HAVE_FP_ATOMIC || __CLC_HAVE_INT_ATOMIC - -#undef __CLC_HAVE_INT_ATOMIC -#undef __CLC_HAVE_FP_ATOMIC -#undef __CLC_HAVE_64_ATOMIC - -#endif // __CLC_SCALAR diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_decl_legacy.inc b/libclc/opencl/include/clc/opencl/atomic/atomic_decl_legacy.inc deleted file mode 100644 index 0cfd4c3eab5f6..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_decl_legacy.inc +++ /dev/null @@ -1,22 +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 -// -//===----------------------------------------------------------------------===// - -#define __CLC_DECLARE_ATOMIC(ADDRSPACE, TYPE) \ - _CLC_OVERLOAD _CLC_DECL TYPE __CLC_FUNCTION(volatile ADDRSPACE TYPE *, TYPE); - -#define __CLC_DECLARE_ATOMIC_ADDRSPACE(TYPE) \ - __CLC_DECLARE_ATOMIC(global, TYPE) \ - __CLC_DECLARE_ATOMIC(local, TYPE) - -__CLC_DECLARE_ATOMIC_ADDRSPACE(int) -__CLC_DECLARE_ATOMIC_ADDRSPACE(uint) - -#undef __CLC_DECLARE_ATOMIC_ADDRSPACE -#undef __CLC_DECLARE_ATOMIC - -#undef __CLC_FUNCTION diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_exchange.h b/libclc/opencl/include/clc/opencl/atomic/atomic_exchange.h deleted file mode 100644 index 117355c216cc0..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_exchange.h +++ /dev/null @@ -1,24 +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_OPENCL_ATOMIC_ATOMIC_EXCHANGE_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_EXCHANGE_H__ - -#include - -#define __CLC_FUNCTION atomic_exchange - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_EXCHANGE_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_add.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_add.h deleted file mode 100644 index bca0831d3063b..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_add.h +++ /dev/null @@ -1,24 +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_OPENCL_ATOMIC_ATOMIC_FETCH_ADD_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_ADD_H__ - -#include - -#define __CLC_FUNCTION atomic_fetch_add - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_ADD_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_and.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_and.h deleted file mode 100644 index 32919bf5ebe25..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_and.h +++ /dev/null @@ -1,21 +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_OPENCL_ATOMIC_ATOMIC_FETCH_AND_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_AND_H__ - -#include - -#define __CLC_FUNCTION atomic_fetch_and - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_AND_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_max.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_max.h deleted file mode 100644 index b6df519dcd016..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_max.h +++ /dev/null @@ -1,24 +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_OPENCL_ATOMIC_ATOMIC_FETCH_MAX_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_MAX_H__ - -#include - -#define __CLC_FUNCTION atomic_fetch_max - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_MAX_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_min.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_min.h deleted file mode 100644 index fde0162427e43..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_min.h +++ /dev/null @@ -1,24 +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_OPENCL_ATOMIC_ATOMIC_FETCH_MIN_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_MIN_H__ - -#include - -#define __CLC_FUNCTION atomic_fetch_min - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_MIN_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_or.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_or.h deleted file mode 100644 index 10ed38ec660e5..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_or.h +++ /dev/null @@ -1,21 +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_OPENCL_ATOMIC_ATOMIC_FETCH_OR_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_OR_H__ - -#include - -#define __CLC_FUNCTION atomic_fetch_or - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_OR_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_sub.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_sub.h deleted file mode 100644 index afd56a62e990a..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_sub.h +++ /dev/null @@ -1,24 +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_OPENCL_ATOMIC_ATOMIC_FETCH_SUB_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_SUB_H__ - -#include - -#define __CLC_FUNCTION atomic_fetch_sub - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_SUB_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_xor.h b/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_xor.h deleted file mode 100644 index 372250ecf5df5..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_fetch_xor.h +++ /dev/null @@ -1,21 +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_OPENCL_ATOMIC_ATOMIC_FETCH_XOR_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_XOR_H__ - -#include - -#define __CLC_FUNCTION atomic_fetch_xor - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FETCH_XOR_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_flag_clear.h b/libclc/opencl/include/clc/opencl/atomic/atomic_flag_clear.h deleted file mode 100644 index 646fedde6f503..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_flag_clear.h +++ /dev/null @@ -1,45 +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_OPENCL_ATOMIC_ATOMIC_FLAG_CLEAR_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FLAG_CLEAR_H__ - -#include - -#if defined(__opencl_c_atomic_order_seq_cst) && \ - defined(__opencl_c_atomic_scope_device) -_CLC_OVERLOAD _CLC_DECL void atomic_flag_clear(volatile __global atomic_flag *); -_CLC_OVERLOAD _CLC_DECL void atomic_flag_clear(volatile __local atomic_flag *); -#if defined(__opencl_c_generic_address_space) -_CLC_OVERLOAD _CLC_DECL void atomic_flag_clear(volatile atomic_flag *); -#endif // defined(__opencl_c_generic_address_space) -#endif - -#if defined(__opencl_c_atomic_scope_device) -_CLC_OVERLOAD _CLC_DECL void -atomic_flag_clear_explicit(volatile __global atomic_flag *, memory_order); -_CLC_OVERLOAD _CLC_DECL void -atomic_flag_clear_explicit(volatile __local atomic_flag *, memory_order); -#if defined(__opencl_c_generic_address_space) -_CLC_OVERLOAD _CLC_DECL void atomic_flag_clear_explicit(volatile atomic_flag *, - memory_order); -#endif // defined(__opencl_c_generic_address_space) -#endif - -_CLC_OVERLOAD _CLC_DECL void -atomic_flag_clear_explicit(volatile __global atomic_flag *, memory_order, - memory_scope); -_CLC_OVERLOAD _CLC_DECL void -atomic_flag_clear_explicit(volatile __local atomic_flag *, memory_order, - memory_scope); -#if defined(__opencl_c_generic_address_space) -_CLC_OVERLOAD _CLC_DECL void -atomic_flag_clear_explicit(volatile atomic_flag *, memory_order, memory_scope); -#endif // defined(__opencl_c_generic_address_space) - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FLAG_CLEAR_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_flag_test_and_set.h b/libclc/opencl/include/clc/opencl/atomic/atomic_flag_test_and_set.h deleted file mode 100644 index fe180b04632ba..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_flag_test_and_set.h +++ /dev/null @@ -1,49 +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_OPENCL_ATOMIC_ATOMIC_FLAG_TEST_AND_SET_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_FLAG_TEST_AND_SET_H__ - -#include - -#if defined(__opencl_c_atomic_order_seq_cst) && \ - defined(__opencl_c_atomic_scope_device) -_CLC_OVERLOAD _CLC_DECL bool -atomic_flag_test_and_set(volatile __global atomic_flag *); -_CLC_OVERLOAD _CLC_DECL bool -atomic_flag_test_and_set(volatile __local atomic_flag *); -#if defined(__opencl_c_generic_address_space) -_CLC_OVERLOAD _CLC_DECL bool atomic_flag_test_and_set(volatile atomic_flag *); -#endif // defined(__opencl_c_generic_address_space) -#endif - -#if defined(__opencl_c_atomic_scope_device) -_CLC_OVERLOAD _CLC_DECL bool -atomic_flag_test_and_set_explicit(volatile __global atomic_flag *, - memory_order); -_CLC_OVERLOAD _CLC_DECL bool -atomic_flag_test_and_set_explicit(volatile __local atomic_flag *, memory_order); -#if defined(__opencl_c_generic_address_space) -_CLC_OVERLOAD _CLC_DECL bool -atomic_flag_test_and_set_explicit(volatile atomic_flag *, memory_order); -#endif // defined(__opencl_c_generic_address_space) -#endif - -_CLC_OVERLOAD _CLC_DECL bool -atomic_flag_test_and_set_explicit(volatile __global atomic_flag *, memory_order, - memory_scope); -_CLC_OVERLOAD _CLC_DECL bool -atomic_flag_test_and_set_explicit(volatile __local atomic_flag *, memory_order, - memory_scope); -#if defined(__opencl_c_generic_address_space) -_CLC_OVERLOAD _CLC_DECL bool -atomic_flag_test_and_set_explicit(volatile atomic_flag *, memory_order, - memory_scope); -#endif // defined(__opencl_c_generic_address_space) - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_FLAG_TEST_AND_SET_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h b/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h deleted file mode 100644 index 75b3fe076cf21..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_inc.h +++ /dev/null @@ -1,19 +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_OPENCL_ATOMIC_ATOMIC_INC_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_INC_H__ - -#include - -_CLC_OVERLOAD _CLC_DECL int atomic_inc(volatile local int *); -_CLC_OVERLOAD _CLC_DECL int atomic_inc(volatile global int *); -_CLC_OVERLOAD _CLC_DECL uint atomic_inc(volatile local uint *); -_CLC_OVERLOAD _CLC_DECL uint atomic_inc(volatile global uint *); - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_INC_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_init.h b/libclc/opencl/include/clc/opencl/atomic/atomic_init.h deleted file mode 100644 index 6a2b938fdd52f..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_init.h +++ /dev/null @@ -1,24 +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_OPENCL_ATOMIC_ATOMIC_INIT_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_INIT_H__ - -#include - -#define __CLC_ATOMIC_GENTYPE __CLC_XCONCAT(atomic_, __CLC_GENTYPE) - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_ATOMIC_GENTYPE - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_INIT_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_init.inc b/libclc/opencl/include/clc/opencl/atomic/atomic_init.inc deleted file mode 100644 index 80135fae4b39d..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_init.inc +++ /dev/null @@ -1,44 +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 -// -//===----------------------------------------------------------------------===// - -#ifdef __CLC_SCALAR - -#if defined(__opencl_c_fp64) && (defined(cl_khr_int64_base_atomics) && \ - defined(cl_khr_int64_extended_atomics)) -#define __CLC_HAVE_64_ATOMIC -#endif -#if defined(__CLC_FPSIZE) && \ - (__CLC_FPSIZE < 64 || defined(__CLC_HAVE_64_ATOMIC)) -#define __CLC_HAVE_FP_ATOMIC -#endif -#if defined(__CLC_GENSIZE) && \ - ((__CLC_GENSIZE == 32) || \ - (__CLC_GENSIZE == 64 && defined(__CLC_HAVE_64_ATOMIC))) -#define __CLC_HAVE_INT_ATOMIC -#endif -#if defined(__CLC_HAVE_FP_ATOMIC) || defined(__CLC_HAVE_INT_ATOMIC) - -#define __CLC_DECL_ATOMIC(ADDRSPACE) \ - _CLC_OVERLOAD _CLC_DECL void atomic_init( \ - volatile ADDRSPACE __CLC_ATOMIC_GENTYPE *Ptr, __CLC_GENTYPE Value); - -__CLC_DECL_ATOMIC(global) -__CLC_DECL_ATOMIC(local) -#if _CLC_GENERIC_AS_SUPPORTED -__CLC_DECL_ATOMIC() -#endif - -#undef __CLC_DECL_ATOMIC - -#endif // __CLC_HAVE_FP_ATOMIC || __CLC_HAVE_INT_ATOMIC - -#undef __CLC_HAVE_INT_ATOMIC -#undef __CLC_HAVE_FP_ATOMIC -#undef __CLC_HAVE_64_ATOMIC - -#endif // __CLC_SCALAR diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_load.h b/libclc/opencl/include/clc/opencl/atomic/atomic_load.h deleted file mode 100644 index 8d891098825ec..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_load.h +++ /dev/null @@ -1,26 +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_OPENCL_ATOMIC_ATOMIC_LOAD_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_LOAD_H__ - -#include - -#define __CLC_FUNCTION atomic_load -#define __CLC_NO_VALUE_ARG - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_NO_VALUE_ARG -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_LOAD_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_max.h b/libclc/opencl/include/clc/opencl/atomic/atomic_max.h deleted file mode 100644 index e16f4ba7122dc..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_max.h +++ /dev/null @@ -1,17 +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_OPENCL_ATOMIC_ATOMIC_MAX_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_MAX_H__ - -#include - -#define __CLC_FUNCTION atomic_max -#include - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_MAX_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_min.h b/libclc/opencl/include/clc/opencl/atomic/atomic_min.h deleted file mode 100644 index d422388614c2a..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_min.h +++ /dev/null @@ -1,17 +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_OPENCL_ATOMIC_ATOMIC_MIN_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_MIN_H__ - -#include - -#define __CLC_FUNCTION atomic_min -#include - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_MIN_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_or.h b/libclc/opencl/include/clc/opencl/atomic/atomic_or.h deleted file mode 100644 index 53c9b1e3e89b3..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_or.h +++ /dev/null @@ -1,17 +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_OPENCL_ATOMIC_ATOMIC_OR_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_OR_H__ - -#include - -#define __CLC_FUNCTION atomic_or -#include - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_OR_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_store.h b/libclc/opencl/include/clc/opencl/atomic/atomic_store.h deleted file mode 100644 index 2f9ab96f671d3..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_store.h +++ /dev/null @@ -1,26 +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_OPENCL_ATOMIC_ATOMIC_STORE_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_STORE_H__ - -#include - -#define __CLC_FUNCTION atomic_store -#define __CLC_RETURN_VOID - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#undef __CLC_RETURN_VOID -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_STORE_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h b/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h deleted file mode 100644 index 1b77bd7ced462..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_sub.h +++ /dev/null @@ -1,17 +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_OPENCL_ATOMIC_ATOMIC_SUB_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_SUB_H__ - -#include - -#define __CLC_FUNCTION atomic_sub -#include - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_SUB_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h b/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h deleted file mode 100644 index 47d4a4638db34..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_xchg.h +++ /dev/null @@ -1,20 +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_OPENCL_ATOMIC_ATOMIC_XCHG_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_XCHG_H__ - -#include - -#define __CLC_FUNCTION atomic_xchg - -_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION(volatile local float *, float); -_CLC_OVERLOAD _CLC_DECL float __CLC_FUNCTION(volatile global float *, float); -#include - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_XCHG_H__ diff --git a/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h b/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h deleted file mode 100644 index 9c808d802594e..0000000000000 --- a/libclc/opencl/include/clc/opencl/atomic/atomic_xor.h +++ /dev/null @@ -1,17 +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_OPENCL_ATOMIC_ATOMIC_XOR_H__ -#define __CLC_OPENCL_ATOMIC_ATOMIC_XOR_H__ - -#include - -#define __CLC_FUNCTION atomic_xor -#include - -#endif // __CLC_OPENCL_ATOMIC_ATOMIC_XOR_H__ diff --git a/libclc/opencl/include/clc/opencl/common/degrees.h b/libclc/opencl/include/clc/opencl/common/degrees.h deleted file mode 100644 index 8a3e77e559cfa..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/degrees.h +++ /dev/null @@ -1,19 +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_OPENCL_COMMON_DEGREES_H__ -#define __CLC_OPENCL_COMMON_DEGREES_H__ - -#define __CLC_FUNCTION degrees -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_COMMON_DEGREES_H__ diff --git a/libclc/opencl/include/clc/opencl/common/mix.h b/libclc/opencl/include/clc/opencl/common/mix.h deleted file mode 100644 index 75863cf69946f..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/mix.h +++ /dev/null @@ -1,15 +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_OPENCL_COMMON_MIX_H__ -#define __CLC_OPENCL_COMMON_MIX_H__ - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_COMMON_MIX_H__ diff --git a/libclc/opencl/include/clc/opencl/common/mix.inc b/libclc/opencl/include/clc/opencl/common/mix.inc deleted file mode 100644 index cd32085467bbf..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/mix.inc +++ /dev/null @@ -1,17 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a, - __CLC_GENTYPE b, - __CLC_GENTYPE c); - -#ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE mix(__CLC_GENTYPE a, - __CLC_GENTYPE b, - __CLC_SCALAR_GENTYPE c); -#endif diff --git a/libclc/opencl/include/clc/opencl/common/radians.h b/libclc/opencl/include/clc/opencl/common/radians.h deleted file mode 100644 index accef6eb62609..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/radians.h +++ /dev/null @@ -1,19 +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_OPENCL_COMMON_RADIANS_H__ -#define __CLC_OPENCL_COMMON_RADIANS_H__ - -#define __CLC_FUNCTION radians -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_COMMON_RADIANS_H__ diff --git a/libclc/opencl/include/clc/opencl/common/sign.h b/libclc/opencl/include/clc/opencl/common/sign.h deleted file mode 100644 index 58669b4e1fc9a..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/sign.h +++ /dev/null @@ -1,17 +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_OPENCL_COMMON_SIGN_H__ -#define __CLC_OPENCL_COMMON_SIGN_H__ - -#define __CLC_FUNCTION sign -#define __CLC_BODY -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_COMMON_SIGN_H__ diff --git a/libclc/opencl/include/clc/opencl/common/smoothstep.h b/libclc/opencl/include/clc/opencl/common/smoothstep.h deleted file mode 100644 index 79fe7d37fc1be..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/smoothstep.h +++ /dev/null @@ -1,15 +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_OPENCL_COMMON_SMOOTHSTEP_H__ -#define __CLC_OPENCL_COMMON_SMOOTHSTEP_H__ - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_COMMON_SMOOTHSTEP_H__ diff --git a/libclc/opencl/include/clc/opencl/common/smoothstep.inc b/libclc/opencl/include/clc/opencl/common/smoothstep.inc deleted file mode 100644 index f1402e3c80017..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/smoothstep.inc +++ /dev/null @@ -1,20 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE smoothstep(__CLC_GENTYPE edge0, - __CLC_GENTYPE edge1, - __CLC_GENTYPE x); -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE smoothstep(float edge0, - float edge1, - __CLC_GENTYPE x); - -#ifdef cl_khr_fp64 -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE smoothstep(double edge0, - double edge1, - __CLC_GENTYPE x); -#endif diff --git a/libclc/opencl/include/clc/opencl/common/step.h b/libclc/opencl/include/clc/opencl/common/step.h deleted file mode 100644 index aa3882a9f1abf..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/step.h +++ /dev/null @@ -1,15 +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_OPENCL_COMMON_STEP_H__ -#define __CLC_OPENCL_COMMON_STEP_H__ - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_COMMON_STEP_H__ diff --git a/libclc/opencl/include/clc/opencl/common/step.inc b/libclc/opencl/include/clc/opencl/common/step.inc deleted file mode 100644 index ab4b61e606feb..0000000000000 --- a/libclc/opencl/include/clc/opencl/common/step.inc +++ /dev/null @@ -1,15 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE step(__CLC_GENTYPE edge, - __CLC_GENTYPE x); - -#ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE step(__CLC_SCALAR_GENTYPE edge, - __CLC_GENTYPE x); -#endif diff --git a/libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h b/libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h deleted file mode 100644 index 7e0c7cabafda7..0000000000000 --- a/libclc/opencl/include/clc/opencl/explicit_fence/explicit_memory_fence.h +++ /dev/null @@ -1,18 +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_OPENCL_EXPLICIT_FENCE_EXPLICIT_MEMORY_FENCE_H__ -#define __CLC_OPENCL_EXPLICIT_FENCE_EXPLICIT_MEMORY_FENCE_H__ - -#include - -_CLC_DECL _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags); -_CLC_DECL _CLC_OVERLOAD void read_mem_fence(cl_mem_fence_flags flags); -_CLC_DECL _CLC_OVERLOAD void write_mem_fence(cl_mem_fence_flags flags); - -#endif // __CLC_OPENCL_EXPLICIT_FENCE_EXPLICIT_MEMORY_FENCE_H__ diff --git a/libclc/opencl/include/clc/opencl/geometric/cross.h b/libclc/opencl/include/clc/opencl/geometric/cross.h deleted file mode 100644 index 10e8f5641e730..0000000000000 --- a/libclc/opencl/include/clc/opencl/geometric/cross.h +++ /dev/null @@ -1,20 +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_OPENCL_GEOMETRIC_CROSS_H__ -#define __CLC_OPENCL_GEOMETRIC_CROSS_H__ - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL float3 cross(float3 p0, float3 p1); -_CLC_OVERLOAD _CLC_CONST _CLC_DECL float4 cross(float4 p0, float4 p1); - -#ifdef cl_khr_fp64 -_CLC_OVERLOAD _CLC_CONST _CLC_DECL double3 cross(double3 p0, double3 p1); -_CLC_OVERLOAD _CLC_CONST _CLC_DECL double4 cross(double4 p0, double4 p1); -#endif - -#endif // __CLC_OPENCL_GEOMETRIC_CROSS_H__ diff --git a/libclc/opencl/include/clc/opencl/geometric/distance.h b/libclc/opencl/include/clc/opencl/geometric/distance.h deleted file mode 100644 index dc5abf11c10c0..0000000000000 --- a/libclc/opencl/include/clc/opencl/geometric/distance.h +++ /dev/null @@ -1,19 +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_OPENCL_GEOMETRIC_DISTANCE_H__ -#define __CLC_OPENCL_GEOMETRIC_DISTANCE_H__ - -#define __CLC_FUNCTION distance -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_GEOMETRIC_DISTANCE_H__ diff --git a/libclc/opencl/include/clc/opencl/geometric/dot.h b/libclc/opencl/include/clc/opencl/geometric/dot.h deleted file mode 100644 index 8cd702961fa41..0000000000000 --- a/libclc/opencl/include/clc/opencl/geometric/dot.h +++ /dev/null @@ -1,19 +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_OPENCL_GEOMETRIC_DOT_H__ -#define __CLC_OPENCL_GEOMETRIC_DOT_H__ - -#define __CLC_FUNCTION dot -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_GEOMETRIC_DOT_H__ diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_distance.h b/libclc/opencl/include/clc/opencl/geometric/fast_distance.h deleted file mode 100644 index 3eb7d70cdddd2..0000000000000 --- a/libclc/opencl/include/clc/opencl/geometric/fast_distance.h +++ /dev/null @@ -1,20 +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_OPENCL_GEOMETRIC_FAST_DISTANCE_H__ -#define __CLC_OPENCL_GEOMETRIC_FAST_DISTANCE_H__ - -#define __CLC_FLOAT_ONLY -#define __CLC_FUNCTION fast_distance -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_GEOMETRIC_FAST_DISTANCE_H__ diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_length.h b/libclc/opencl/include/clc/opencl/geometric/fast_length.h deleted file mode 100644 index ff383de9ec72d..0000000000000 --- a/libclc/opencl/include/clc/opencl/geometric/fast_length.h +++ /dev/null @@ -1,20 +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_OPENCL_GEOMETRIC_FAST_LENGTH_H__ -#define __CLC_OPENCL_GEOMETRIC_FAST_LENGTH_H__ - -#define __CLC_FLOAT_ONLY -#define __CLC_FUNCTION fast_length -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_GEOMETRIC_FAST_LENGTH_H__ diff --git a/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h b/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h deleted file mode 100644 index fb677d7d3f791..0000000000000 --- a/libclc/opencl/include/clc/opencl/geometric/fast_normalize.h +++ /dev/null @@ -1,22 +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_OPENCL_GEOMETRIC_FAST_NORMALIZE_H__ -#define __CLC_OPENCL_GEOMETRIC_FAST_NORMALIZE_H__ - -#define __CLC_FLOAT_ONLY -#define __CLC_FUNCTION fast_normalize -#define __CLC_GEOMETRIC_RET_GENTYPE -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION -#undef __CLC_GEOMETRIC_RET_GENTYPE - -#endif // __CLC_OPENCL_GEOMETRIC_FAST_NORMALIZE_H__ diff --git a/libclc/opencl/include/clc/opencl/geometric/length.h b/libclc/opencl/include/clc/opencl/geometric/length.h deleted file mode 100644 index 686d554d60420..0000000000000 --- a/libclc/opencl/include/clc/opencl/geometric/length.h +++ /dev/null @@ -1,19 +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_OPENCL_GEOMETRIC_LENGTH_H__ -#define __CLC_OPENCL_GEOMETRIC_LENGTH_H__ - -#define __CLC_FUNCTION length -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_GEOMETRIC_LENGTH_H__ diff --git a/libclc/opencl/include/clc/opencl/geometric/normalize.h b/libclc/opencl/include/clc/opencl/geometric/normalize.h deleted file mode 100644 index 3ed6dae53269e..0000000000000 --- a/libclc/opencl/include/clc/opencl/geometric/normalize.h +++ /dev/null @@ -1,21 +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_OPENCL_GEOMETRIC_NORMALIZE_H__ -#define __CLC_OPENCL_GEOMETRIC_NORMALIZE_H__ - -#define __CLC_FUNCTION normalize -#define __CLC_GEOMETRIC_RET_GENTYPE -#define __CLC_BODY - -#include - -#undef __CLC_GEOMETRIC_RET_GENTYPE -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_GEOMETRIC_NORMALIZE_H__ diff --git a/libclc/opencl/include/clc/opencl/image/image.h b/libclc/opencl/include/clc/opencl/image/image.h deleted file mode 100644 index 7a248304acff5..0000000000000 --- a/libclc/opencl/include/clc/opencl/image/image.h +++ /dev/null @@ -1,55 +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_OPENCL_IMAGE_H__ -#define __CLC_OPENCL_IMAGE_H__ - -#include - -#if defined(__opencl_c_images) - -_CLC_OVERLOAD _CLC_DECL int get_image_width(image2d_t image); -_CLC_OVERLOAD _CLC_DECL int get_image_width(image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int get_image_height(image2d_t image); -_CLC_OVERLOAD _CLC_DECL int get_image_height(image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int get_image_depth(image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int get_image_channel_data_type(image2d_t image); -_CLC_OVERLOAD _CLC_DECL int get_image_channel_data_type(image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int get_image_channel_order(image2d_t image); -_CLC_OVERLOAD _CLC_DECL int get_image_channel_order(image3d_t image); - -_CLC_OVERLOAD _CLC_DECL int2 get_image_dim(image2d_t image); -_CLC_OVERLOAD _CLC_DECL int4 get_image_dim(image3d_t image); - -_CLC_OVERLOAD _CLC_DECL void write_imagef(image2d_t image, int2 coord, - float4 color); -_CLC_OVERLOAD _CLC_DECL void write_imagei(image2d_t image, int2 coord, - int4 color); -_CLC_OVERLOAD _CLC_DECL void write_imageui(image2d_t image, int2 coord, - uint4 color); - -_CLC_OVERLOAD _CLC_DECL float4 read_imagef(image2d_t image, sampler_t sampler, - int2 coord); -_CLC_OVERLOAD _CLC_DECL float4 read_imagef(image2d_t image, sampler_t sampler, - float2 coord); -_CLC_OVERLOAD _CLC_DECL int4 read_imagei(image2d_t image, sampler_t sampler, - int2 coord); -_CLC_OVERLOAD _CLC_DECL int4 read_imagei(image2d_t image, sampler_t sampler, - float2 coord); -_CLC_OVERLOAD _CLC_DECL uint4 read_imageui(image2d_t image, sampler_t sampler, - int2 coord); -_CLC_OVERLOAD _CLC_DECL uint4 read_imageui(image2d_t image, sampler_t sampler, - float2 coord); - -#endif - -#endif // __CLC_OPENCL_IMAGE_H__ diff --git a/libclc/opencl/include/clc/opencl/image/image_defines.h b/libclc/opencl/include/clc/opencl/image/image_defines.h deleted file mode 100644 index 75e08dec3f044..0000000000000 --- a/libclc/opencl/include/clc/opencl/image/image_defines.h +++ /dev/null @@ -1,62 +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_OPENCL_IMAGE_IMAGE_DEFINES_H__ -#define __CLC_OPENCL_IMAGE_IMAGE_DEFINES_H__ - -/* get_image_channel_data_type flags */ -#define CLK_SNORM_INT8 0x10D0 -#define CLK_SNORM_INT16 0x10D1 -#define CLK_UNORM_INT8 0x10D2 -#define CLK_UNORM_INT16 0x10D3 -#define CLK_UNORM_SHORT_565 0x10D4 -#define CLK_UNORM_SHORT_555 0x10D5 -#define CLK_UNORM_SHORT_101010 0x10D6 -#define CLK_SIGNED_INT8 0x10D7 -#define CLK_SIGNED_INT16 0x10D8 -#define CLK_SIGNED_INT32 0x10D9 -#define CLK_UNSIGNED_INT8 0x10DA -#define CLK_UNSIGNED_INT16 0x10DB -#define CLK_UNSIGNED_INT32 0x10DC -#define CLK_HALF_FLOAT 0x10DD -#define CLK_FLOAT 0x10DE - -/* get_image_channel_order flags */ -#define CLK_R 0x10B0 -#define CLK_A 0x10B1 -#define CLK_RG 0x10B2 -#define CLK_RA 0x10B3 -#define CLK_RGB 0x10B4 -#define CLK_RGBA 0x10B5 -#define CLK_BGRA 0x10B6 -#define CLK_ARGB 0x10B7 -#define CLK_INTENSITY 0x10B8 -#define CLK_LUMINANCE 0x10B9 -#define CLK_Rx 0x10BA -#define CLK_RGx 0x10BB -#define CLK_RGBx 0x10BC - -/* sampler normalized coords */ -#define CLK_NORMALIZED_COORDS_FALSE 0x0000 -#define CLK_NORMALIZED_COORDS_TRUE 0x0001 -#define __CLC_NORMALIZED_COORDS_MASK 0x0001 - -/* sampler addressing mode */ -#define CLK_ADDRESS_NONE 0x0000 -#define CLK_ADDRESS_CLAMP_TO_EDGE 0x0002 -#define CLK_ADDRESS_CLAMP 0x0004 -#define CLK_ADDRESS_REPEAT 0x0006 -#define CLK_ADDRESS_MIRRORED_REPEAT 0x0008 -#define __CLC_ADDRESS_MASK 0x000E - -/* sampler filter mode */ -#define CLK_FILTER_NEAREST 0x0000 -#define CLK_FILTER_LINEAR 0x0010 -#define __CLC_FILTER_MASK 0x0010 - -#endif // __CLC_OPENCL_IMAGE_IMAGE_DEFINES_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/abs.h b/libclc/opencl/include/clc/opencl/integer/abs.h deleted file mode 100644 index 3059bef9a7e4f..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/abs.h +++ /dev/null @@ -1,17 +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_OPENCL_INTEGER_ABS_H__ -#define __CLC_OPENCL_INTEGER_ABS_H__ - -#include - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_INTEGER_ABS_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/abs.inc b/libclc/opencl/include/clc/opencl/integer/abs.inc deleted file mode 100644 index 352babb393212..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/abs.inc +++ /dev/null @@ -1,9 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_U_GENTYPE abs(__CLC_GENTYPE x); diff --git a/libclc/opencl/include/clc/opencl/integer/abs_diff.h b/libclc/opencl/include/clc/opencl/integer/abs_diff.h deleted file mode 100644 index 9e8fe2b31fed7..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/abs_diff.h +++ /dev/null @@ -1,17 +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_OPENCL_INTEGER_ABS_DIFF_H__ -#define __CLC_OPENCL_INTEGER_ABS_DIFF_H__ - -#include - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_INTEGER_ABS_DIFF_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/abs_diff.inc b/libclc/opencl/include/clc/opencl/integer/abs_diff.inc deleted file mode 100644 index 1f8fd635fad9e..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/abs_diff.inc +++ /dev/null @@ -1,10 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_U_GENTYPE abs_diff(__CLC_GENTYPE x, - __CLC_GENTYPE y); diff --git a/libclc/opencl/include/clc/opencl/integer/add_sat.h b/libclc/opencl/include/clc/opencl/integer/add_sat.h deleted file mode 100644 index e77eee0c0b05a..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/add_sat.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_ADD_SAT_H__ -#define __CLC_OPENCL_INTEGER_ADD_SAT_H__ - -#include - -#define __CLC_FUNCTION add_sat -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_ADD_SAT_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/bit_reverse.h b/libclc/opencl/include/clc/opencl/integer/bit_reverse.h deleted file mode 100644 index 9c3e45d08519a..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/bit_reverse.h +++ /dev/null @@ -1,25 +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_OPENCL_INTEGER_BIT_REVERSE_H__ -#define __CLC_OPENCL_INTEGER_BIT_REVERSE_H__ - -#ifdef cl_khr_extended_bit_ops - -#include - -#define __CLC_FUNCTION bit_reverse -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // cl_khr_extended_bit_ops - -#endif // __CLC_OPENCL_INTEGER_BIT_REVERSE_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/bitfield_extract_signed.h b/libclc/opencl/include/clc/opencl/integer/bitfield_extract_signed.h deleted file mode 100644 index c6e48d9820dba..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/bitfield_extract_signed.h +++ /dev/null @@ -1,27 +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_OPENCL_INTEGER_BITFIELD_EXTRACT_SIGNED_H__ -#define __CLC_OPENCL_INTEGER_BITFIELD_EXTRACT_SIGNED_H__ - -#ifdef cl_khr_extended_bit_ops - -#include - -#define __CLC_FUNCTION bitfield_extract_signed -#define __CLC_RETTYPE __CLC_S_GENTYPE - -#define __CLC_BODY -#include - -#undef __CLC_RETTYPE -#undef __CLC_FUNCTION - -#endif // cl_khr_extended_bit_ops - -#endif // __CLC_OPENCL_INTEGER_BITFIELD_EXTRACT_SIGNED_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/bitfield_extract_unsigned.h b/libclc/opencl/include/clc/opencl/integer/bitfield_extract_unsigned.h deleted file mode 100644 index 63dd4368f97a6..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/bitfield_extract_unsigned.h +++ /dev/null @@ -1,27 +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_OPENCL_INTEGER_BITFIELD_EXTRACT_UNSIGNED_H__ -#define __CLC_OPENCL_INTEGER_BITFIELD_EXTRACT_UNSIGNED_H__ - -#ifdef cl_khr_extended_bit_ops - -#include - -#define __CLC_FUNCTION bitfield_extract_unsigned -#define __CLC_RETTYPE __CLC_U_GENTYPE - -#define __CLC_BODY -#include - -#undef __CLC_RETTYPE -#undef __CLC_FUNCTION - -#endif // cl_khr_extended_bit_ops - -#endif // __CLC_OPENCL_INTEGER_BITFIELD_EXTRACT_UNSIGNED_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/bitfield_insert.h b/libclc/opencl/include/clc/opencl/integer/bitfield_insert.h deleted file mode 100644 index 40c7d59825852..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/bitfield_insert.h +++ /dev/null @@ -1,23 +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_OPENCL_INTEGER_BITFIELD_INSERT_H__ -#define __CLC_OPENCL_INTEGER_BITFIELD_INSERT_H__ - -#ifdef cl_khr_extended_bit_ops - -#include - -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // cl_khr_extended_bit_ops - -#endif // __CLC_OPENCL_INTEGER_BITFIELD_INSERT_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/clz.h b/libclc/opencl/include/clc/opencl/integer/clz.h deleted file mode 100644 index 1b47e975b52a1..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/clz.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_CLZ_H__ -#define __CLC_OPENCL_INTEGER_CLZ_H__ - -#include - -#define __CLC_FUNCTION clz -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_CLZ_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/ctz.h b/libclc/opencl/include/clc/opencl/integer/ctz.h deleted file mode 100644 index ba01161407303..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/ctz.h +++ /dev/null @@ -1,25 +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_OPENCL_INTEGER_CTZ_H__ -#define __CLC_OPENCL_INTEGER_CTZ_H__ - -#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 - -#include - -#define __CLC_FUNCTION ctz -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __OPENCL_C_VERSION__ >= CL_VERSION_2_0 - -#endif // __CLC_OPENCL_INTEGER_CTZ_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/hadd.h b/libclc/opencl/include/clc/opencl/integer/hadd.h deleted file mode 100644 index f200c7019435b..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/hadd.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_HADD_H__ -#define __CLC_OPENCL_INTEGER_HADD_H__ - -#include - -#define __CLC_FUNCTION hadd -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_HADD_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/mad24.h b/libclc/opencl/include/clc/opencl/integer/mad24.h deleted file mode 100644 index 5bf3d385a432b..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/mad24.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_MAD24_H__ -#define __CLC_OPENCL_INTEGER_MAD24_H__ - -#include - -#define __CLC_FUNCTION mad24 -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_MAD24_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/mad_hi.h b/libclc/opencl/include/clc/opencl/integer/mad_hi.h deleted file mode 100644 index 98b525ba82689..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/mad_hi.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_MAD_HI_H__ -#define __CLC_OPENCL_INTEGER_MAD_HI_H__ - -#include - -#define __CLC_FUNCTION mad_hi -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_MAD_HI_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/mad_sat.h b/libclc/opencl/include/clc/opencl/integer/mad_sat.h deleted file mode 100644 index 9e2afe4f1d9f1..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/mad_sat.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_MAD_SAT_H__ -#define __CLC_OPENCL_INTEGER_MAD_SAT_H__ - -#include - -#define __CLC_FUNCTION mad_sat -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_MAD_SAT_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/mul24.h b/libclc/opencl/include/clc/opencl/integer/mul24.h deleted file mode 100644 index 434da55a71731..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/mul24.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_MUL24_H__ -#define __CLC_OPENCL_INTEGER_MUL24_H__ - -#include - -#define __CLC_FUNCTION mul24 -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_MUL24_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/mul_hi.h b/libclc/opencl/include/clc/opencl/integer/mul_hi.h deleted file mode 100644 index 7a9317f94cd24..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/mul_hi.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_MUL_HI_H__ -#define __CLC_OPENCL_INTEGER_MUL_HI_H__ - -#include - -#define __CLC_FUNCTION mul_hi -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_MUL_HI_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/popcount.h b/libclc/opencl/include/clc/opencl/integer/popcount.h deleted file mode 100644 index 112640c7ce635..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/popcount.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_POPCOUNT_H__ -#define __CLC_OPENCL_INTEGER_POPCOUNT_H__ - -#include - -#define __CLC_FUNCTION popcount -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_POPCOUNT_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/rhadd.h b/libclc/opencl/include/clc/opencl/integer/rhadd.h deleted file mode 100644 index 5ed8b27df8fce..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/rhadd.h +++ /dev/null @@ -1,19 +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_OPENCL_INTEGER_RHADD_H__ -#define __CLC_OPENCL_INTEGER_RHADD_H__ - -#define __CLC_FUNCTION rhadd -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_RHADD_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/rotate.h b/libclc/opencl/include/clc/opencl/integer/rotate.h deleted file mode 100644 index cc92a1254fed3..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/rotate.h +++ /dev/null @@ -1,21 +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_OPENCL_INTEGER_ROTATE_H__ -#define __CLC_OPENCL_INTEGER_ROTATE_H__ - -#include - -#define __CLC_FUNCTION rotate -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_ROTATE_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/sub_sat.h b/libclc/opencl/include/clc/opencl/integer/sub_sat.h deleted file mode 100644 index 1ff26d94778cb..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/sub_sat.h +++ /dev/null @@ -1,19 +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_OPENCL_INTEGER_SUB_SAT_H__ -#define __CLC_OPENCL_INTEGER_SUB_SAT_H__ - -#define __CLC_FUNCTION sub_sat -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_INTEGER_SUB_SAT_H__ diff --git a/libclc/opencl/include/clc/opencl/integer/upsample.h b/libclc/opencl/include/clc/opencl/integer/upsample.h deleted file mode 100644 index 4432d49ccb062..0000000000000 --- a/libclc/opencl/include/clc/opencl/integer/upsample.h +++ /dev/null @@ -1,39 +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_OPENCL_INTEGER_UPSAMPLE_H__ -#define __CLC_OPENCL_INTEGER_UPSAMPLE_H__ - -#include - -#define __CLC_UPSAMPLE_DECL(BGENTYPE, GENTYPE, UGENTYPE) \ - _CLC_OVERLOAD _CLC_CONST _CLC_DECL BGENTYPE upsample(GENTYPE hi, UGENTYPE lo); - -#define __CLC_UPSAMPLE_VEC(BGENTYPE, GENTYPE, UGENTYPE) \ - __CLC_UPSAMPLE_DECL(BGENTYPE, GENTYPE, UGENTYPE) \ - __CLC_UPSAMPLE_DECL(BGENTYPE##2, GENTYPE##2, UGENTYPE##2) \ - __CLC_UPSAMPLE_DECL(BGENTYPE##3, GENTYPE##3, UGENTYPE##3) \ - __CLC_UPSAMPLE_DECL(BGENTYPE##4, GENTYPE##4, UGENTYPE##4) \ - __CLC_UPSAMPLE_DECL(BGENTYPE##8, GENTYPE##8, UGENTYPE##8) \ - __CLC_UPSAMPLE_DECL(BGENTYPE##16, GENTYPE##16, UGENTYPE##16) - -#define __CLC_UPSAMPLE_TYPES() \ - __CLC_UPSAMPLE_VEC(short, char, uchar) \ - __CLC_UPSAMPLE_VEC(ushort, uchar, uchar) \ - __CLC_UPSAMPLE_VEC(int, short, ushort) \ - __CLC_UPSAMPLE_VEC(uint, ushort, ushort) \ - __CLC_UPSAMPLE_VEC(long, int, uint) \ - __CLC_UPSAMPLE_VEC(ulong, uint, uint) - -__CLC_UPSAMPLE_TYPES() - -#undef __CLC_UPSAMPLE_TYPES -#undef __CLC_UPSAMPLE_DECL -#undef __CLC_UPSAMPLE_VEC - -#endif // __CLC_OPENCL_INTEGER_UPSAMPLE_H__ diff --git a/libclc/opencl/include/clc/opencl/math/acos.h b/libclc/opencl/include/clc/opencl/math/acos.h deleted file mode 100644 index aa0d7af13ee9a..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/acos.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ACOS_H__ -#define __CLC_OPENCL_MATH_ACOS_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION acos - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ACOS_H__ diff --git a/libclc/opencl/include/clc/opencl/math/acosh.h b/libclc/opencl/include/clc/opencl/math/acosh.h deleted file mode 100644 index 333ab6986d8c3..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/acosh.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ACOSH_H__ -#define __CLC_OPENCL_MATH_ACOSH_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION acosh - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ACOSH_H__ diff --git a/libclc/opencl/include/clc/opencl/math/acospi.h b/libclc/opencl/include/clc/opencl/math/acospi.h deleted file mode 100644 index fd838acd5e522..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/acospi.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ACOSPI_H__ -#define __CLC_OPENCL_MATH_ACOSPI_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION acospi - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ACOSPI_H__ diff --git a/libclc/opencl/include/clc/opencl/math/asin.h b/libclc/opencl/include/clc/opencl/math/asin.h deleted file mode 100644 index de3b8ad219d1b..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/asin.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ASIN_H__ -#define __CLC_OPENCL_MATH_ASIN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION asin - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ASIN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/asinh.h b/libclc/opencl/include/clc/opencl/math/asinh.h deleted file mode 100644 index a550ec8dee4ca..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/asinh.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ASINH_H__ -#define __CLC_OPENCL_MATH_ASINH_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION asinh - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ASINH_H__ diff --git a/libclc/opencl/include/clc/opencl/math/asinpi.h b/libclc/opencl/include/clc/opencl/math/asinpi.h deleted file mode 100644 index cb6133ddc3f51..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/asinpi.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ASINPI_H__ -#define __CLC_OPENCL_MATH_ASINPI_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION asinpi - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ASINPI_H__ diff --git a/libclc/opencl/include/clc/opencl/math/atan.h b/libclc/opencl/include/clc/opencl/math/atan.h deleted file mode 100644 index 165bbc3dfb18e..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/atan.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ATAN_H__ -#define __CLC_OPENCL_MATH_ATAN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION atan - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ATAN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/atan2.h b/libclc/opencl/include/clc/opencl/math/atan2.h deleted file mode 100644 index 2874876707098..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/atan2.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ATAN2_H__ -#define __CLC_OPENCL_MATH_ATAN2_H__ - -#define __CLC_FUNCTION atan2 -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ATAN2_H__ diff --git a/libclc/opencl/include/clc/opencl/math/atan2pi.h b/libclc/opencl/include/clc/opencl/math/atan2pi.h deleted file mode 100644 index 7c09a94fffa82..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/atan2pi.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ATAN2PI_H__ -#define __CLC_OPENCL_MATH_ATAN2PI_H__ - -#define __CLC_FUNCTION atan2pi -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ATAN2PI_H__ diff --git a/libclc/opencl/include/clc/opencl/math/atanh.h b/libclc/opencl/include/clc/opencl/math/atanh.h deleted file mode 100644 index ccfe41fdb2cf1..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/atanh.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ATANH_H__ -#define __CLC_OPENCL_MATH_ATANH_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION atanh - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ATANH_H__ diff --git a/libclc/opencl/include/clc/opencl/math/atanpi.h b/libclc/opencl/include/clc/opencl/math/atanpi.h deleted file mode 100644 index 8041cc3e813e7..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/atanpi.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ATANPI_H__ -#define __CLC_OPENCL_MATH_ATANPI_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION atanpi - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ATANPI_H__ diff --git a/libclc/opencl/include/clc/opencl/math/cbrt.h b/libclc/opencl/include/clc/opencl/math/cbrt.h deleted file mode 100644 index 3beb5b4b596af..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/cbrt.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_CBRT_H__ -#define __CLC_OPENCL_MATH_CBRT_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION cbrt - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_CBRT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/ceil.h b/libclc/opencl/include/clc/opencl/math/ceil.h deleted file mode 100644 index ab32419225ce9..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/ceil.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_CEIL_H__ -#define __CLC_OPENCL_MATH_CEIL_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION ceil - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_CEIL_H__ diff --git a/libclc/opencl/include/clc/opencl/math/copysign.h b/libclc/opencl/include/clc/opencl/math/copysign.h deleted file mode 100644 index 626ce2e01cc34..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/copysign.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_COPYSIGN_H__ -#define __CLC_OPENCL_MATH_COPYSIGN_H__ - -#define __CLC_FUNCTION copysign -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_COPYSIGN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/cos.h b/libclc/opencl/include/clc/opencl/math/cos.h deleted file mode 100644 index 8d26f0f78d2d8..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/cos.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_COS_H__ -#define __CLC_OPENCL_MATH_COS_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION cos - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_COS_H__ diff --git a/libclc/opencl/include/clc/opencl/math/cosh.h b/libclc/opencl/include/clc/opencl/math/cosh.h deleted file mode 100644 index 2afe77fae6c70..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/cosh.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_COSH_H__ -#define __CLC_OPENCL_MATH_COSH_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION cosh - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_COSH_H__ diff --git a/libclc/opencl/include/clc/opencl/math/cospi.h b/libclc/opencl/include/clc/opencl/math/cospi.h deleted file mode 100644 index 8e848ac0f883b..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/cospi.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_COSPI_H__ -#define __CLC_OPENCL_MATH_COSPI_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION cospi - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_COSPI_H__ diff --git a/libclc/opencl/include/clc/opencl/math/erf.h b/libclc/opencl/include/clc/opencl/math/erf.h deleted file mode 100644 index 71c211e693bde..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/erf.h +++ /dev/null @@ -1,21 +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_OPENCL_MATH_ERF_H__ -#define __CLC_OPENCL_MATH_ERF_H__ - -#undef erfc - -#define __CLC_BODY -#define __CLC_FUNCTION erf - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ERF_H__ diff --git a/libclc/opencl/include/clc/opencl/math/erfc.h b/libclc/opencl/include/clc/opencl/math/erfc.h deleted file mode 100644 index 3939108820451..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/erfc.h +++ /dev/null @@ -1,21 +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_OPENCL_MATH_ERFC_H__ -#define __CLC_OPENCL_MATH_ERFC_H__ - -#undef erfc - -#define __CLC_BODY -#define __CLC_FUNCTION erfc - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ERFC_H__ diff --git a/libclc/opencl/include/clc/opencl/math/exp.h b/libclc/opencl/include/clc/opencl/math/exp.h deleted file mode 100644 index acf6d4885dbd3..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/exp.h +++ /dev/null @@ -1,21 +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_OPENCL_MATH_EXP_H__ -#define __CLC_OPENCL_MATH_EXP_H__ - -#undef exp - -#define __CLC_BODY -#define __CLC_FUNCTION exp - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_EXP_H__ diff --git a/libclc/opencl/include/clc/opencl/math/exp10.h b/libclc/opencl/include/clc/opencl/math/exp10.h deleted file mode 100644 index 11dcae74e0613..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/exp10.h +++ /dev/null @@ -1,21 +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_OPENCL_MATH_EXP10_H__ -#define __CLC_OPENCL_MATH_EXP10_H__ - -#undef exp10 - -#define __CLC_BODY -#define __CLC_FUNCTION exp10 - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_EXP10_H__ diff --git a/libclc/opencl/include/clc/opencl/math/exp2.h b/libclc/opencl/include/clc/opencl/math/exp2.h deleted file mode 100644 index e220654ac72e7..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/exp2.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_EXP2_H__ -#define __CLC_OPENCL_MATH_EXP2_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION exp2 - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_EXP2_H__ diff --git a/libclc/opencl/include/clc/opencl/math/expm1.h b/libclc/opencl/include/clc/opencl/math/expm1.h deleted file mode 100644 index 556dbea8fae02..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/expm1.h +++ /dev/null @@ -1,21 +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_OPENCL_MATH_EXPM1_H__ -#define __CLC_OPENCL_MATH_EXPM1_H__ - -#undef exp - -#define __CLC_BODY -#define __CLC_FUNCTION expm1 - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_EXPM1_H__ diff --git a/libclc/opencl/include/clc/opencl/math/fabs.h b/libclc/opencl/include/clc/opencl/math/fabs.h deleted file mode 100644 index ad8c05198a705..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/fabs.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_FABS_H__ -#define __CLC_OPENCL_MATH_FABS_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION fabs - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FABS_H__ diff --git a/libclc/opencl/include/clc/opencl/math/fdim.h b/libclc/opencl/include/clc/opencl/math/fdim.h deleted file mode 100644 index ed30904e3c247..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/fdim.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_FDIM_H__ -#define __CLC_OPENCL_MATH_FDIM_H__ - -#define __CLC_FUNCTION fdim -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FDIM_H__ diff --git a/libclc/opencl/include/clc/opencl/math/floor.h b/libclc/opencl/include/clc/opencl/math/floor.h deleted file mode 100644 index 8d7a0358c4652..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/floor.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_FLOOR_H__ -#define __CLC_OPENCL_MATH_FLOOR_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION floor - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FLOOR_H__ diff --git a/libclc/opencl/include/clc/opencl/math/fma.h b/libclc/opencl/include/clc/opencl/math/fma.h deleted file mode 100644 index 7a002318384a9..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/fma.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_FMA_H__ -#define __CLC_OPENCL_MATH_FMA_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION fma - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FMA_H__ diff --git a/libclc/opencl/include/clc/opencl/math/fmax.h b/libclc/opencl/include/clc/opencl/math/fmax.h deleted file mode 100644 index 8ada84403e0ab..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/fmax.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_FMAX_H__ -#define __CLC_OPENCL_MATH_FMAX_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION fmax - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FMAX_H__ diff --git a/libclc/opencl/include/clc/opencl/math/fmin.h b/libclc/opencl/include/clc/opencl/math/fmin.h deleted file mode 100644 index 3a464a63db735..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/fmin.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_FMIN_H__ -#define __CLC_OPENCL_MATH_FMIN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION fmin - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FMIN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/fmod.h b/libclc/opencl/include/clc/opencl/math/fmod.h deleted file mode 100644 index f826c8a6f6c3e..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/fmod.h +++ /dev/null @@ -1,17 +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_OPENCL_MATH_FMOD_H__ -#define __CLC_OPENCL_MATH_FMOD_H__ - -#define __CLC_FUNCTION fmod -#define __CLC_BODY -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FMOD_H__ diff --git a/libclc/opencl/include/clc/opencl/math/fract.h b/libclc/opencl/include/clc/opencl/math/fract.h deleted file mode 100644 index 342280f70ed6c..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/fract.h +++ /dev/null @@ -1,17 +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_OPENCL_MATH_FRACT_H__ -#define __CLC_OPENCL_MATH_FRACT_H__ - -#define __CLC_FUNCTION fract -#define __CLC_BODY -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FRACT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/frexp.h b/libclc/opencl/include/clc/opencl/math/frexp.h deleted file mode 100644 index 9f0701aff10a2..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/frexp.h +++ /dev/null @@ -1,18 +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_OPENCL_MATH_FREXP_H__ -#define __CLC_OPENCL_MATH_FREXP_H__ - -#define __CLC_FUNCTION frexp -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_FREXP_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_cos.h b/libclc/opencl/include/clc/opencl/math/half_cos.h deleted file mode 100644 index 9f95f5d7e2775..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_cos.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_COS_H__ -#define __CLC_OPENCL_MATH_HALF_COS_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_cos -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_COS_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_divide.h b/libclc/opencl/include/clc/opencl/math/half_divide.h deleted file mode 100644 index c61fb08e2119d..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_divide.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_HALF_DIVIDE_H__ -#define __CLC_OPENCL_MATH_HALF_DIVIDE_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_divide - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_DIVIDE_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_exp.h b/libclc/opencl/include/clc/opencl/math/half_exp.h deleted file mode 100644 index 53b75a62f4dfe..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_exp.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_EXP_H__ -#define __CLC_OPENCL_MATH_HALF_EXP_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_exp -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_EXP_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_exp10.h b/libclc/opencl/include/clc/opencl/math/half_exp10.h deleted file mode 100644 index 88b05a4df0811..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_exp10.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_EXP10_H__ -#define __CLC_OPENCL_MATH_HALF_EXP10_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_exp10 -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_EXP10_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_exp2.h b/libclc/opencl/include/clc/opencl/math/half_exp2.h deleted file mode 100644 index e440b996e58ab..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_exp2.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_EXP2_H__ -#define __CLC_OPENCL_MATH_HALF_EXP2_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_exp2 -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_EXP2_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_log.h b/libclc/opencl/include/clc/opencl/math/half_log.h deleted file mode 100644 index d4432312c6aff..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_log.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_LOG_H__ -#define __CLC_OPENCL_MATH_HALF_LOG_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_log -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_LOG_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_log10.h b/libclc/opencl/include/clc/opencl/math/half_log10.h deleted file mode 100644 index f219f950f9492..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_log10.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_LOG10_H__ -#define __CLC_OPENCL_MATH_HALF_LOG10_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_log10 -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_LOG10_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_log2.h b/libclc/opencl/include/clc/opencl/math/half_log2.h deleted file mode 100644 index 932f546e87612..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_log2.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_LOG2_H__ -#define __CLC_OPENCL_MATH_HALF_LOG2_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_log2 -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_LOG2_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_powr.h b/libclc/opencl/include/clc/opencl/math/half_powr.h deleted file mode 100644 index e9af720aa5ac5..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_powr.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_HALF_POWR_H__ -#define __CLC_OPENCL_MATH_HALF_POWR_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_powr - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_POWR_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_recip.h b/libclc/opencl/include/clc/opencl/math/half_recip.h deleted file mode 100644 index 6fb7f02138a6e..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_recip.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_RECIP_H__ -#define __CLC_OPENCL_MATH_HALF_RECIP_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_recip -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_RECIP_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_rsqrt.h b/libclc/opencl/include/clc/opencl/math/half_rsqrt.h deleted file mode 100644 index a130d3bb080a1..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_rsqrt.h +++ /dev/null @@ -1,18 +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_OPENCL_MATH_HALF_RSQRT_H__ -#define __CLC_OPENCL_MATH_HALF_RSQRT_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_rsqrt -#define __CLC_FLOAT_ONLY -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_RSQRT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_sin.h b/libclc/opencl/include/clc/opencl/math/half_sin.h deleted file mode 100644 index cde9549bd3b35..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_sin.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_SIN_H__ -#define __CLC_OPENCL_MATH_HALF_SIN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_sin -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_SIN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_sqrt.h b/libclc/opencl/include/clc/opencl/math/half_sqrt.h deleted file mode 100644 index 017bed1c066e4..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_sqrt.h +++ /dev/null @@ -1,18 +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_OPENCL_MATH_HALF_SQRT_H__ -#define __CLC_OPENCL_MATH_HALF_SQRT_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_sqrt -#define __CLC_FLOAT_ONLY -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_SQRT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/half_tan.h b/libclc/opencl/include/clc/opencl/math/half_tan.h deleted file mode 100644 index b8e71fcba43db..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/half_tan.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_HALF_TAN_H__ -#define __CLC_OPENCL_MATH_HALF_TAN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION half_tan -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HALF_TAN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/hypot.h b/libclc/opencl/include/clc/opencl/math/hypot.h deleted file mode 100644 index 53bef98772e41..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/hypot.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_HYPOT_H__ -#define __CLC_OPENCL_MATH_HYPOT_H__ - -#define __CLC_FUNCTION hypot -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_HYPOT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/ilogb.h b/libclc/opencl/include/clc/opencl/math/ilogb.h deleted file mode 100644 index 29d92632f7f50..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/ilogb.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ILOGB_H__ -#define __CLC_OPENCL_MATH_ILOGB_H__ - -#define __CLC_FUNCTION ilogb -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ILOGB_H__ diff --git a/libclc/opencl/include/clc/opencl/math/ldexp.h b/libclc/opencl/include/clc/opencl/math/ldexp.h deleted file mode 100644 index cbbd030d73400..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/ldexp.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_LDEXP_H__ -#define __CLC_OPENCL_MATH_LDEXP_H__ - -#define __CLC_FUNCTION ldexp -#define __CLC_BODY -#include -#undef __CLC_FUNCTION - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_MATH_LDEXP_H__ diff --git a/libclc/opencl/include/clc/opencl/math/ldexp.inc b/libclc/opencl/include/clc/opencl/math/ldexp.inc deleted file mode 100644 index 9f3ffeeef27e3..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/ldexp.inc +++ /dev/null @@ -1,13 +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_SCALAR - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE ldexp(__CLC_GENTYPE x, int n); - -#endif diff --git a/libclc/opencl/include/clc/opencl/math/lgamma.h b/libclc/opencl/include/clc/opencl/math/lgamma.h deleted file mode 100644 index 42c260f65942b..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/lgamma.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_LGAMMA_H__ -#define __CLC_OPENCL_MATH_LGAMMA_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION lgamma - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_LGAMMA_H__ diff --git a/libclc/opencl/include/clc/opencl/math/lgamma_r.h b/libclc/opencl/include/clc/opencl/math/lgamma_r.h deleted file mode 100644 index 03f47b30fb717..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/lgamma_r.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_LGAMMA_R_H__ -#define __CLC_OPENCL_MATH_LGAMMA_R_H__ - -#define __CLC_FUNCTION lgamma_r -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_LGAMMA_R_H__ diff --git a/libclc/opencl/include/clc/opencl/math/log.h b/libclc/opencl/include/clc/opencl/math/log.h deleted file mode 100644 index f863dee3e8f2d..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/log.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_LOG_H__ -#define __CLC_OPENCL_MATH_LOG_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION log - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_LOG_H__ diff --git a/libclc/opencl/include/clc/opencl/math/log10.h b/libclc/opencl/include/clc/opencl/math/log10.h deleted file mode 100644 index d328057ecf5e0..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/log10.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_LOG10_H__ -#define __CLC_OPENCL_MATH_LOG10_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION log10 - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_LOG10_H__ diff --git a/libclc/opencl/include/clc/opencl/math/log1p.h b/libclc/opencl/include/clc/opencl/math/log1p.h deleted file mode 100644 index 0dba062aa9fde..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/log1p.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_LOG1P_H__ -#define __CLC_OPENCL_MATH_LOG1P_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION log1p - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_LOG1P_H__ diff --git a/libclc/opencl/include/clc/opencl/math/log2.h b/libclc/opencl/include/clc/opencl/math/log2.h deleted file mode 100644 index 3903b2730e292..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/log2.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_LOG2_H__ -#define __CLC_OPENCL_MATH_LOG2_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION log2 - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_LOG2_H__ diff --git a/libclc/opencl/include/clc/opencl/math/logb.h b/libclc/opencl/include/clc/opencl/math/logb.h deleted file mode 100644 index ef4f7b763c59f..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/logb.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_LOGB_H__ -#define __CLC_OPENCL_MATH_LOGB_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION logb - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_LOGB_H__ diff --git a/libclc/opencl/include/clc/opencl/math/mad.h b/libclc/opencl/include/clc/opencl/math/mad.h deleted file mode 100644 index 440892cfbb17b..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/mad.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_MAD_H__ -#define __CLC_OPENCL_MATH_MAD_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION mad - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_MAD_H__ diff --git a/libclc/opencl/include/clc/opencl/math/maxmag.h b/libclc/opencl/include/clc/opencl/math/maxmag.h deleted file mode 100644 index 1f3df1034d8e4..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/maxmag.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_MAXMAG_H__ -#define __CLC_OPENCL_MATH_MAXMAG_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION maxmag - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_MAXMAG_H__ diff --git a/libclc/opencl/include/clc/opencl/math/minmag.h b/libclc/opencl/include/clc/opencl/math/minmag.h deleted file mode 100644 index c87fc1a20e401..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/minmag.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_MINMAG_H__ -#define __CLC_OPENCL_MATH_MINMAG_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION minmag - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_MINMAG_H__ diff --git a/libclc/opencl/include/clc/opencl/math/modf.h b/libclc/opencl/include/clc/opencl/math/modf.h deleted file mode 100644 index df07f7f5948dd..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/modf.h +++ /dev/null @@ -1,18 +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_OPENCL_MATH_MODF_H__ -#define __CLC_OPENCL_MATH_MODF_H__ - -#define __CLC_FUNCTION modf -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_MODF_H__ diff --git a/libclc/opencl/include/clc/opencl/math/nan.h b/libclc/opencl/include/clc/opencl/math/nan.h deleted file mode 100644 index d98ac56603495..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/nan.h +++ /dev/null @@ -1,15 +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_OPENCL_MATH_NAN_H__ -#define __CLC_OPENCL_MATH_NAN_H__ - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_MATH_NAN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/nan.inc b/libclc/opencl/include/clc/opencl/math/nan.inc deleted file mode 100644 index 3134e56eaf83e..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/nan.inc +++ /dev/null @@ -1,9 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE nan(__CLC_U_GENTYPE code); diff --git a/libclc/opencl/include/clc/opencl/math/native_cos.h b/libclc/opencl/include/clc/opencl/math/native_cos.h deleted file mode 100644 index 9c6728103adc3..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_cos.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_COS_H__ -#define __CLC_OPENCL_MATH_NATIVE_COS_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_cos -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_COS_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_divide.h b/libclc/opencl/include/clc/opencl/math/native_divide.h deleted file mode 100644 index 66c42f20d222c..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_divide.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_NATIVE_DIVIDE_H__ -#define __CLC_OPENCL_MATH_NATIVE_DIVIDE_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_divide - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_DIVIDE_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_exp.h b/libclc/opencl/include/clc/opencl/math/native_exp.h deleted file mode 100644 index d8c6f70d3f2c2..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_exp.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_EXP_H__ -#define __CLC_OPENCL_MATH_NATIVE_EXP_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_exp -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_EXP_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_exp10.h b/libclc/opencl/include/clc/opencl/math/native_exp10.h deleted file mode 100644 index 484eeb5de0a51..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_exp10.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_EXP10_H__ -#define __CLC_OPENCL_MATH_NATIVE_EXP10_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_exp10 -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_EXP10_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_exp2.h b/libclc/opencl/include/clc/opencl/math/native_exp2.h deleted file mode 100644 index bc1e6babc62b0..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_exp2.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_EXP2_H__ -#define __CLC_OPENCL_MATH_NATIVE_EXP2_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_exp2 -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_EXP2_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_log.h b/libclc/opencl/include/clc/opencl/math/native_log.h deleted file mode 100644 index c4bf498738f4a..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_log.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_LOG_H__ -#define __CLC_OPENCL_MATH_NATIVE_LOG_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_log -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_LOG_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_log10.h b/libclc/opencl/include/clc/opencl/math/native_log10.h deleted file mode 100644 index ab61ee3df5c03..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_log10.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_LOG10_H__ -#define __CLC_OPENCL_MATH_NATIVE_LOG10_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_log10 -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_LOG10_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_log2.h b/libclc/opencl/include/clc/opencl/math/native_log2.h deleted file mode 100644 index 6ba0d3bf490f0..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_log2.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_LOG2_H__ -#define __CLC_OPENCL_MATH_NATIVE_LOG2_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_log2 -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_LOG2_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_powr.h b/libclc/opencl/include/clc/opencl/math/native_powr.h deleted file mode 100644 index 6b63138aa7822..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_powr.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_NATIVE_POWR_H__ -#define __CLC_OPENCL_MATH_NATIVE_POWR_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_powr - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_POWR_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_recip.h b/libclc/opencl/include/clc/opencl/math/native_recip.h deleted file mode 100644 index 967eea38d80d9..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_recip.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_RECIP_H__ -#define __CLC_OPENCL_MATH_NATIVE_RECIP_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_recip -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_RECIP_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_rsqrt.h b/libclc/opencl/include/clc/opencl/math/native_rsqrt.h deleted file mode 100644 index 9146df8913720..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_rsqrt.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_RSQRT_H__ -#define __CLC_OPENCL_MATH_NATIVE_RSQRT_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_rsqrt -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_RSQRT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_sin.h b/libclc/opencl/include/clc/opencl/math/native_sin.h deleted file mode 100644 index 766b76781a9b7..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_sin.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_SIN_H__ -#define __CLC_OPENCL_MATH_NATIVE_SIN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_sin -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_SIN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_sqrt.h b/libclc/opencl/include/clc/opencl/math/native_sqrt.h deleted file mode 100644 index 5d44f28db9286..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_sqrt.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_SQRT_H__ -#define __CLC_OPENCL_MATH_NATIVE_SQRT_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_sqrt -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_SQRT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/native_tan.h b/libclc/opencl/include/clc/opencl/math/native_tan.h deleted file mode 100644 index 075aa59757b4b..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/native_tan.h +++ /dev/null @@ -1,20 +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_OPENCL_MATH_NATIVE_TAN_H__ -#define __CLC_OPENCL_MATH_NATIVE_TAN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION native_tan -#define __CLC_FLOAT_ONLY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NATIVE_TAN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/nextafter.h b/libclc/opencl/include/clc/opencl/math/nextafter.h deleted file mode 100644 index 6843f29770251..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/nextafter.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_NEXTAFTER_H__ -#define __CLC_OPENCL_MATH_NEXTAFTER_H__ - -#define __CLC_FUNCTION nextafter -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_NEXTAFTER_H__ diff --git a/libclc/opencl/include/clc/opencl/math/pow.h b/libclc/opencl/include/clc/opencl/math/pow.h deleted file mode 100644 index ce17b66b541d0..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/pow.h +++ /dev/null @@ -1,17 +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_OPENCL_MATH_POW_H__ -#define __CLC_OPENCL_MATH_POW_H__ - -#define __CLC_FUNCTION pow -#define __CLC_BODY -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_POW_H__ diff --git a/libclc/opencl/include/clc/opencl/math/pown.h b/libclc/opencl/include/clc/opencl/math/pown.h deleted file mode 100644 index 24fc298da4f1e..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/pown.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_POWN_H__ -#define __CLC_OPENCL_MATH_POWN_H__ - -#define __CLC_FUNCTION pown -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_POWN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/powr.h b/libclc/opencl/include/clc/opencl/math/powr.h deleted file mode 100644 index 6aebc346080f9..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/powr.h +++ /dev/null @@ -1,17 +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_OPENCL_MATH_POWR_H__ -#define __CLC_OPENCL_MATH_POWR_H__ - -#define __CLC_FUNCTION powr -#define __CLC_BODY -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_POWR_H__ diff --git a/libclc/opencl/include/clc/opencl/math/remainder.h b/libclc/opencl/include/clc/opencl/math/remainder.h deleted file mode 100644 index d30a315a4ce38..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/remainder.h +++ /dev/null @@ -1,17 +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_OPENCL_MATH_REMAINDER_H__ -#define __CLC_OPENCL_MATH_REMAINDER_H__ - -#define __CLC_FUNCTION remainder -#define __CLC_BODY -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_REMAINDER_H__ diff --git a/libclc/opencl/include/clc/opencl/math/remquo.h b/libclc/opencl/include/clc/opencl/math/remquo.h deleted file mode 100644 index 28fc74c00fd90..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/remquo.h +++ /dev/null @@ -1,26 +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_OPENCL_MATH_REMQUO_H__ -#define __CLC_OPENCL_MATH_REMQUO_H__ - -#define __CLC_FUNCTION remquo - -#define __CLC_BODY -#include - -#if _CLC_GENERIC_AS_SUPPORTED -#define __CLC_BODY -#define __CLC_ADDRESS_SPACE generic -#include -#undef __CLC_ADDRESS_SPACE -#endif - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_REMQUO_H__ diff --git a/libclc/opencl/include/clc/opencl/math/rint.h b/libclc/opencl/include/clc/opencl/math/rint.h deleted file mode 100644 index ceca56535a864..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/rint.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_RINT_H__ -#define __CLC_OPENCL_MATH_RINT_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION rint - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_RINT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/rootn.h b/libclc/opencl/include/clc/opencl/math/rootn.h deleted file mode 100644 index 9dce895a3f2d7..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/rootn.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ROOTN_H__ -#define __CLC_OPENCL_MATH_ROOTN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION rootn - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ROOTN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/round.h b/libclc/opencl/include/clc/opencl/math/round.h deleted file mode 100644 index 740ae9241f692..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/round.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_ROUND_H__ -#define __CLC_OPENCL_MATH_ROUND_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION round - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_ROUND_H__ diff --git a/libclc/opencl/include/clc/opencl/math/rsqrt.h b/libclc/opencl/include/clc/opencl/math/rsqrt.h deleted file mode 100644 index ea141d4bc45bd..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/rsqrt.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_RSQRT_H__ -#define __CLC_OPENCL_MATH_RSQRT_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION rsqrt - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_RSQRT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/sin.h b/libclc/opencl/include/clc/opencl/math/sin.h deleted file mode 100644 index 60de98de09584..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/sin.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_SIN_H__ -#define __CLC_OPENCL_MATH_SIN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION sin - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_SIN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/sincos.h b/libclc/opencl/include/clc/opencl/math/sincos.h deleted file mode 100644 index 4989bcf21c038..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/sincos.h +++ /dev/null @@ -1,17 +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_OPENCL_MATH_SINCOS_H__ -#define __CLC_OPENCL_MATH_SINCOS_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION sincos -#include -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_SINCOS_H__ diff --git a/libclc/opencl/include/clc/opencl/math/sinh.h b/libclc/opencl/include/clc/opencl/math/sinh.h deleted file mode 100644 index 0c9f0985be52b..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/sinh.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_SINH_H__ -#define __CLC_OPENCL_MATH_SINH_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION sinh - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_SINH_H__ diff --git a/libclc/opencl/include/clc/opencl/math/sinpi.h b/libclc/opencl/include/clc/opencl/math/sinpi.h deleted file mode 100644 index a24339f8cf03f..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/sinpi.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_SINPI_H__ -#define __CLC_OPENCL_MATH_SINPI_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION sinpi - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_SINPI_H__ diff --git a/libclc/opencl/include/clc/opencl/math/sqrt.h b/libclc/opencl/include/clc/opencl/math/sqrt.h deleted file mode 100644 index 41f604f9652dd..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/sqrt.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_SQRT_H__ -#define __CLC_OPENCL_MATH_SQRT_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION sqrt - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_SQRT_H__ diff --git a/libclc/opencl/include/clc/opencl/math/tan.h b/libclc/opencl/include/clc/opencl/math/tan.h deleted file mode 100644 index 5c3f5f6a3a417..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/tan.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_TAN_H__ -#define __CLC_OPENCL_MATH_TAN_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION tan - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_TAN_H__ diff --git a/libclc/opencl/include/clc/opencl/math/tanh.h b/libclc/opencl/include/clc/opencl/math/tanh.h deleted file mode 100644 index dce89867f25e0..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/tanh.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_TANH_H__ -#define __CLC_OPENCL_MATH_TANH_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION tanh - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_TANH_H__ diff --git a/libclc/opencl/include/clc/opencl/math/tanpi.h b/libclc/opencl/include/clc/opencl/math/tanpi.h deleted file mode 100644 index 2a903b9a1fe75..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/tanpi.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_TANPI_H__ -#define __CLC_OPENCL_MATH_TANPI_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION tanpi - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_TANPI_H__ diff --git a/libclc/opencl/include/clc/opencl/math/tgamma.h b/libclc/opencl/include/clc/opencl/math/tgamma.h deleted file mode 100644 index 5cb0a7fd48f93..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/tgamma.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_TGAMMA_H__ -#define __CLC_OPENCL_MATH_TGAMMA_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION tgamma - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_TGAMMA_H__ diff --git a/libclc/opencl/include/clc/opencl/math/trunc.h b/libclc/opencl/include/clc/opencl/math/trunc.h deleted file mode 100644 index ccb60a6a54d6a..0000000000000 --- a/libclc/opencl/include/clc/opencl/math/trunc.h +++ /dev/null @@ -1,19 +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_OPENCL_MATH_TRUNC_H__ -#define __CLC_OPENCL_MATH_TRUNC_H__ - -#define __CLC_BODY -#define __CLC_FUNCTION trunc - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MATH_TRUNC_H__ diff --git a/libclc/opencl/include/clc/opencl/misc/shuffle.h b/libclc/opencl/include/clc/opencl/misc/shuffle.h deleted file mode 100644 index a1d4b6aa38248..0000000000000 --- a/libclc/opencl/include/clc/opencl/misc/shuffle.h +++ /dev/null @@ -1,24 +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_OPENCL_MISC_SHUFFLE_H__ -#define __CLC_OPENCL_MISC_SHUFFLE_H__ - -#define __CLC_FUNCTION shuffle - -// Integer-type decls -#define __CLC_BODY -#include - -// Floating-point decls -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MISC_SHUFFLE_H__ diff --git a/libclc/opencl/include/clc/opencl/misc/shuffle2.h b/libclc/opencl/include/clc/opencl/misc/shuffle2.h deleted file mode 100644 index 0f93a802b3f36..0000000000000 --- a/libclc/opencl/include/clc/opencl/misc/shuffle2.h +++ /dev/null @@ -1,24 +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_OPENCL_MISC_SHUFFLE2_H__ -#define __CLC_OPENCL_MISC_SHUFFLE2_H__ - -#define __CLC_FUNCTION shuffle2 - -// Integer-type decls -#define __CLC_BODY -#include - -// Floating-point decls -#define __CLC_BODY -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_MISC_SHUFFLE2_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/all.h b/libclc/opencl/include/clc/opencl/relational/all.h deleted file mode 100644 index f7f14006309fb..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/all.h +++ /dev/null @@ -1,32 +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_OPENCL_RELATIONAL_ALL_H__ -#define __CLC_OPENCL_RELATIONAL_ALL_H__ - -#include - -#define _CLC_ALL_DECL(TYPE) _CLC_OVERLOAD _CLC_CONST _CLC_DECL int all(TYPE v); - -#define _CLC_VECTOR_ALL_DECL(TYPE) \ - _CLC_ALL_DECL(TYPE) \ - _CLC_ALL_DECL(TYPE##2) \ - _CLC_ALL_DECL(TYPE##3) \ - _CLC_ALL_DECL(TYPE##4) \ - _CLC_ALL_DECL(TYPE##8) \ - _CLC_ALL_DECL(TYPE##16) - -_CLC_VECTOR_ALL_DECL(char) -_CLC_VECTOR_ALL_DECL(short) -_CLC_VECTOR_ALL_DECL(int) -_CLC_VECTOR_ALL_DECL(long) - -#undef _CLC_ALL_DECL -#undef _CLC_VECTOR_ALL_DECL - -#endif // __CLC_OPENCL_RELATIONAL_ALL_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/any.h b/libclc/opencl/include/clc/opencl/relational/any.h deleted file mode 100644 index 7b1ad333cef34..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/any.h +++ /dev/null @@ -1,32 +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_OPENCL_RELATIONAL_ANY_H__ -#define __CLC_OPENCL_RELATIONAL_ANY_H__ - -#include - -#define _CLC_ANY_DECL(TYPE) _CLC_OVERLOAD _CLC_CONST _CLC_DECL int any(TYPE v); - -#define _CLC_VECTOR_ANY_DECL(TYPE) \ - _CLC_ANY_DECL(TYPE) \ - _CLC_ANY_DECL(TYPE##2) \ - _CLC_ANY_DECL(TYPE##3) \ - _CLC_ANY_DECL(TYPE##4) \ - _CLC_ANY_DECL(TYPE##8) \ - _CLC_ANY_DECL(TYPE##16) - -_CLC_VECTOR_ANY_DECL(char) -_CLC_VECTOR_ANY_DECL(short) -_CLC_VECTOR_ANY_DECL(int) -_CLC_VECTOR_ANY_DECL(long) - -#undef _CLC_ANY_DECL -#undef _CLC_VECTOR_ANY_DECL - -#endif // __CLC_OPENCL_RELATIONAL_ANY_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/bitselect.h b/libclc/opencl/include/clc/opencl/relational/bitselect.h deleted file mode 100644 index 9e967c6e2d642..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/bitselect.h +++ /dev/null @@ -1,19 +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_OPENCL_RELATIONAL_BITSELECT_H__ -#define __CLC_OPENCL_RELATIONAL_BITSELECT_H__ - -#include - -#define __CLC_BODY -#include -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_RELATIONAL_BITSELECT_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/bitselect.inc b/libclc/opencl/include/clc/opencl/relational/bitselect.inc deleted file mode 100644 index 429ef372d1214..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/bitselect.inc +++ /dev/null @@ -1,11 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE bitselect(__CLC_GENTYPE x, - __CLC_GENTYPE y, - __CLC_GENTYPE z); diff --git a/libclc/opencl/include/clc/opencl/relational/isequal.h b/libclc/opencl/include/clc/opencl/relational/isequal.h deleted file mode 100644 index b3dff2e924d2f..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isequal.h +++ /dev/null @@ -1,39 +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_OPENCL_RELATIONAL_ISEQUAL_H__ -#define __CLC_OPENCL_RELATIONAL_ISEQUAL_H__ - -#include - -#define _CLC_ISEQUAL_DECL(TYPE, RETTYPE) \ - _CLC_OVERLOAD _CLC_CONST _CLC_DECL RETTYPE isequal(TYPE x, TYPE y); - -#define _CLC_VECTOR_ISEQUAL_DECL(TYPE, RETTYPE) \ - _CLC_ISEQUAL_DECL(TYPE##2, RETTYPE##2) \ - _CLC_ISEQUAL_DECL(TYPE##3, RETTYPE##3) \ - _CLC_ISEQUAL_DECL(TYPE##4, RETTYPE##4) \ - _CLC_ISEQUAL_DECL(TYPE##8, RETTYPE##8) \ - _CLC_ISEQUAL_DECL(TYPE##16, RETTYPE##16) - -_CLC_ISEQUAL_DECL(float, int) -_CLC_VECTOR_ISEQUAL_DECL(float, int) - -#ifdef cl_khr_fp64 -_CLC_ISEQUAL_DECL(double, int) -_CLC_VECTOR_ISEQUAL_DECL(double, long) -#endif -#ifdef cl_khr_fp16 -_CLC_ISEQUAL_DECL(half, int) -_CLC_VECTOR_ISEQUAL_DECL(half, short) -#endif - -#undef _CLC_ISEQUAL_DECL -#undef _CLC_VECTOR_ISEQUAL_DEC - -#endif // __CLC_OPENCL_RELATIONAL_ISEQUAL_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isfinite.h b/libclc/opencl/include/clc/opencl/relational/isfinite.h deleted file mode 100644 index ff996befa937d..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isfinite.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISFINITE_H__ -#define __CLC_OPENCL_RELATIONAL_ISFINITE_H__ - -#include - -#define __CLC_FUNCTION isfinite -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISFINITE_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isgreater.h b/libclc/opencl/include/clc/opencl/relational/isgreater.h deleted file mode 100644 index 1885faac0d6d2..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isgreater.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISGREATER_H__ -#define __CLC_OPENCL_RELATIONAL_ISGREATER_H__ - -#include - -#define __CLC_FUNCTION isgreater -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISGREATER_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h b/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h deleted file mode 100644 index 36def480081bc..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isgreaterequal.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISGREATEREQUAL_H__ -#define __CLC_OPENCL_RELATIONAL_ISGREATEREQUAL_H__ - -#include - -#define __CLC_FUNCTION isgreaterequal -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISGREATEREQUAL_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isinf.h b/libclc/opencl/include/clc/opencl/relational/isinf.h deleted file mode 100644 index 0dd7246a88fea..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isinf.h +++ /dev/null @@ -1,40 +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_OPENCL_RELATIONAL_ISINF_H__ -#define __CLC_OPENCL_RELATIONAL_ISINF_H__ - -#include - -#define _CLC_ISINF_DECL(RET_TYPE, ARG_TYPE) \ - _CLC_OVERLOAD _CLC_CONST _CLC_DECL RET_TYPE isinf(ARG_TYPE); - -#define _CLC_VECTOR_ISINF_DECL(RET_TYPE, ARG_TYPE) \ - _CLC_ISINF_DECL(RET_TYPE##2, ARG_TYPE##2) \ - _CLC_ISINF_DECL(RET_TYPE##3, ARG_TYPE##3) \ - _CLC_ISINF_DECL(RET_TYPE##4, ARG_TYPE##4) \ - _CLC_ISINF_DECL(RET_TYPE##8, ARG_TYPE##8) \ - _CLC_ISINF_DECL(RET_TYPE##16, ARG_TYPE##16) - -_CLC_ISINF_DECL(int, float) -_CLC_VECTOR_ISINF_DECL(int, float) - -#ifdef cl_khr_fp64 -_CLC_ISINF_DECL(int, double) -_CLC_VECTOR_ISINF_DECL(long, double) -#endif - -#ifdef cl_khr_fp16 -_CLC_ISINF_DECL(int, half) -_CLC_VECTOR_ISINF_DECL(short, half) -#endif - -#undef _CLC_ISINF_DECL -#undef _CLC_VECTOR_ISINF_DECL - -#endif // __CLC_OPENCL_RELATIONAL_ISINF_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isless.h b/libclc/opencl/include/clc/opencl/relational/isless.h deleted file mode 100644 index ce516890f19e5..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isless.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISLESS_H__ -#define __CLC_OPENCL_RELATIONAL_ISLESS_H__ - -#include - -#define __CLC_FUNCTION isless -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISLESS_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/islessequal.h b/libclc/opencl/include/clc/opencl/relational/islessequal.h deleted file mode 100644 index 571ed13c0ab86..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/islessequal.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISLESSEQUAL_H__ -#define __CLC_OPENCL_RELATIONAL_ISLESSEQUAL_H__ - -#include - -#define __CLC_FUNCTION islessequal -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISLESSEQUAL_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/islessgreater.h b/libclc/opencl/include/clc/opencl/relational/islessgreater.h deleted file mode 100644 index eefd2c41b3469..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/islessgreater.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISLESSGREATER_H__ -#define __CLC_OPENCL_RELATIONAL_ISLESSGREATER_H__ - -#include - -#define __CLC_FUNCTION islessgreater -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISLESSGREATER_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isnan.h b/libclc/opencl/include/clc/opencl/relational/isnan.h deleted file mode 100644 index f02ec5d04c64f..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isnan.h +++ /dev/null @@ -1,40 +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_OPENCL_RELATIONAL_ISNAN_H__ -#define __CLC_OPENCL_RELATIONAL_ISNAN_H__ - -#include - -#define _CLC_ISNAN_DECL(RET_TYPE, ARG_TYPE) \ - _CLC_OVERLOAD _CLC_CONST _CLC_DECL RET_TYPE isnan(ARG_TYPE); - -#define _CLC_VECTOR_ISNAN_DECL(RET_TYPE, ARG_TYPE) \ - _CLC_ISNAN_DECL(RET_TYPE##2, ARG_TYPE##2) \ - _CLC_ISNAN_DECL(RET_TYPE##3, ARG_TYPE##3) \ - _CLC_ISNAN_DECL(RET_TYPE##4, ARG_TYPE##4) \ - _CLC_ISNAN_DECL(RET_TYPE##8, ARG_TYPE##8) \ - _CLC_ISNAN_DECL(RET_TYPE##16, ARG_TYPE##16) - -_CLC_ISNAN_DECL(int, float) -_CLC_VECTOR_ISNAN_DECL(int, float) - -#ifdef cl_khr_fp64 -_CLC_ISNAN_DECL(int, double) -_CLC_VECTOR_ISNAN_DECL(long, double) -#endif - -#ifdef cl_khr_fp16 -_CLC_ISNAN_DECL(int, half) -_CLC_VECTOR_ISNAN_DECL(short, half) -#endif - -#undef _CLC_ISNAN_DECL -#undef _CLC_VECTOR_ISNAN_DECL - -#endif // __CLC_OPENCL_RELATIONAL_ISNAN_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isnormal.h b/libclc/opencl/include/clc/opencl/relational/isnormal.h deleted file mode 100644 index 29ef762174f09..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isnormal.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISNORMAL_H__ -#define __CLC_OPENCL_RELATIONAL_ISNORMAL_H__ - -#include - -#define __CLC_FUNCTION isnormal -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISNORMAL_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isnotequal.h b/libclc/opencl/include/clc/opencl/relational/isnotequal.h deleted file mode 100644 index 6670b9946d186..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isnotequal.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISNOTEQUAL_H__ -#define __CLC_OPENCL_RELATIONAL_ISNOTEQUAL_H__ - -#include - -#define __CLC_FUNCTION isnotequal -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISNOTEQUAL_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isordered.h b/libclc/opencl/include/clc/opencl/relational/isordered.h deleted file mode 100644 index 09531ed86721c..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isordered.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISORDERED_H__ -#define __CLC_OPENCL_RELATIONAL_ISORDERED_H__ - -#include - -#define __CLC_FUNCTION isordered -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISORDERED_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/isunordered.h b/libclc/opencl/include/clc/opencl/relational/isunordered.h deleted file mode 100644 index d1f6dabbe20c3..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/isunordered.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_ISUNORDERED_H__ -#define __CLC_OPENCL_RELATIONAL_ISUNORDERED_H__ - -#include - -#define __CLC_FUNCTION isunordered -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_ISUNORDERED_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/select.h b/libclc/opencl/include/clc/opencl/relational/select.h deleted file mode 100644 index e4cefd8bcde2e..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/select.h +++ /dev/null @@ -1,23 +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_OPENCL_RELATIONAL_SELECT_H__ -#define __CLC_OPENCL_RELATIONAL_SELECT_H__ - -#include - -#define __CLC_SELECT_FN select - -#define __CLC_BODY -#include -#define __CLC_BODY -#include - -#undef __CLC_SELECT_FN - -#endif // __CLC_OPENCL_RELATIONAL_SELECT_H__ diff --git a/libclc/opencl/include/clc/opencl/relational/signbit.h b/libclc/opencl/include/clc/opencl/relational/signbit.h deleted file mode 100644 index fff6f33508fad..0000000000000 --- a/libclc/opencl/include/clc/opencl/relational/signbit.h +++ /dev/null @@ -1,21 +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_OPENCL_RELATIONAL_SIGNBIT_H__ -#define __CLC_OPENCL_RELATIONAL_SIGNBIT_H__ - -#include - -#define __CLC_FUNCTION signbit -#define __CLC_BODY - -#include - -#undef __CLC_FUNCTION - -#endif // __CLC_OPENCL_RELATIONAL_SIGNBIT_H__ diff --git a/libclc/opencl/include/clc/opencl/shared/clamp.h b/libclc/opencl/include/clc/opencl/shared/clamp.h deleted file mode 100644 index 4bd365e9dd006..0000000000000 --- a/libclc/opencl/include/clc/opencl/shared/clamp.h +++ /dev/null @@ -1,18 +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_OPENCL_SHARED_CLAMP_H__ -#define __CLC_OPENCL_SHARED_CLAMP_H__ - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_SHARED_CLAMP_H__ diff --git a/libclc/opencl/include/clc/opencl/shared/clamp.inc b/libclc/opencl/include/clc/opencl/shared/clamp.inc deleted file mode 100644 index 74d2f704fadd9..0000000000000 --- a/libclc/opencl/include/clc/opencl/shared/clamp.inc +++ /dev/null @@ -1,17 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x, - __CLC_GENTYPE y, - __CLC_GENTYPE z); - -#ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE clamp(__CLC_GENTYPE x, - __CLC_SCALAR_GENTYPE y, - __CLC_SCALAR_GENTYPE z); -#endif diff --git a/libclc/opencl/include/clc/opencl/shared/max.h b/libclc/opencl/include/clc/opencl/shared/max.h deleted file mode 100644 index 512e696885817..0000000000000 --- a/libclc/opencl/include/clc/opencl/shared/max.h +++ /dev/null @@ -1,18 +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_OPENCL_SHARED_MAX_H__ -#define __CLC_OPENCL_SHARED_MAX_H__ - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_SHARED_MAX_H__ diff --git a/libclc/opencl/include/clc/opencl/shared/max.inc b/libclc/opencl/include/clc/opencl/shared/max.inc deleted file mode 100644 index 99c28a7e8cd74..0000000000000 --- a/libclc/opencl/include/clc/opencl/shared/max.inc +++ /dev/null @@ -1,15 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a, - __CLC_GENTYPE b); - -#ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE max(__CLC_GENTYPE a, - __CLC_SCALAR_GENTYPE b); -#endif diff --git a/libclc/opencl/include/clc/opencl/shared/min.h b/libclc/opencl/include/clc/opencl/shared/min.h deleted file mode 100644 index e20545210dcd2..0000000000000 --- a/libclc/opencl/include/clc/opencl/shared/min.h +++ /dev/null @@ -1,18 +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_OPENCL_SHARED_MIN_H__ -#define __CLC_OPENCL_SHARED_MIN_H__ - -#define __CLC_BODY -#include - -#define __CLC_BODY -#include - -#endif // __CLC_OPENCL_SHARED_MIN_H__ diff --git a/libclc/opencl/include/clc/opencl/shared/min.inc b/libclc/opencl/include/clc/opencl/shared/min.inc deleted file mode 100644 index ce5d906fe26c7..0000000000000 --- a/libclc/opencl/include/clc/opencl/shared/min.inc +++ /dev/null @@ -1,15 +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 -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a, - __CLC_GENTYPE b); - -#ifndef __CLC_SCALAR -_CLC_OVERLOAD _CLC_CONST _CLC_DECL __CLC_GENTYPE min(__CLC_GENTYPE a, - __CLC_SCALAR_GENTYPE b); -#endif diff --git a/libclc/opencl/include/clc/opencl/shared/vload.h b/libclc/opencl/include/clc/opencl/shared/vload.h deleted file mode 100644 index 2ec087d4f3c18..0000000000000 --- a/libclc/opencl/include/clc/opencl/shared/vload.h +++ /dev/null @@ -1,88 +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_OPENCL_SHARED_VLOAD_H__ -#define __CLC_OPENCL_SHARED_VLOAD_H__ - -#include - -#define _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, VEC_TYPE, WIDTH, ADDR_SPACE) \ - _CLC_OVERLOAD _CLC_DECL VEC_TYPE vload##SUFFIX##WIDTH( \ - size_t offset, const ADDR_SPACE MEM_TYPE *x); - -#define _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, ADDR_SPACE) \ - _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##2, 2, ADDR_SPACE) \ - _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##3, 3, ADDR_SPACE) \ - _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##4, 4, ADDR_SPACE) \ - _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##8, 8, ADDR_SPACE) \ - _CLC_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##16, 16, ADDR_SPACE) - -#if _CLC_GENERIC_AS_SUPPORTED -#define _CLC_VECTOR_VLOAD_GENERIC_DECL _CLC_VECTOR_VLOAD_DECL -#else -// The generic address space isn't available, so make the macro do nothing -#define _CLC_VECTOR_VLOAD_GENERIC_DECL(X, Y, Z, W) -#endif - -#define _CLC_VECTOR_VLOAD_PRIM3(SUFFIX, MEM_TYPE, PRIM_TYPE) \ - _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __private) \ - _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __local) \ - _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __constant) \ - _CLC_VECTOR_VLOAD_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __global) \ - _CLC_VECTOR_VLOAD_GENERIC_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __generic) - -#define _CLC_VECTOR_VLOAD_PRIM1(PRIM_TYPE) \ - _CLC_VECTOR_VLOAD_PRIM3(, PRIM_TYPE, PRIM_TYPE) - -// Declare vector load prototypes -_CLC_VECTOR_VLOAD_PRIM1(char) -_CLC_VECTOR_VLOAD_PRIM1(uchar) -_CLC_VECTOR_VLOAD_PRIM1(short) -_CLC_VECTOR_VLOAD_PRIM1(ushort) -_CLC_VECTOR_VLOAD_PRIM1(int) -_CLC_VECTOR_VLOAD_PRIM1(uint) -_CLC_VECTOR_VLOAD_PRIM1(long) -_CLC_VECTOR_VLOAD_PRIM1(ulong) -_CLC_VECTOR_VLOAD_PRIM1(float) -_CLC_VECTOR_VLOAD_PRIM3(_half, half, float) -// Use suffix to declare aligned vloada_halfN -_CLC_VECTOR_VLOAD_PRIM3(a_half, half, float) - -#ifdef cl_khr_fp64 -#pragma OPENCL EXTENSION cl_khr_fp64 : enable -_CLC_VECTOR_VLOAD_PRIM1(double) -#endif -#ifdef cl_khr_fp16 -#pragma OPENCL EXTENSION cl_khr_fp16 : enable -_CLC_VECTOR_VLOAD_PRIM1(half) -#endif - -// Scalar vload_half also needs to be declared -_CLC_VLOAD_DECL(_half, half, float, , __constant) -_CLC_VLOAD_DECL(_half, half, float, , __global) -_CLC_VLOAD_DECL(_half, half, float, , __local) -_CLC_VLOAD_DECL(_half, half, float, , __private) - -// Scalar vloada_half is not part of the specs but CTS expects it -_CLC_VLOAD_DECL(a_half, half, float, , __constant) -_CLC_VLOAD_DECL(a_half, half, float, , __global) -_CLC_VLOAD_DECL(a_half, half, float, , __local) -_CLC_VLOAD_DECL(a_half, half, float, , __private) - -#if _CLC_GENERIC_AS_SUPPORTED -_CLC_VLOAD_DECL(_half, half, float, , __generic) -_CLC_VLOAD_DECL(a_half, half, float, , __generic) -#endif - -#undef _CLC_VLOAD_DECL -#undef _CLC_VECTOR_VLOAD_DECL -#undef _CLC_VECTOR_VLOAD_PRIM3 -#undef _CLC_VECTOR_VLOAD_PRIM1 -#undef _CLC_VECTOR_VLOAD_GENERIC_DECL - -#endif // __CLC_OPENCL_SHARED_VLOAD_H__ diff --git a/libclc/opencl/include/clc/opencl/shared/vstore.h b/libclc/opencl/include/clc/opencl/shared/vstore.h deleted file mode 100644 index 00eaff41f77fb..0000000000000 --- a/libclc/opencl/include/clc/opencl/shared/vstore.h +++ /dev/null @@ -1,91 +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_OPENCL_SHARED_VSTORE_H__ -#define __CLC_OPENCL_SHARED_VSTORE_H__ - -#include - -#define _CLC_VSTORE_DECL(SUFFIX, PRIM_TYPE, VEC_TYPE, WIDTH, ADDR_SPACE, RND) \ - _CLC_OVERLOAD _CLC_DECL void vstore##SUFFIX##WIDTH##RND( \ - VEC_TYPE vec, size_t offset, ADDR_SPACE PRIM_TYPE *out); - -#define _CLC_VECTOR_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, ADDR_SPACE, RND) \ - _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##2, 2, ADDR_SPACE, RND) \ - _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##3, 3, ADDR_SPACE, RND) \ - _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##4, 4, ADDR_SPACE, RND) \ - _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##8, 8, ADDR_SPACE, RND) \ - _CLC_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE##16, 16, ADDR_SPACE, RND) - -#if _CLC_GENERIC_AS_SUPPORTED -#define _CLC_VSTORE_GENERIC_DECL _CLC_VSTORE_DECL -#define _CLC_VECTOR_VSTORE_GENERIC_DECL _CLC_VECTOR_VSTORE_DECL -#else -// The generic address space isn't available, so make the macros do nothing -#define _CLC_VSTORE_GENERIC_DECL(X, Y, Z, W, V, U) -#define _CLC_VECTOR_VSTORE_GENERIC_DECL(X, Y, Z, W, V) -#endif - -#define _CLC_VECTOR_VSTORE_PRIM3(SUFFIX, MEM_TYPE, PRIM_TYPE, RND) \ - _CLC_VECTOR_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __private, RND) \ - _CLC_VECTOR_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __local, RND) \ - _CLC_VECTOR_VSTORE_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __global, RND) \ - _CLC_VECTOR_VSTORE_GENERIC_DECL(SUFFIX, MEM_TYPE, PRIM_TYPE, __generic, RND) - -#define _CLC_VECTOR_VSTORE_PRIM1(PRIM_TYPE) \ - _CLC_VECTOR_VSTORE_PRIM3(, PRIM_TYPE, PRIM_TYPE, ) - -#define _CLC_VECTOR_VSTORE_HALF_PRIM1(PRIM_TYPE, RND) \ - _CLC_VSTORE_DECL(_half, half, PRIM_TYPE, , __private, RND) \ - _CLC_VSTORE_DECL(_half, half, PRIM_TYPE, , __local, RND) \ - _CLC_VSTORE_DECL(_half, half, PRIM_TYPE, , __global, RND) \ - _CLC_VSTORE_GENERIC_DECL(_half, half, PRIM_TYPE, , __generic, RND) \ - _CLC_VECTOR_VSTORE_PRIM3(_half, half, PRIM_TYPE, RND) \ - _CLC_VSTORE_DECL(a_half, half, PRIM_TYPE, , __private, RND) \ - _CLC_VSTORE_DECL(a_half, half, PRIM_TYPE, , __local, RND) \ - _CLC_VSTORE_DECL(a_half, half, PRIM_TYPE, , __global, RND) \ - _CLC_VSTORE_GENERIC_DECL(a_half, half, PRIM_TYPE, , __generic, RND) \ - _CLC_VECTOR_VSTORE_PRIM3(a_half, half, PRIM_TYPE, RND) - -_CLC_VECTOR_VSTORE_PRIM1(char) -_CLC_VECTOR_VSTORE_PRIM1(uchar) -_CLC_VECTOR_VSTORE_PRIM1(short) -_CLC_VECTOR_VSTORE_PRIM1(ushort) -_CLC_VECTOR_VSTORE_PRIM1(int) -_CLC_VECTOR_VSTORE_PRIM1(uint) -_CLC_VECTOR_VSTORE_PRIM1(long) -_CLC_VECTOR_VSTORE_PRIM1(ulong) -_CLC_VECTOR_VSTORE_PRIM1(float) - -_CLC_VECTOR_VSTORE_HALF_PRIM1(float, ) -_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtz) -_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtn) -_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rtp) -_CLC_VECTOR_VSTORE_HALF_PRIM1(float, _rte) - -#ifdef cl_khr_fp64 -_CLC_VECTOR_VSTORE_PRIM1(double) -_CLC_VECTOR_VSTORE_HALF_PRIM1(double, ) -_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtz) -_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtn) -_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rtp) -_CLC_VECTOR_VSTORE_HALF_PRIM1(double, _rte) -#endif - -#ifdef cl_khr_fp16 -_CLC_VECTOR_VSTORE_PRIM1(half) -#endif - -#undef _CLC_VSTORE_DECL -#undef _CLC_VSTORE_GENERIC_DECL -#undef _CLC_VECTOR_VSTORE_DECL -#undef _CLC_VECTOR_VSTORE_PRIM3 -#undef _CLC_VECTOR_VSTORE_PRIM1 -#undef _CLC_VECTOR_VSTORE_GENERIC_DECL - -#endif // __CLC_OPENCL_SHARED_VSTORE_H__ diff --git a/libclc/opencl/include/clc/opencl/synchronization/barrier.h b/libclc/opencl/include/clc/opencl/synchronization/barrier.h deleted file mode 100644 index 54295b9035ae8..0000000000000 --- a/libclc/opencl/include/clc/opencl/synchronization/barrier.h +++ /dev/null @@ -1,16 +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_OPENCL_SYNCHRONIZATION_BARRIER_H__ -#define __CLC_OPENCL_SYNCHRONIZATION_BARRIER_H__ - -#include - -_CLC_DECL _CLC_OVERLOAD void barrier(cl_mem_fence_flags flags); - -#endif // __CLC_OPENCL_SYNCHRONIZATION_BARRIER_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_global_id.h b/libclc/opencl/include/clc/opencl/workitem/get_global_id.h deleted file mode 100644 index d64da9d2cc643..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_global_id.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_GLOBAL_ID_H__ -#define __CLC_OPENCL_WORKITEM_GET_GLOBAL_ID_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_global_id(uint dim); - -#endif // __CLC_OPENCL_WORKITEM_GET_GLOBAL_ID_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_global_offset.h b/libclc/opencl/include/clc/opencl/workitem/get_global_offset.h deleted file mode 100644 index ac9704e274f2d..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_global_offset.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_GLOBAL_OFFSET_H__ -#define __CLC_OPENCL_WORKITEM_GET_GLOBAL_OFFSET_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_global_offset(uint dim); - -#endif // __CLC_OPENCL_WORKITEM_GET_GLOBAL_OFFSET_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_global_size.h b/libclc/opencl/include/clc/opencl/workitem/get_global_size.h deleted file mode 100644 index 4809cc4b37712..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_global_size.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_GLOBAL_SIZE_H__ -#define __CLC_OPENCL_WORKITEM_GET_GLOBAL_SIZE_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_global_size(uint dim); - -#endif // __CLC_OPENCL_WORKITEM_GET_GLOBAL_SIZE_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_group_id.h b/libclc/opencl/include/clc/opencl/workitem/get_group_id.h deleted file mode 100644 index e3d8b07e4ad9a..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_group_id.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_GROUP_ID_H__ -#define __CLC_OPENCL_WORKITEM_GET_GROUP_ID_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_group_id(uint dim); - -#endif // __CLC_OPENCL_WORKITEM_GET_GROUP_ID_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_local_id.h b/libclc/opencl/include/clc/opencl/workitem/get_local_id.h deleted file mode 100644 index 88fbad98dfb19..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_local_id.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_LOCAL_ID_H__ -#define __CLC_OPENCL_WORKITEM_GET_LOCAL_ID_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_local_id(uint dim); - -#endif // __CLC_OPENCL_WORKITEM_GET_LOCAL_ID_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_local_linear_id.h b/libclc/opencl/include/clc/opencl/workitem/get_local_linear_id.h deleted file mode 100644 index 072318d1786f1..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_local_linear_id.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_LOCAL_LINEAR_ID_H__ -#define __CLC_OPENCL_WORKITEM_GET_LOCAL_LINEAR_ID_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_local_linear_id(); - -#endif // __CLC_OPENCL_WORKITEM_GET_LOCAL_LINEAR_ID_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_local_size.h b/libclc/opencl/include/clc/opencl/workitem/get_local_size.h deleted file mode 100644 index 49077afde34fd..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_local_size.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_LOCAL_SIZE_H__ -#define __CLC_OPENCL_WORKITEM_GET_LOCAL_SIZE_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_local_size(uint dim); - -#endif // __CLC_OPENCL_WORKITEM_GET_LOCAL_SIZE_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_max_sub_group_size.h b/libclc/opencl/include/clc/opencl/workitem/get_max_sub_group_size.h deleted file mode 100644 index b12737618c64b..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_max_sub_group_size.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_MAX_SUB_GROUP_SIZE_H__ -#define __CLC_OPENCL_WORKITEM_GET_MAX_SUB_GROUP_SIZE_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_max_sub_group_size(); - -#endif // __CLC_OPENCL_WORKITEM_GET_MAX_SUB_GROUP_SIZE_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_num_groups.h b/libclc/opencl/include/clc/opencl/workitem/get_num_groups.h deleted file mode 100644 index 29783169415ff..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_num_groups.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_NUM_GROUPS_H__ -#define __CLC_OPENCL_WORKITEM_GET_NUM_GROUPS_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL size_t get_num_groups(uint dim); - -#endif // __CLC_OPENCL_WORKITEM_GET_NUM_GROUPS_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_num_sub_groups.h b/libclc/opencl/include/clc/opencl/workitem/get_num_sub_groups.h deleted file mode 100644 index f9fd2cddbf196..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_num_sub_groups.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_NUM_SUB_GROUPS_H__ -#define __CLC_OPENCL_WORKITEM_GET_NUM_SUB_GROUPS_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_num_sub_groups(); - -#endif // __CLC_OPENCL_WORKITEM_GET_NUM_SUB_GROUPS_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_id.h b/libclc/opencl/include/clc/opencl/workitem/get_sub_group_id.h deleted file mode 100644 index 0a67c022a5131..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_id.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_SUB_GROUP_ID_H__ -#define __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_ID_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_sub_group_id(); - -#endif // __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_ID_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_local_id.h b/libclc/opencl/include/clc/opencl/workitem/get_sub_group_local_id.h deleted file mode 100644 index 37891d8f28304..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_local_id.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_SUB_GROUP_LOCAL_ID_H__ -#define __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_LOCAL_ID_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_sub_group_local_id(); - -#endif // __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_LOCAL_ID_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_size.h b/libclc/opencl/include/clc/opencl/workitem/get_sub_group_size.h deleted file mode 100644 index 74e9b033fd07f..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_sub_group_size.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_SUB_GROUP_SIZE_H__ -#define __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_SIZE_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_sub_group_size(); - -#endif // __CLC_OPENCL_WORKITEM_GET_SUB_GROUP_SIZE_H__ diff --git a/libclc/opencl/include/clc/opencl/workitem/get_work_dim.h b/libclc/opencl/include/clc/opencl/workitem/get_work_dim.h deleted file mode 100644 index 344ffaa43e108..0000000000000 --- a/libclc/opencl/include/clc/opencl/workitem/get_work_dim.h +++ /dev/null @@ -1,16 +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_OPENCL_WORKITEM_GET_WORK_DIM_H__ -#define __CLC_OPENCL_WORKITEM_GET_WORK_DIM_H__ - -#include - -_CLC_OVERLOAD _CLC_CONST _CLC_DECL uint get_work_dim(void); - -#endif // __CLC_OPENCL_WORKITEM_GET_WORK_DIM_H__ diff --git a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl index 8f9b47978c6af..b450530c7dde5 100644 --- a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl +++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_global_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #if __clang_major__ >= 8 #define CONST_AS __constant diff --git a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl index fd30e6ab7a47c..6f92d9759a220 100644 --- a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl +++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_local_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include #if __clang_major__ >= 8 #define CONST_AS __constant diff --git a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl index a88dae97c7958..0d03689feb9ba 100644 --- a/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl +++ b/libclc/opencl/lib/amdgcn-amdhsa/workitem/get_num_groups.cl @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include -#include -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_num_groups(uint dim) { size_t global_size = get_global_size(dim); diff --git a/libclc/opencl/lib/amdgcn/mem_fence/fence.cl b/libclc/opencl/lib/amdgcn/mem_fence/fence.cl index 963380761b46c..7e5d97bc6de62 100644 --- a/libclc/opencl/lib/amdgcn/mem_fence/fence.cl +++ b/libclc/opencl/lib/amdgcn/mem_fence/fence.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include _CLC_DEF _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags) { diff --git a/libclc/opencl/lib/amdgcn/synchronization/barrier.cl b/libclc/opencl/lib/amdgcn/synchronization/barrier.cl index dd7d1507f5ad4..9f67b6ebcb6db 100644 --- a/libclc/opencl/lib/amdgcn/synchronization/barrier.cl +++ b/libclc/opencl/lib/amdgcn/synchronization/barrier.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #include diff --git a/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl b/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl index 68a37f5f8f851..7338f140ab084 100644 --- a/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_global_offset.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_DEF _CLC_OVERLOAD size_t get_global_offset(uint dim) { diff --git a/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl b/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl index 94dd886ea8399..eca7199a766fc 100644 --- a/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_global_size.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_DEF _CLC_OVERLOAD size_t get_global_size(uint dim) { diff --git a/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl b/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl index fb466aa125ebd..24b61c7488d3c 100644 --- a/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_group_id.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_DEF _CLC_OVERLOAD size_t get_group_id(uint dim) { diff --git a/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl b/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl index bdaf202ac09f7..dc51a3557211e 100644 --- a/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_local_id.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_DEF _CLC_OVERLOAD size_t get_local_id(uint dim) { diff --git a/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl b/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl index aeaa383ce22f4..8aa24201de573 100644 --- a/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_local_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_amdgcn_get_local_size_x(void) __asm("llvm.r600.read.local.size.x"); uint __clc_amdgcn_get_local_size_y(void) __asm("llvm.r600.read.local.size.y"); diff --git a/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl b/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl index 3d602fb821dcd..11c1ba373aeff 100644 --- a/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_num_groups.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_amdgcn_get_num_groups_x(void) __asm("llvm.r600.read.ngroups.x"); uint __clc_amdgcn_get_num_groups_y(void) __asm("llvm.r600.read.ngroups.y"); diff --git a/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl b/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl index d3477a5e957bc..c59432a0038e4 100644 --- a/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl +++ b/libclc/opencl/lib/amdgcn/workitem/get_work_dim.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_DEF _CLC_OVERLOAD uint get_work_dim() { return __clc_get_work_dim(); } diff --git a/libclc/opencl/lib/clspv/math/fma.cl b/libclc/opencl/lib/clspv/math/fma.cl index 0e328903ba263..172ec32b8a3b3 100644 --- a/libclc/opencl/lib/clspv/math/fma.cl +++ b/libclc/opencl/lib/clspv/math/fma.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION fma diff --git a/libclc/opencl/lib/clspv/shared/vstore_half.cl b/libclc/opencl/lib/clspv/shared/vstore_half.cl index b5f0ae75c6d7a..600bbca348423 100644 --- a/libclc/opencl/lib/clspv/shared/vstore_half.cl +++ b/libclc/opencl/lib/clspv/shared/vstore_half.cl @@ -7,13 +7,7 @@ //===----------------------------------------------------------------------===// #include -#include -#include -#include -#include -#include -#include -#include +#include #pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable diff --git a/libclc/opencl/lib/generic/async/async_work_group_copy.cl b/libclc/opencl/lib/generic/async/async_work_group_copy.cl index 67eadf5e2569a..787b9f8649512 100644 --- a/libclc/opencl/lib/generic/async/async_work_group_copy.cl +++ b/libclc/opencl/lib/generic/async/async_work_group_copy.cl @@ -6,8 +6,7 @@ // //===----------------------------------------------------------------------===// -#include -#include +#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl b/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl index 2c17e2a685e8a..cfb69f26cf5e3 100644 --- a/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl +++ b/libclc/opencl/lib/generic/async/async_work_group_strided_copy.cl @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include -#include -#include +#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/async/prefetch.cl b/libclc/opencl/lib/generic/async/prefetch.cl index 8ab2101205868..ec7a2e5469e54 100644 --- a/libclc/opencl/lib/generic/async/prefetch.cl +++ b/libclc/opencl/lib/generic/async/prefetch.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/async/wait_group_events.cl b/libclc/opencl/lib/generic/async/wait_group_events.cl index 00b8ddf3342fb..5bce5cdf7aacb 100644 --- a/libclc/opencl/lib/generic/async/wait_group_events.cl +++ b/libclc/opencl/lib/generic/async/wait_group_events.cl @@ -6,8 +6,7 @@ // //===----------------------------------------------------------------------===// -#include -#include +#include _CLC_DEF _CLC_OVERLOAD void wait_group_events(int num_events, event_t *event_list) { diff --git a/libclc/opencl/lib/generic/atomic/atom_add.cl b/libclc/opencl/lib/generic/atomic/atom_add.cl index 1628ea39de434..92df57576d1d0 100644 --- a/libclc/opencl/lib/generic/atomic/atom_add.cl +++ b/libclc/opencl/lib/generic/atomic/atom_add.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_and.cl b/libclc/opencl/lib/generic/atomic/atom_and.cl index bad85046c12e5..c09f10145bb30 100644 --- a/libclc/opencl/lib/generic/atomic/atom_and.cl +++ b/libclc/opencl/lib/generic/atomic/atom_and.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl b/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl index 41ae9328e9480..9ad3be5a6fe66 100644 --- a/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl +++ b/libclc/opencl/lib/generic/atomic/atom_cmpxchg.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_dec.cl b/libclc/opencl/lib/generic/atomic/atom_dec.cl index 1f81f1d37b510..1f683b19b21cd 100644 --- a/libclc/opencl/lib/generic/atomic/atom_dec.cl +++ b/libclc/opencl/lib/generic/atomic/atom_dec.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_inc.cl b/libclc/opencl/lib/generic/atomic/atom_inc.cl index 5ae5bbb67e791..a81c913dae426 100644 --- a/libclc/opencl/lib/generic/atomic/atom_inc.cl +++ b/libclc/opencl/lib/generic/atomic/atom_inc.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_max.cl b/libclc/opencl/lib/generic/atomic/atom_max.cl index 249f5efbd4491..df39b1566de65 100644 --- a/libclc/opencl/lib/generic/atomic/atom_max.cl +++ b/libclc/opencl/lib/generic/atomic/atom_max.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_min.cl b/libclc/opencl/lib/generic/atomic/atom_min.cl index 029c601dd53af..bbeb727a712fc 100644 --- a/libclc/opencl/lib/generic/atomic/atom_min.cl +++ b/libclc/opencl/lib/generic/atomic/atom_min.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_or.cl b/libclc/opencl/lib/generic/atomic/atom_or.cl index 91f745bdda61a..54fc99e67cbf3 100644 --- a/libclc/opencl/lib/generic/atomic/atom_or.cl +++ b/libclc/opencl/lib/generic/atomic/atom_or.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_sub.cl b/libclc/opencl/lib/generic/atomic/atom_sub.cl index 7eeabd51dad48..10ece67cdf925 100644 --- a/libclc/opencl/lib/generic/atomic/atom_sub.cl +++ b/libclc/opencl/lib/generic/atomic/atom_sub.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_xchg.cl b/libclc/opencl/lib/generic/atomic/atom_xchg.cl index 770e4366de834..1888130b34ef3 100644 --- a/libclc/opencl/lib/generic/atomic/atom_xchg.cl +++ b/libclc/opencl/lib/generic/atomic/atom_xchg.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atom_xor.cl b/libclc/opencl/lib/generic/atomic/atom_xor.cl index 3fcf54e1c8832..abb10b43ef33b 100644 --- a/libclc/opencl/lib/generic/atomic/atom_xor.cl +++ b/libclc/opencl/lib/generic/atomic/atom_xor.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include // Non-volatile overloads are for backward compatibility with OpenCL 1.0. diff --git a/libclc/opencl/lib/generic/atomic/atomic_add.cl b/libclc/opencl/lib/generic/atomic/atomic_add.cl index 2f6606eb33338..5eb459d0c9d60 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_add.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_add.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_add(volatile AS TYPE *p, TYPE val) { \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_and.cl b/libclc/opencl/lib/generic/atomic/atomic_and.cl index 3bb1f7a6af273..3b7ecacee15e5 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_and.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_and.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_and(volatile AS TYPE *p, TYPE val) { \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl b/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl index 135813b8b879c..40fb2f84e49dd 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_cmpxchg.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_cmpxchg(volatile AS TYPE *p, TYPE cmp, \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_strong.cl b/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_strong.cl index f113e82285a02..9311a0d4a379c 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_strong.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_strong.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_compare_exchange_strong diff --git a/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_weak.cl b/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_weak.cl index f5c2899bb18ed..1f0e7259b0c94 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_weak.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_compare_exchange_weak.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_compare_exchange_weak diff --git a/libclc/opencl/lib/generic/atomic/atomic_dec.cl b/libclc/opencl/lib/generic/atomic/atomic_dec.cl index ee38267723369..1ae3aa991367e 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_dec.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_dec.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION atomic_dec #define __CLC_IMPL_FUNCTION __clc_atomic_dec diff --git a/libclc/opencl/lib/generic/atomic/atomic_exchange.cl b/libclc/opencl/lib/generic/atomic/atomic_exchange.cl index f7568f6ace38c..b023b1ce18e61 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_exchange.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_exchange.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_exchange diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl index d27cc7120ccce..428ac19830f7f 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_add.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_fetch_add diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_and.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_and.cl index b8531722911cf..286f97ee1e432 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_fetch_and.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_and.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_fetch_and diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_max.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_max.cl index b644ca336437a..e9fc0a83ceb4d 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_fetch_max.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_max.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_fetch_max diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_min.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_min.cl index f24fcf329b6f2..df7dac6c5b222 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_fetch_min.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_min.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_fetch_min diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_or.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_or.cl index 1f6fe4cac090a..bf4af8412c33c 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_fetch_or.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_or.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_fetch_or diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl index 94323a2c0fcb6..474aca6658014 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_sub.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_fetch_sub diff --git a/libclc/opencl/lib/generic/atomic/atomic_fetch_xor.cl b/libclc/opencl/lib/generic/atomic/atomic_fetch_xor.cl index 13e1db1124f9a..81302e54d5caa 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_fetch_xor.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_fetch_xor.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_fetch_xor diff --git a/libclc/opencl/lib/generic/atomic/atomic_flag_clear.cl b/libclc/opencl/lib/generic/atomic/atomic_flag_clear.cl index c9f944903f831..28b0101e77972 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_flag_clear.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_flag_clear.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #if defined(__opencl_c_atomic_order_seq_cst) && \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_flag_test_and_set.cl b/libclc/opencl/lib/generic/atomic/atomic_flag_test_and_set.cl index e58079ee226a1..c5a346cf423c9 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_flag_test_and_set.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_flag_test_and_set.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #if defined(__opencl_c_atomic_order_seq_cst) && \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_inc.cl b/libclc/opencl/lib/generic/atomic/atomic_inc.cl index 7cf82b25a0d43..a408087bc0e32 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_inc.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_inc.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION atomic_inc #define __CLC_IMPL_FUNCTION __clc_atomic_inc diff --git a/libclc/opencl/lib/generic/atomic/atomic_init.cl b/libclc/opencl/lib/generic/atomic/atomic_init.cl index b688d9b04da74..5255ab1f46c13 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_init.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_init.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_ATOMIC_GENTYPE __CLC_XCONCAT(atomic_, __CLC_GENTYPE) diff --git a/libclc/opencl/lib/generic/atomic/atomic_load.cl b/libclc/opencl/lib/generic/atomic/atomic_load.cl index 1b93ce84ea863..9a5d5c92d599d 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_load.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_load.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_load diff --git a/libclc/opencl/lib/generic/atomic/atomic_max.cl b/libclc/opencl/lib/generic/atomic/atomic_max.cl index fe0efdbb55c82..c9f92b7dfc082 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_max.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_max.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_max(volatile AS TYPE *p, TYPE val) { \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_min.cl b/libclc/opencl/lib/generic/atomic/atomic_min.cl index 6a4586b5d26b6..a1954a558ef10 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_min.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_min.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_min(volatile AS TYPE *p, TYPE val) { \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_or.cl b/libclc/opencl/lib/generic/atomic/atomic_or.cl index 1720b66b87fff..2ed4f058d5b66 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_or.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_or.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_or(volatile AS TYPE *p, TYPE val) { \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_store.cl b/libclc/opencl/lib/generic/atomic/atomic_store.cl index fcaa4d3128f7d..5c348248b93ea 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_store.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_store.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include #define __CLC_FUNCTION atomic_store diff --git a/libclc/opencl/lib/generic/atomic/atomic_sub.cl b/libclc/opencl/lib/generic/atomic/atomic_sub.cl index ddb7cc29d3bb0..b722d5ceed2de 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_sub.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_sub.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_sub(volatile AS TYPE *p, TYPE val) { \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_xchg.cl b/libclc/opencl/lib/generic/atomic/atomic_xchg.cl index 8e0b87cc9343c..08dbbad0628f2 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_xchg.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_xchg.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_xchg(volatile AS TYPE *p, TYPE val) { \ diff --git a/libclc/opencl/lib/generic/atomic/atomic_xor.cl b/libclc/opencl/lib/generic/atomic/atomic_xor.cl index 46dc6c3e9111f..7279f4437d7c5 100644 --- a/libclc/opencl/lib/generic/atomic/atomic_xor.cl +++ b/libclc/opencl/lib/generic/atomic/atomic_xor.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_IMPL(TYPE, AS) \ _CLC_OVERLOAD _CLC_DEF TYPE atomic_xor(volatile AS TYPE *p, TYPE val) { \ diff --git a/libclc/opencl/lib/generic/common/degrees.cl b/libclc/opencl/lib/generic/common/degrees.cl index 15b85af997b4d..d0f692cc320fa 100644 --- a/libclc/opencl/lib/generic/common/degrees.cl +++ b/libclc/opencl/lib/generic/common/degrees.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION degrees #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/common/mix.cl b/libclc/opencl/lib/generic/common/mix.cl index 014cc1a742f1c..2963ee62c3493 100644 --- a/libclc/opencl/lib/generic/common/mix.cl +++ b/libclc/opencl/lib/generic/common/mix.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/common/radians.cl b/libclc/opencl/lib/generic/common/radians.cl index 6550cf458a7a8..80168bc569a6e 100644 --- a/libclc/opencl/lib/generic/common/radians.cl +++ b/libclc/opencl/lib/generic/common/radians.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION radians #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/common/sign.cl b/libclc/opencl/lib/generic/common/sign.cl index 5508cd7bfab17..88c974cd7c5d5 100644 --- a/libclc/opencl/lib/generic/common/sign.cl +++ b/libclc/opencl/lib/generic/common/sign.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION sign #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/common/smoothstep.cl b/libclc/opencl/lib/generic/common/smoothstep.cl index ee37718231929..9589d0b8afaa2 100644 --- a/libclc/opencl/lib/generic/common/smoothstep.cl +++ b/libclc/opencl/lib/generic/common/smoothstep.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/common/step.cl b/libclc/opencl/lib/generic/common/step.cl index d946771698150..ab12570f54c06 100644 --- a/libclc/opencl/lib/generic/common/step.cl +++ b/libclc/opencl/lib/generic/common/step.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/geometric/cross.cl b/libclc/opencl/lib/generic/geometric/cross.cl index 7553c80e6b253..29dd6370a4d57 100644 --- a/libclc/opencl/lib/generic/geometric/cross.cl +++ b/libclc/opencl/lib/generic/geometric/cross.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include _CLC_OVERLOAD _CLC_DEF float3 cross(float3 p0, float3 p1) { return __clc_cross(p0, p1); diff --git a/libclc/opencl/lib/generic/geometric/distance.cl b/libclc/opencl/lib/generic/geometric/distance.cl index 4d9f5403f8c2d..9a39e9e0c3375 100644 --- a/libclc/opencl/lib/generic/geometric/distance.cl +++ b/libclc/opencl/lib/generic/geometric/distance.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION distance #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/geometric/dot.cl b/libclc/opencl/lib/generic/geometric/dot.cl index fc207c8fc155a..a622b209f48ba 100644 --- a/libclc/opencl/lib/generic/geometric/dot.cl +++ b/libclc/opencl/lib/generic/geometric/dot.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION dot #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/geometric/fast_distance.cl b/libclc/opencl/lib/generic/geometric/fast_distance.cl index a9c2c66dc9a19..2e5c22201c8ab 100644 --- a/libclc/opencl/lib/generic/geometric/fast_distance.cl +++ b/libclc/opencl/lib/generic/geometric/fast_distance.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION fast_distance diff --git a/libclc/opencl/lib/generic/geometric/fast_length.cl b/libclc/opencl/lib/generic/geometric/fast_length.cl index 8e6ce1aa5c564..13ac101e391df 100644 --- a/libclc/opencl/lib/generic/geometric/fast_length.cl +++ b/libclc/opencl/lib/generic/geometric/fast_length.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION fast_length diff --git a/libclc/opencl/lib/generic/geometric/fast_normalize.cl b/libclc/opencl/lib/generic/geometric/fast_normalize.cl index d2f7111516f44..ee3eed25fac55 100644 --- a/libclc/opencl/lib/generic/geometric/fast_normalize.cl +++ b/libclc/opencl/lib/generic/geometric/fast_normalize.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION fast_normalize #define __CLC_FLOAT_ONLY diff --git a/libclc/opencl/lib/generic/geometric/length.cl b/libclc/opencl/lib/generic/geometric/length.cl index 59e2055020d88..ce5dee508ca21 100644 --- a/libclc/opencl/lib/generic/geometric/length.cl +++ b/libclc/opencl/lib/generic/geometric/length.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION length #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/geometric/normalize.cl b/libclc/opencl/lib/generic/geometric/normalize.cl index 968d4001ae999..6dd96a3259e71 100644 --- a/libclc/opencl/lib/generic/geometric/normalize.cl +++ b/libclc/opencl/lib/generic/geometric/normalize.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION normalize #define __CLC_GEOMETRIC_RET_GENTYPE diff --git a/libclc/opencl/lib/generic/integer/abs.cl b/libclc/opencl/lib/generic/integer/abs.cl index 0771ec7934330..3a2aabf716ce4 100644 --- a/libclc/opencl/lib/generic/integer/abs.cl +++ b/libclc/opencl/lib/generic/integer/abs.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/integer/abs_diff.cl b/libclc/opencl/lib/generic/integer/abs_diff.cl index d65b0468a7f21..c738c99eb9e04 100644 --- a/libclc/opencl/lib/generic/integer/abs_diff.cl +++ b/libclc/opencl/lib/generic/integer/abs_diff.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/integer/add_sat.cl b/libclc/opencl/lib/generic/integer/add_sat.cl index 6cde612e5fb0f..a4325054cf7eb 100644 --- a/libclc/opencl/lib/generic/integer/add_sat.cl +++ b/libclc/opencl/lib/generic/integer/add_sat.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION add_sat #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/bit_reverse.cl b/libclc/opencl/lib/generic/integer/bit_reverse.cl index b35a5c473a1e6..917be12b8e833 100644 --- a/libclc/opencl/lib/generic/integer/bit_reverse.cl +++ b/libclc/opencl/lib/generic/integer/bit_reverse.cl @@ -9,7 +9,6 @@ #ifdef cl_khr_extended_bit_ops #include -#include #define __CLC_FUNCTION bit_reverse #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/bitfield_extract_signed.cl b/libclc/opencl/lib/generic/integer/bitfield_extract_signed.cl index ad49cd36b766e..c54dd461f1713 100644 --- a/libclc/opencl/lib/generic/integer/bitfield_extract_signed.cl +++ b/libclc/opencl/lib/generic/integer/bitfield_extract_signed.cl @@ -9,7 +9,6 @@ #ifdef cl_khr_extended_bit_ops #include -#include #define __CLC_FUNCTION bitfield_extract_signed #define __CLC_RETTYPE __CLC_S_GENTYPE diff --git a/libclc/opencl/lib/generic/integer/bitfield_extract_unsigned.cl b/libclc/opencl/lib/generic/integer/bitfield_extract_unsigned.cl index e2fe92cfcce82..b78d92c69cd03 100644 --- a/libclc/opencl/lib/generic/integer/bitfield_extract_unsigned.cl +++ b/libclc/opencl/lib/generic/integer/bitfield_extract_unsigned.cl @@ -9,7 +9,6 @@ #ifdef cl_khr_extended_bit_ops #include -#include #define __CLC_FUNCTION bitfield_extract_unsigned #define __CLC_RETTYPE __CLC_U_GENTYPE diff --git a/libclc/opencl/lib/generic/integer/bitfield_insert.cl b/libclc/opencl/lib/generic/integer/bitfield_insert.cl index f6d0aea96d8ec..bc75df9573926 100644 --- a/libclc/opencl/lib/generic/integer/bitfield_insert.cl +++ b/libclc/opencl/lib/generic/integer/bitfield_insert.cl @@ -9,7 +9,6 @@ #ifdef cl_khr_extended_bit_ops #include -#include #define __CLC_FUNCTION bitfield_insert #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/clz.cl b/libclc/opencl/lib/generic/integer/clz.cl index d0509cba5913a..8e700ca397a94 100644 --- a/libclc/opencl/lib/generic/integer/clz.cl +++ b/libclc/opencl/lib/generic/integer/clz.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION clz #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/ctz.cl b/libclc/opencl/lib/generic/integer/ctz.cl index 640ccfa5f3117..a961e5b8c1d68 100644 --- a/libclc/opencl/lib/generic/integer/ctz.cl +++ b/libclc/opencl/lib/generic/integer/ctz.cl @@ -9,7 +9,6 @@ #if __OPENCL_C_VERSION__ >= CL_VERSION_2_0 #include -#include #define __CLC_FUNCTION ctz #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/hadd.cl b/libclc/opencl/lib/generic/integer/hadd.cl index 0082524b55af2..5281e63a73623 100644 --- a/libclc/opencl/lib/generic/integer/hadd.cl +++ b/libclc/opencl/lib/generic/integer/hadd.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION hadd #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/mad24.cl b/libclc/opencl/lib/generic/integer/mad24.cl index fc8e0e3171334..e964a3983cfbb 100644 --- a/libclc/opencl/lib/generic/integer/mad24.cl +++ b/libclc/opencl/lib/generic/integer/mad24.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION mad24 #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/mad_hi.cl b/libclc/opencl/lib/generic/integer/mad_hi.cl index 20d096c59650d..24bfb6e1ee0dd 100644 --- a/libclc/opencl/lib/generic/integer/mad_hi.cl +++ b/libclc/opencl/lib/generic/integer/mad_hi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION mad_hi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/mad_sat.cl b/libclc/opencl/lib/generic/integer/mad_sat.cl index 310b31a0ca239..c3875e340ff1f 100644 --- a/libclc/opencl/lib/generic/integer/mad_sat.cl +++ b/libclc/opencl/lib/generic/integer/mad_sat.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION mad_sat #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/mul24.cl b/libclc/opencl/lib/generic/integer/mul24.cl index 243bff77da91a..5c681ac4e7145 100644 --- a/libclc/opencl/lib/generic/integer/mul24.cl +++ b/libclc/opencl/lib/generic/integer/mul24.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION mul24 #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/mul_hi.cl b/libclc/opencl/lib/generic/integer/mul_hi.cl index 99d3051a0df9e..1a9c3a923a3e9 100644 --- a/libclc/opencl/lib/generic/integer/mul_hi.cl +++ b/libclc/opencl/lib/generic/integer/mul_hi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION mul_hi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/popcount.cl b/libclc/opencl/lib/generic/integer/popcount.cl index e4219b4ff9c37..0dc521fb409ea 100644 --- a/libclc/opencl/lib/generic/integer/popcount.cl +++ b/libclc/opencl/lib/generic/integer/popcount.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION popcount #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/rhadd.cl b/libclc/opencl/lib/generic/integer/rhadd.cl index df9f1eff3e2d5..f660a21b4a019 100644 --- a/libclc/opencl/lib/generic/integer/rhadd.cl +++ b/libclc/opencl/lib/generic/integer/rhadd.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION rhadd #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/rotate.cl b/libclc/opencl/lib/generic/integer/rotate.cl index f5b6195275deb..82015803370b1 100644 --- a/libclc/opencl/lib/generic/integer/rotate.cl +++ b/libclc/opencl/lib/generic/integer/rotate.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION rotate #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/sub_sat.cl b/libclc/opencl/lib/generic/integer/sub_sat.cl index 81517022160ae..76d80c4172426 100644 --- a/libclc/opencl/lib/generic/integer/sub_sat.cl +++ b/libclc/opencl/lib/generic/integer/sub_sat.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION sub_sat #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/integer/upsample.cl b/libclc/opencl/lib/generic/integer/upsample.cl index 5f95c811e058d..2a63a13186d11 100644 --- a/libclc/opencl/lib/generic/integer/upsample.cl +++ b/libclc/opencl/lib/generic/integer/upsample.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_UPSAMPLE_IMPL(BGENTYPE, GENTYPE, UGENTYPE) \ _CLC_OVERLOAD _CLC_DEF BGENTYPE upsample(GENTYPE hi, UGENTYPE lo) { \ diff --git a/libclc/opencl/lib/generic/math/acos.cl b/libclc/opencl/lib/generic/math/acos.cl index bdaeedf02e908..ca9fd9d4f1b07 100644 --- a/libclc/opencl/lib/generic/math/acos.cl +++ b/libclc/opencl/lib/generic/math/acos.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION acos #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/acosh.cl b/libclc/opencl/lib/generic/math/acosh.cl index c46532dbcbd95..3e2c0b3d4a87f 100644 --- a/libclc/opencl/lib/generic/math/acosh.cl +++ b/libclc/opencl/lib/generic/math/acosh.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION acosh #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/acospi.cl b/libclc/opencl/lib/generic/math/acospi.cl index b6b0fb91250d0..82e84c690e270 100644 --- a/libclc/opencl/lib/generic/math/acospi.cl +++ b/libclc/opencl/lib/generic/math/acospi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION acospi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/asin.cl b/libclc/opencl/lib/generic/math/asin.cl index 31fc36d746019..5c3ccd6532013 100644 --- a/libclc/opencl/lib/generic/math/asin.cl +++ b/libclc/opencl/lib/generic/math/asin.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION asin #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/asinh.cl b/libclc/opencl/lib/generic/math/asinh.cl index 3bdd8099f079b..86d825f77f324 100644 --- a/libclc/opencl/lib/generic/math/asinh.cl +++ b/libclc/opencl/lib/generic/math/asinh.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION asinh #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/asinpi.cl b/libclc/opencl/lib/generic/math/asinpi.cl index 6df9047ced3c5..b093777600c40 100644 --- a/libclc/opencl/lib/generic/math/asinpi.cl +++ b/libclc/opencl/lib/generic/math/asinpi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION asinpi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/atan.cl b/libclc/opencl/lib/generic/math/atan.cl index 157e50dd0e07a..a5dbfd052feb0 100644 --- a/libclc/opencl/lib/generic/math/atan.cl +++ b/libclc/opencl/lib/generic/math/atan.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION atan #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/atan2.cl b/libclc/opencl/lib/generic/math/atan2.cl index 5f4a9d991cd95..64a06991a91df 100644 --- a/libclc/opencl/lib/generic/math/atan2.cl +++ b/libclc/opencl/lib/generic/math/atan2.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION atan2 #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/atan2pi.cl b/libclc/opencl/lib/generic/math/atan2pi.cl index 4e577c775ebb1..854ca09990b44 100644 --- a/libclc/opencl/lib/generic/math/atan2pi.cl +++ b/libclc/opencl/lib/generic/math/atan2pi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION atan2pi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/atanh.cl b/libclc/opencl/lib/generic/math/atanh.cl index d0337ff1ffac3..3a38cfe69ade8 100644 --- a/libclc/opencl/lib/generic/math/atanh.cl +++ b/libclc/opencl/lib/generic/math/atanh.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION atanh #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/atanpi.cl b/libclc/opencl/lib/generic/math/atanpi.cl index 11630db430c71..c3da0aba9e624 100644 --- a/libclc/opencl/lib/generic/math/atanpi.cl +++ b/libclc/opencl/lib/generic/math/atanpi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION atanpi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/cbrt.cl b/libclc/opencl/lib/generic/math/cbrt.cl index 7de61436522b3..86b8415c688cc 100644 --- a/libclc/opencl/lib/generic/math/cbrt.cl +++ b/libclc/opencl/lib/generic/math/cbrt.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION cbrt #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/ceil.cl b/libclc/opencl/lib/generic/math/ceil.cl index e1bffbcb68600..5d0d8ad4238fc 100644 --- a/libclc/opencl/lib/generic/math/ceil.cl +++ b/libclc/opencl/lib/generic/math/ceil.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION ceil #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/copysign.cl b/libclc/opencl/lib/generic/math/copysign.cl index 5234b534631c8..fbb86b89a8bce 100644 --- a/libclc/opencl/lib/generic/math/copysign.cl +++ b/libclc/opencl/lib/generic/math/copysign.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION copysign #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/cos.cl b/libclc/opencl/lib/generic/math/cos.cl index 69c9c37cf3e84..4b895b980c306 100644 --- a/libclc/opencl/lib/generic/math/cos.cl +++ b/libclc/opencl/lib/generic/math/cos.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION cos #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/cosh.cl b/libclc/opencl/lib/generic/math/cosh.cl index de9e750c1a7f0..4b44cb426dac0 100644 --- a/libclc/opencl/lib/generic/math/cosh.cl +++ b/libclc/opencl/lib/generic/math/cosh.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION cosh #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/cospi.cl b/libclc/opencl/lib/generic/math/cospi.cl index d9afd05bbabf3..d910c88c5c9c5 100644 --- a/libclc/opencl/lib/generic/math/cospi.cl +++ b/libclc/opencl/lib/generic/math/cospi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION cospi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/erf.cl b/libclc/opencl/lib/generic/math/erf.cl index 8d5a80ba10e47..58b2d8d6937ba 100644 --- a/libclc/opencl/lib/generic/math/erf.cl +++ b/libclc/opencl/lib/generic/math/erf.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION erf #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/erfc.cl b/libclc/opencl/lib/generic/math/erfc.cl index a3fda46237d99..5aa7d0fcc32e0 100644 --- a/libclc/opencl/lib/generic/math/erfc.cl +++ b/libclc/opencl/lib/generic/math/erfc.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION erfc #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/exp.cl b/libclc/opencl/lib/generic/math/exp.cl index a9fd07a26d0e1..2afeb89370794 100644 --- a/libclc/opencl/lib/generic/math/exp.cl +++ b/libclc/opencl/lib/generic/math/exp.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION exp #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/exp10.cl b/libclc/opencl/lib/generic/math/exp10.cl index 7db7bafd226f4..befc5f16bb264 100644 --- a/libclc/opencl/lib/generic/math/exp10.cl +++ b/libclc/opencl/lib/generic/math/exp10.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION exp10 #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/exp2.cl b/libclc/opencl/lib/generic/math/exp2.cl index 1ffc34ae13ce0..f82b713a98920 100644 --- a/libclc/opencl/lib/generic/math/exp2.cl +++ b/libclc/opencl/lib/generic/math/exp2.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION exp2 #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/expm1.cl b/libclc/opencl/lib/generic/math/expm1.cl index 69c852fc7e79c..66661192b9915 100644 --- a/libclc/opencl/lib/generic/math/expm1.cl +++ b/libclc/opencl/lib/generic/math/expm1.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION expm1 #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/fabs.cl b/libclc/opencl/lib/generic/math/fabs.cl index d88c6c84be6d6..eed1a585b64cb 100644 --- a/libclc/opencl/lib/generic/math/fabs.cl +++ b/libclc/opencl/lib/generic/math/fabs.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION fabs #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/fdim.cl b/libclc/opencl/lib/generic/math/fdim.cl index edaa8a3daef45..16fcce64f5178 100644 --- a/libclc/opencl/lib/generic/math/fdim.cl +++ b/libclc/opencl/lib/generic/math/fdim.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION fdim #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/floor.cl b/libclc/opencl/lib/generic/math/floor.cl index 2edc1df21bc59..9e2bd0abe3b3a 100644 --- a/libclc/opencl/lib/generic/math/floor.cl +++ b/libclc/opencl/lib/generic/math/floor.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION floor #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/fma.cl b/libclc/opencl/lib/generic/math/fma.cl index 199d2683a8988..adac2c3960dd3 100644 --- a/libclc/opencl/lib/generic/math/fma.cl +++ b/libclc/opencl/lib/generic/math/fma.cl @@ -8,7 +8,6 @@ #include #include -#include #define __CLC_FUNCTION fma #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/fmax.cl b/libclc/opencl/lib/generic/math/fmax.cl index ae7a70a69fe38..987c605dc248a 100644 --- a/libclc/opencl/lib/generic/math/fmax.cl +++ b/libclc/opencl/lib/generic/math/fmax.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION fmax #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/fmin.cl b/libclc/opencl/lib/generic/math/fmin.cl index 4b55a93bb70fa..b31a7c6621a66 100644 --- a/libclc/opencl/lib/generic/math/fmin.cl +++ b/libclc/opencl/lib/generic/math/fmin.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION fmin #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/fmod.cl b/libclc/opencl/lib/generic/math/fmod.cl index 338b803347217..7ff28defbdc01 100644 --- a/libclc/opencl/lib/generic/math/fmod.cl +++ b/libclc/opencl/lib/generic/math/fmod.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION fmod #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/fract.cl b/libclc/opencl/lib/generic/math/fract.cl index 00e8eb456cf64..3c749443ba1a3 100644 --- a/libclc/opencl/lib/generic/math/fract.cl +++ b/libclc/opencl/lib/generic/math/fract.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION fract #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/frexp.cl b/libclc/opencl/lib/generic/math/frexp.cl index 207f9de1c99ec..e8c1bff46581b 100644 --- a/libclc/opencl/lib/generic/math/frexp.cl +++ b/libclc/opencl/lib/generic/math/frexp.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION frexp #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/half_cos.cl b/libclc/opencl/lib/generic/math/half_cos.cl index d1a5352b52670..2d92636c08a4a 100644 --- a/libclc/opencl/lib/generic/math/half_cos.cl +++ b/libclc/opencl/lib/generic/math/half_cos.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_cos diff --git a/libclc/opencl/lib/generic/math/half_divide.cl b/libclc/opencl/lib/generic/math/half_divide.cl index 10c418b9312db..3d3cb76528b63 100644 --- a/libclc/opencl/lib/generic/math/half_divide.cl +++ b/libclc/opencl/lib/generic/math/half_divide.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_divide diff --git a/libclc/opencl/lib/generic/math/half_exp.cl b/libclc/opencl/lib/generic/math/half_exp.cl index fbbf564cb697a..367bcc94b0491 100644 --- a/libclc/opencl/lib/generic/math/half_exp.cl +++ b/libclc/opencl/lib/generic/math/half_exp.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_exp diff --git a/libclc/opencl/lib/generic/math/half_exp10.cl b/libclc/opencl/lib/generic/math/half_exp10.cl index e655f5f89ff69..58e2b5ec39d48 100644 --- a/libclc/opencl/lib/generic/math/half_exp10.cl +++ b/libclc/opencl/lib/generic/math/half_exp10.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_exp10 diff --git a/libclc/opencl/lib/generic/math/half_exp2.cl b/libclc/opencl/lib/generic/math/half_exp2.cl index 417d8b978e7de..6b98fdd25b7ca 100644 --- a/libclc/opencl/lib/generic/math/half_exp2.cl +++ b/libclc/opencl/lib/generic/math/half_exp2.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_exp2 diff --git a/libclc/opencl/lib/generic/math/half_log.cl b/libclc/opencl/lib/generic/math/half_log.cl index 89482c263f83f..a839f7e553b30 100644 --- a/libclc/opencl/lib/generic/math/half_log.cl +++ b/libclc/opencl/lib/generic/math/half_log.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_log diff --git a/libclc/opencl/lib/generic/math/half_log10.cl b/libclc/opencl/lib/generic/math/half_log10.cl index b5ffe7edd363a..8e193f8f215f2 100644 --- a/libclc/opencl/lib/generic/math/half_log10.cl +++ b/libclc/opencl/lib/generic/math/half_log10.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_log10 diff --git a/libclc/opencl/lib/generic/math/half_log2.cl b/libclc/opencl/lib/generic/math/half_log2.cl index cf13cf927c9c9..2f072752750d1 100644 --- a/libclc/opencl/lib/generic/math/half_log2.cl +++ b/libclc/opencl/lib/generic/math/half_log2.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_log2 diff --git a/libclc/opencl/lib/generic/math/half_powr.cl b/libclc/opencl/lib/generic/math/half_powr.cl index d676f353f8647..68e32a8142227 100644 --- a/libclc/opencl/lib/generic/math/half_powr.cl +++ b/libclc/opencl/lib/generic/math/half_powr.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_powr diff --git a/libclc/opencl/lib/generic/math/half_recip.cl b/libclc/opencl/lib/generic/math/half_recip.cl index 40a6c587dbaf9..26379d751208a 100644 --- a/libclc/opencl/lib/generic/math/half_recip.cl +++ b/libclc/opencl/lib/generic/math/half_recip.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_recip diff --git a/libclc/opencl/lib/generic/math/half_rsqrt.cl b/libclc/opencl/lib/generic/math/half_rsqrt.cl index 944976855dacf..7f77d737ff202 100644 --- a/libclc/opencl/lib/generic/math/half_rsqrt.cl +++ b/libclc/opencl/lib/generic/math/half_rsqrt.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_rsqrt diff --git a/libclc/opencl/lib/generic/math/half_sin.cl b/libclc/opencl/lib/generic/math/half_sin.cl index 3376f8344f394..e6f928a88e1d6 100644 --- a/libclc/opencl/lib/generic/math/half_sin.cl +++ b/libclc/opencl/lib/generic/math/half_sin.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_sin diff --git a/libclc/opencl/lib/generic/math/half_sqrt.cl b/libclc/opencl/lib/generic/math/half_sqrt.cl index 4939d6bd199dc..562663644b137 100644 --- a/libclc/opencl/lib/generic/math/half_sqrt.cl +++ b/libclc/opencl/lib/generic/math/half_sqrt.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_sqrt diff --git a/libclc/opencl/lib/generic/math/half_tan.cl b/libclc/opencl/lib/generic/math/half_tan.cl index 2b77b3ae0c623..1ff24376b207b 100644 --- a/libclc/opencl/lib/generic/math/half_tan.cl +++ b/libclc/opencl/lib/generic/math/half_tan.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION half_tan diff --git a/libclc/opencl/lib/generic/math/hypot.cl b/libclc/opencl/lib/generic/math/hypot.cl index 41aff69069879..b81aed941ab40 100644 --- a/libclc/opencl/lib/generic/math/hypot.cl +++ b/libclc/opencl/lib/generic/math/hypot.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION hypot #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/ilogb.cl b/libclc/opencl/lib/generic/math/ilogb.cl index 027d587a4d46d..f3060d3964bda 100644 --- a/libclc/opencl/lib/generic/math/ilogb.cl +++ b/libclc/opencl/lib/generic/math/ilogb.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION ilogb #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/ldexp.cl b/libclc/opencl/lib/generic/math/ldexp.cl index 3cdb9e1a760a1..f8ef83f3de212 100644 --- a/libclc/opencl/lib/generic/math/ldexp.cl +++ b/libclc/opencl/lib/generic/math/ldexp.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION ldexp #define __CLC_IMPL_FUNCTION(x) __clc_ldexp diff --git a/libclc/opencl/lib/generic/math/lgamma.cl b/libclc/opencl/lib/generic/math/lgamma.cl index da8ceac986e43..a07de8ad4b37c 100644 --- a/libclc/opencl/lib/generic/math/lgamma.cl +++ b/libclc/opencl/lib/generic/math/lgamma.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION lgamma #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/lgamma_r.cl b/libclc/opencl/lib/generic/math/lgamma_r.cl index bb2d9bd283df6..8cde1844a56fa 100644 --- a/libclc/opencl/lib/generic/math/lgamma_r.cl +++ b/libclc/opencl/lib/generic/math/lgamma_r.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION lgamma_r #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/log.cl b/libclc/opencl/lib/generic/math/log.cl index 4862b81f15129..4e2890ad882ad 100644 --- a/libclc/opencl/lib/generic/math/log.cl +++ b/libclc/opencl/lib/generic/math/log.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION log #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/log10.cl b/libclc/opencl/lib/generic/math/log10.cl index 6702b4485b51f..d8c913570260c 100644 --- a/libclc/opencl/lib/generic/math/log10.cl +++ b/libclc/opencl/lib/generic/math/log10.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION log10 #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/log1p.cl b/libclc/opencl/lib/generic/math/log1p.cl index c1a8711e11858..8dbb5b26b3d3d 100644 --- a/libclc/opencl/lib/generic/math/log1p.cl +++ b/libclc/opencl/lib/generic/math/log1p.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION log1p #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/log2.cl b/libclc/opencl/lib/generic/math/log2.cl index d072b313f8388..3fbe354827626 100644 --- a/libclc/opencl/lib/generic/math/log2.cl +++ b/libclc/opencl/lib/generic/math/log2.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION log2 #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/logb.cl b/libclc/opencl/lib/generic/math/logb.cl index 09d43fac3ad2a..63a60ae014f01 100644 --- a/libclc/opencl/lib/generic/math/logb.cl +++ b/libclc/opencl/lib/generic/math/logb.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION logb #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/mad.cl b/libclc/opencl/lib/generic/math/mad.cl index 05bd228251c18..5cc52b39eb684 100644 --- a/libclc/opencl/lib/generic/math/mad.cl +++ b/libclc/opencl/lib/generic/math/mad.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION mad #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/maxmag.cl b/libclc/opencl/lib/generic/math/maxmag.cl index 30e7bb21302d7..4a2e865a35530 100644 --- a/libclc/opencl/lib/generic/math/maxmag.cl +++ b/libclc/opencl/lib/generic/math/maxmag.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION maxmag #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/minmag.cl b/libclc/opencl/lib/generic/math/minmag.cl index 3732dbfe7af45..86f2b08e5b095 100644 --- a/libclc/opencl/lib/generic/math/minmag.cl +++ b/libclc/opencl/lib/generic/math/minmag.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION minmag #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/modf.cl b/libclc/opencl/lib/generic/math/modf.cl index 306070bf89238..fe524ba305e9e 100644 --- a/libclc/opencl/lib/generic/math/modf.cl +++ b/libclc/opencl/lib/generic/math/modf.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION modf #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/native_cos.cl b/libclc/opencl/lib/generic/math/native_cos.cl index 8508df37a9b62..d2b9cf859696b 100644 --- a/libclc/opencl/lib/generic/math/native_cos.cl +++ b/libclc/opencl/lib/generic/math/native_cos.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_cos diff --git a/libclc/opencl/lib/generic/math/native_divide.cl b/libclc/opencl/lib/generic/math/native_divide.cl index ea28bf6e195cc..a1b8d5d2510cf 100644 --- a/libclc/opencl/lib/generic/math/native_divide.cl +++ b/libclc/opencl/lib/generic/math/native_divide.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_divide diff --git a/libclc/opencl/lib/generic/math/native_exp.cl b/libclc/opencl/lib/generic/math/native_exp.cl index aedb0953c5349..19da3c269b28a 100644 --- a/libclc/opencl/lib/generic/math/native_exp.cl +++ b/libclc/opencl/lib/generic/math/native_exp.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_exp diff --git a/libclc/opencl/lib/generic/math/native_exp10.cl b/libclc/opencl/lib/generic/math/native_exp10.cl index eb184647639f9..58f8005463cf8 100644 --- a/libclc/opencl/lib/generic/math/native_exp10.cl +++ b/libclc/opencl/lib/generic/math/native_exp10.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_exp10 diff --git a/libclc/opencl/lib/generic/math/native_exp2.cl b/libclc/opencl/lib/generic/math/native_exp2.cl index 52e814f5ee53c..8bed47dd18ee2 100644 --- a/libclc/opencl/lib/generic/math/native_exp2.cl +++ b/libclc/opencl/lib/generic/math/native_exp2.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_exp2 diff --git a/libclc/opencl/lib/generic/math/native_log.cl b/libclc/opencl/lib/generic/math/native_log.cl index d1d4ae2f15f18..0323f6668ba04 100644 --- a/libclc/opencl/lib/generic/math/native_log.cl +++ b/libclc/opencl/lib/generic/math/native_log.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_log diff --git a/libclc/opencl/lib/generic/math/native_log10.cl b/libclc/opencl/lib/generic/math/native_log10.cl index 680b9cb341bf2..915fa8a2d4ede 100644 --- a/libclc/opencl/lib/generic/math/native_log10.cl +++ b/libclc/opencl/lib/generic/math/native_log10.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_log10 diff --git a/libclc/opencl/lib/generic/math/native_log2.cl b/libclc/opencl/lib/generic/math/native_log2.cl index 3a104357afa8c..b5d8ff586761b 100644 --- a/libclc/opencl/lib/generic/math/native_log2.cl +++ b/libclc/opencl/lib/generic/math/native_log2.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_log2 diff --git a/libclc/opencl/lib/generic/math/native_powr.cl b/libclc/opencl/lib/generic/math/native_powr.cl index f325d53321b1d..d1b2c5b93175f 100644 --- a/libclc/opencl/lib/generic/math/native_powr.cl +++ b/libclc/opencl/lib/generic/math/native_powr.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_powr diff --git a/libclc/opencl/lib/generic/math/native_recip.cl b/libclc/opencl/lib/generic/math/native_recip.cl index 20d81ed9f1b79..05df5e10cdbd7 100644 --- a/libclc/opencl/lib/generic/math/native_recip.cl +++ b/libclc/opencl/lib/generic/math/native_recip.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_recip diff --git a/libclc/opencl/lib/generic/math/native_rsqrt.cl b/libclc/opencl/lib/generic/math/native_rsqrt.cl index 8f308e74f334c..3c8c72098db00 100644 --- a/libclc/opencl/lib/generic/math/native_rsqrt.cl +++ b/libclc/opencl/lib/generic/math/native_rsqrt.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_rsqrt diff --git a/libclc/opencl/lib/generic/math/native_sin.cl b/libclc/opencl/lib/generic/math/native_sin.cl index ea7167822a818..4501e2f0fd8b1 100644 --- a/libclc/opencl/lib/generic/math/native_sin.cl +++ b/libclc/opencl/lib/generic/math/native_sin.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_sin diff --git a/libclc/opencl/lib/generic/math/native_sqrt.cl b/libclc/opencl/lib/generic/math/native_sqrt.cl index fa38bdb3301d4..a7eb715f0ef51 100644 --- a/libclc/opencl/lib/generic/math/native_sqrt.cl +++ b/libclc/opencl/lib/generic/math/native_sqrt.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_sqrt diff --git a/libclc/opencl/lib/generic/math/native_tan.cl b/libclc/opencl/lib/generic/math/native_tan.cl index 8cebf93bae91c..0ee7e827338ae 100644 --- a/libclc/opencl/lib/generic/math/native_tan.cl +++ b/libclc/opencl/lib/generic/math/native_tan.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION native_tan diff --git a/libclc/opencl/lib/generic/math/nextafter.cl b/libclc/opencl/lib/generic/math/nextafter.cl index 256f06bf58550..6862432a81c7d 100644 --- a/libclc/opencl/lib/generic/math/nextafter.cl +++ b/libclc/opencl/lib/generic/math/nextafter.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION nextafter #define __CLC_IMPL_FUNCTION(x) __clc_nextafter diff --git a/libclc/opencl/lib/generic/math/pow.cl b/libclc/opencl/lib/generic/math/pow.cl index bf43519265731..2fd3a50733ed5 100644 --- a/libclc/opencl/lib/generic/math/pow.cl +++ b/libclc/opencl/lib/generic/math/pow.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION pow #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/pown.cl b/libclc/opencl/lib/generic/math/pown.cl index 8c03be6bee168..e48bc10a636ab 100644 --- a/libclc/opencl/lib/generic/math/pown.cl +++ b/libclc/opencl/lib/generic/math/pown.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION pown #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/powr.cl b/libclc/opencl/lib/generic/math/powr.cl index 680f9be894abb..168e30aa57b08 100644 --- a/libclc/opencl/lib/generic/math/powr.cl +++ b/libclc/opencl/lib/generic/math/powr.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION powr #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/remainder.cl b/libclc/opencl/lib/generic/math/remainder.cl index 42b37f847f6d1..cc5a4988b7c94 100644 --- a/libclc/opencl/lib/generic/math/remainder.cl +++ b/libclc/opencl/lib/generic/math/remainder.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION remainder #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/remquo.cl b/libclc/opencl/lib/generic/math/remquo.cl index de102af58fe9f..2bd359ca547f5 100644 --- a/libclc/opencl/lib/generic/math/remquo.cl +++ b/libclc/opencl/lib/generic/math/remquo.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_BODY #include diff --git a/libclc/opencl/lib/generic/math/rint.cl b/libclc/opencl/lib/generic/math/rint.cl index 8beaa7ae064c5..1791123f637bc 100644 --- a/libclc/opencl/lib/generic/math/rint.cl +++ b/libclc/opencl/lib/generic/math/rint.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION rint #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/rootn.cl b/libclc/opencl/lib/generic/math/rootn.cl index 8f25ee1d31b47..8c9c7f4cc72f5 100644 --- a/libclc/opencl/lib/generic/math/rootn.cl +++ b/libclc/opencl/lib/generic/math/rootn.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION rootn #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/round.cl b/libclc/opencl/lib/generic/math/round.cl index 79b04752e9dec..8af24a8ba0b1b 100644 --- a/libclc/opencl/lib/generic/math/round.cl +++ b/libclc/opencl/lib/generic/math/round.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION round #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/rsqrt.cl b/libclc/opencl/lib/generic/math/rsqrt.cl index f7137f5a007d3..269462f85d951 100644 --- a/libclc/opencl/lib/generic/math/rsqrt.cl +++ b/libclc/opencl/lib/generic/math/rsqrt.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION rsqrt #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/sin.cl b/libclc/opencl/lib/generic/math/sin.cl index e198198bcbe86..7ffdc3329749e 100644 --- a/libclc/opencl/lib/generic/math/sin.cl +++ b/libclc/opencl/lib/generic/math/sin.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION sin #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/sincos.cl b/libclc/opencl/lib/generic/math/sincos.cl index 845e966966c51..aa1fc0cf4d806 100644 --- a/libclc/opencl/lib/generic/math/sincos.cl +++ b/libclc/opencl/lib/generic/math/sincos.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION sincos #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/sinh.cl b/libclc/opencl/lib/generic/math/sinh.cl index 6d5f1b1c269c1..e1f4d115d4d0d 100644 --- a/libclc/opencl/lib/generic/math/sinh.cl +++ b/libclc/opencl/lib/generic/math/sinh.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION sinh #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/sinpi.cl b/libclc/opencl/lib/generic/math/sinpi.cl index 33b04532e7763..2c0024b908ea4 100644 --- a/libclc/opencl/lib/generic/math/sinpi.cl +++ b/libclc/opencl/lib/generic/math/sinpi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION sinpi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/sqrt.cl b/libclc/opencl/lib/generic/math/sqrt.cl index 9984ddb9d5a41..4c5a76d14a5de 100644 --- a/libclc/opencl/lib/generic/math/sqrt.cl +++ b/libclc/opencl/lib/generic/math/sqrt.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION sqrt #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/tan.cl b/libclc/opencl/lib/generic/math/tan.cl index 89a5251111675..7b9e504d7f25d 100644 --- a/libclc/opencl/lib/generic/math/tan.cl +++ b/libclc/opencl/lib/generic/math/tan.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION tan #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/tanh.cl b/libclc/opencl/lib/generic/math/tanh.cl index 92307eafdd05f..539085a3f243d 100644 --- a/libclc/opencl/lib/generic/math/tanh.cl +++ b/libclc/opencl/lib/generic/math/tanh.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION tanh #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/tanpi.cl b/libclc/opencl/lib/generic/math/tanpi.cl index 47e943ba77416..4ebde1d1652e2 100644 --- a/libclc/opencl/lib/generic/math/tanpi.cl +++ b/libclc/opencl/lib/generic/math/tanpi.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION tanpi #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/tgamma.cl b/libclc/opencl/lib/generic/math/tgamma.cl index 2749cf3dfc0f4..1e11b5f5ed64f 100644 --- a/libclc/opencl/lib/generic/math/tgamma.cl +++ b/libclc/opencl/lib/generic/math/tgamma.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION tgamma #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/math/trunc.cl b/libclc/opencl/lib/generic/math/trunc.cl index b276996995344..724b646afa153 100644 --- a/libclc/opencl/lib/generic/math/trunc.cl +++ b/libclc/opencl/lib/generic/math/trunc.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION trunc #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/misc/shuffle.cl b/libclc/opencl/lib/generic/misc/shuffle.cl index f9187be453e65..7c47fb8ea9cfc 100644 --- a/libclc/opencl/lib/generic/misc/shuffle.cl +++ b/libclc/opencl/lib/generic/misc/shuffle.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION shuffle diff --git a/libclc/opencl/lib/generic/misc/shuffle2.cl b/libclc/opencl/lib/generic/misc/shuffle2.cl index 0008340b622df..3fb3dbc2a5805 100644 --- a/libclc/opencl/lib/generic/misc/shuffle2.cl +++ b/libclc/opencl/lib/generic/misc/shuffle2.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FUNCTION shuffle2 diff --git a/libclc/opencl/lib/generic/relational/all.cl b/libclc/opencl/lib/generic/relational/all.cl index f72da2cb622c9..c896b811964f6 100644 --- a/libclc/opencl/lib/generic/relational/all.cl +++ b/libclc/opencl/lib/generic/relational/all.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_ALL_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int all(TYPE v) diff --git a/libclc/opencl/lib/generic/relational/any.cl b/libclc/opencl/lib/generic/relational/any.cl index b2b48dbf1ab04..e6fb84dd182f0 100644 --- a/libclc/opencl/lib/generic/relational/any.cl +++ b/libclc/opencl/lib/generic/relational/any.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_ANY_ID(TYPE) _CLC_OVERLOAD _CLC_DEF int any(TYPE v) diff --git a/libclc/opencl/lib/generic/relational/bitselect.cl b/libclc/opencl/lib/generic/relational/bitselect.cl index 0be7e5321caf0..b4b4707d28cdf 100644 --- a/libclc/opencl/lib/generic/relational/bitselect.cl +++ b/libclc/opencl/lib/generic/relational/bitselect.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/relational/isequal.cl b/libclc/opencl/lib/generic/relational/isequal.cl index 40718dbca9d05..6bbf7d4d664aa 100644 --- a/libclc/opencl/lib/generic/relational/isequal.cl +++ b/libclc/opencl/lib/generic/relational/isequal.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isequal diff --git a/libclc/opencl/lib/generic/relational/isfinite.cl b/libclc/opencl/lib/generic/relational/isfinite.cl index f055e295416c9..67c59ea42c426 100644 --- a/libclc/opencl/lib/generic/relational/isfinite.cl +++ b/libclc/opencl/lib/generic/relational/isfinite.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isfinite diff --git a/libclc/opencl/lib/generic/relational/isgreater.cl b/libclc/opencl/lib/generic/relational/isgreater.cl index ae73769267dc8..ca4c068855a46 100644 --- a/libclc/opencl/lib/generic/relational/isgreater.cl +++ b/libclc/opencl/lib/generic/relational/isgreater.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isgreater diff --git a/libclc/opencl/lib/generic/relational/isgreaterequal.cl b/libclc/opencl/lib/generic/relational/isgreaterequal.cl index 725c3289bb05f..e97b6f6119ae6 100644 --- a/libclc/opencl/lib/generic/relational/isgreaterequal.cl +++ b/libclc/opencl/lib/generic/relational/isgreaterequal.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isgreaterequal diff --git a/libclc/opencl/lib/generic/relational/isinf.cl b/libclc/opencl/lib/generic/relational/isinf.cl index 9558b0f9eb5ee..2f5571b8b0124 100644 --- a/libclc/opencl/lib/generic/relational/isinf.cl +++ b/libclc/opencl/lib/generic/relational/isinf.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isinf diff --git a/libclc/opencl/lib/generic/relational/isless.cl b/libclc/opencl/lib/generic/relational/isless.cl index 6ed0857d354a3..3673c050c9157 100644 --- a/libclc/opencl/lib/generic/relational/isless.cl +++ b/libclc/opencl/lib/generic/relational/isless.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isless diff --git a/libclc/opencl/lib/generic/relational/islessequal.cl b/libclc/opencl/lib/generic/relational/islessequal.cl index c4697ca56f982..c7e840cbe44cd 100644 --- a/libclc/opencl/lib/generic/relational/islessequal.cl +++ b/libclc/opencl/lib/generic/relational/islessequal.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION islessequal diff --git a/libclc/opencl/lib/generic/relational/islessgreater.cl b/libclc/opencl/lib/generic/relational/islessgreater.cl index eb4cdc24c0679..057c35c7c7ff3 100644 --- a/libclc/opencl/lib/generic/relational/islessgreater.cl +++ b/libclc/opencl/lib/generic/relational/islessgreater.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION islessgreater diff --git a/libclc/opencl/lib/generic/relational/isnan.cl b/libclc/opencl/lib/generic/relational/isnan.cl index 4bae2ae077c13..248cc17af5159 100644 --- a/libclc/opencl/lib/generic/relational/isnan.cl +++ b/libclc/opencl/lib/generic/relational/isnan.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isnan diff --git a/libclc/opencl/lib/generic/relational/isnormal.cl b/libclc/opencl/lib/generic/relational/isnormal.cl index d4ea20a27cdb6..6d046c375b2a3 100644 --- a/libclc/opencl/lib/generic/relational/isnormal.cl +++ b/libclc/opencl/lib/generic/relational/isnormal.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isnormal diff --git a/libclc/opencl/lib/generic/relational/isnotequal.cl b/libclc/opencl/lib/generic/relational/isnotequal.cl index e24d57564cb8c..5bf6907587672 100644 --- a/libclc/opencl/lib/generic/relational/isnotequal.cl +++ b/libclc/opencl/lib/generic/relational/isnotequal.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isnotequal diff --git a/libclc/opencl/lib/generic/relational/isordered.cl b/libclc/opencl/lib/generic/relational/isordered.cl index 773cf1947e68e..0ce72493638c3 100644 --- a/libclc/opencl/lib/generic/relational/isordered.cl +++ b/libclc/opencl/lib/generic/relational/isordered.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isordered diff --git a/libclc/opencl/lib/generic/relational/isunordered.cl b/libclc/opencl/lib/generic/relational/isunordered.cl index 44427ea5e6046..6bea618618591 100644 --- a/libclc/opencl/lib/generic/relational/isunordered.cl +++ b/libclc/opencl/lib/generic/relational/isunordered.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION isunordered diff --git a/libclc/opencl/lib/generic/relational/select.cl b/libclc/opencl/lib/generic/relational/select.cl index 47a7b8e5ad114..4b3ea01d5303f 100644 --- a/libclc/opencl/lib/generic/relational/select.cl +++ b/libclc/opencl/lib/generic/relational/select.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #include diff --git a/libclc/opencl/lib/generic/relational/signbit.cl b/libclc/opencl/lib/generic/relational/signbit.cl index b1f3ac89933f7..50c4b2ab2bf4a 100644 --- a/libclc/opencl/lib/generic/relational/signbit.cl +++ b/libclc/opencl/lib/generic/relational/signbit.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_FUNCTION signbit diff --git a/libclc/opencl/lib/generic/shared/clamp.cl b/libclc/opencl/lib/generic/shared/clamp.cl index 6e2bedc0704ff..8f740dab47e04 100644 --- a/libclc/opencl/lib/generic/shared/clamp.cl +++ b/libclc/opencl/lib/generic/shared/clamp.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/shared/max.cl b/libclc/opencl/lib/generic/shared/max.cl index 5cb5ff124bd01..a0018c4b11fdc 100644 --- a/libclc/opencl/lib/generic/shared/max.cl +++ b/libclc/opencl/lib/generic/shared/max.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/shared/min.cl b/libclc/opencl/lib/generic/shared/min.cl index 2a1ded3aa0288..f0ddca2a133b7 100644 --- a/libclc/opencl/lib/generic/shared/min.cl +++ b/libclc/opencl/lib/generic/shared/min.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_BODY diff --git a/libclc/opencl/lib/generic/shared/vload.cl b/libclc/opencl/lib/generic/shared/vload.cl index 6f1ca06ccb8be..d31697378a2e5 100644 --- a/libclc/opencl/lib/generic/shared/vload.cl +++ b/libclc/opencl/lib/generic/shared/vload.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_BODY "vload.inc" diff --git a/libclc/opencl/lib/generic/shared/vstore.cl b/libclc/opencl/lib/generic/shared/vstore.cl index 1d62de810ff75..915cd8754964e 100644 --- a/libclc/opencl/lib/generic/shared/vstore.cl +++ b/libclc/opencl/lib/generic/shared/vstore.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #define __CLC_BODY "vstore.inc" diff --git a/libclc/opencl/lib/generic/workitem/get_global_id.cl b/libclc/opencl/lib/generic/workitem/get_global_id.cl index 5e417bef0d2bd..f56981975acd3 100644 --- a/libclc/opencl/lib/generic/workitem/get_global_id.cl +++ b/libclc/opencl/lib/generic/workitem/get_global_id.cl @@ -6,11 +6,7 @@ // //===----------------------------------------------------------------------===// -#include -#include -#include -#include -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_global_id(uint dim) { return get_group_id(dim) * get_local_size(dim) + get_local_id(dim) + diff --git a/libclc/opencl/lib/generic/workitem/get_global_size.cl b/libclc/opencl/lib/generic/workitem/get_global_size.cl index d62e9e91888ac..34d00f8fa809b 100644 --- a/libclc/opencl/lib/generic/workitem/get_global_size.cl +++ b/libclc/opencl/lib/generic/workitem/get_global_size.cl @@ -6,9 +6,7 @@ // //===----------------------------------------------------------------------===// -#include -#include -#include +#include _CLC_DEF _CLC_OVERLOAD size_t get_global_size(uint dim) { return get_num_groups(dim) * get_local_size(dim); diff --git a/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl b/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl index 19721574e4053..c799cf2ad7dde 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/mem_fence/fence.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #include _CLC_DEF _CLC_OVERLOAD void mem_fence(cl_mem_fence_flags flags) { diff --git a/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl b/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl index dd7d1507f5ad4..9f67b6ebcb6db 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/synchronization/barrier.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include #include diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl index f09fa92dbe702..c84991ade76fc 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_global_id.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF size_t get_global_id(uint dim) { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl index 1bcd756bdd16e..6fc9832058736 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_group_id.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF size_t get_group_id(uint dim) { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl index f355b757b83b8..a2b608baf7aeb 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_id.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF size_t get_local_id(uint dim) { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_linear_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_linear_id.cl index 8c7637b4fe31e..ccb301960726a 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_linear_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_linear_id.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF size_t get_local_linear_id() { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl index b146c1ea1946d..61a6d8ef88f96 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_local_size.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF size_t get_local_size(uint dim) { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_max_sub_group_size.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_max_sub_group_size.cl index fd76f7c5d0aa5..aa06c9561404b 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_max_sub_group_size.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_max_sub_group_size.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF uint get_max_sub_group_size() { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl index 87e285d50205a..6beadd3ca8982 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_groups.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF size_t get_num_groups(uint dim) { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_sub_groups.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_sub_groups.cl index 1be77a325c0f3..e23d78dafa5e8 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_sub_groups.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_num_sub_groups.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF uint get_num_sub_groups() { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_id.cl index e538b86f12515..deb6134cd0704 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_id.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF uint get_sub_group_id() { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_local_id.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_local_id.cl index 2a8cfd57d85b2..37487fbf3ece8 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_local_id.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_local_id.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF uint get_sub_group_local_id() { diff --git a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_size.cl b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_size.cl index f32d820d6418f..e6be6f75171d1 100644 --- a/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_size.cl +++ b/libclc/opencl/lib/ptx-nvidiacl/workitem/get_sub_group_size.cl @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -#include #include _CLC_OVERLOAD _CLC_DEF uint get_sub_group_size() { diff --git a/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl b/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl index f28b7d458ca4f..7fed814d3ef15 100644 --- a/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl +++ b/libclc/opencl/lib/r600/image/get_image_channel_data_type.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_channel_data_type_2d(image2d_t); _CLC_DECL int __clc_get_image_channel_data_type_3d(image3d_t); diff --git a/libclc/opencl/lib/r600/image/get_image_channel_order.cl b/libclc/opencl/lib/r600/image/get_image_channel_order.cl index da6d783e7f01a..1ad4dedb39be4 100644 --- a/libclc/opencl/lib/r600/image/get_image_channel_order.cl +++ b/libclc/opencl/lib/r600/image/get_image_channel_order.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_channel_order_2d(image2d_t); _CLC_DECL int __clc_get_image_channel_order_3d(image3d_t); diff --git a/libclc/opencl/lib/r600/image/get_image_depth.cl b/libclc/opencl/lib/r600/image/get_image_depth.cl index 1731d85dc4c3d..b7bb8c8b841eb 100644 --- a/libclc/opencl/lib/r600/image/get_image_depth.cl +++ b/libclc/opencl/lib/r600/image/get_image_depth.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_depth_3d(image3d_t); diff --git a/libclc/opencl/lib/r600/image/get_image_dim.cl b/libclc/opencl/lib/r600/image/get_image_dim.cl index 6929d12ad1a5a..91986156c1735 100644 --- a/libclc/opencl/lib/r600/image/get_image_dim.cl +++ b/libclc/opencl/lib/r600/image/get_image_dim.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_OVERLOAD _CLC_DEF int2 get_image_dim(image2d_t image) { return (int2)(get_image_width(image), get_image_height(image)); diff --git a/libclc/opencl/lib/r600/image/get_image_height.cl b/libclc/opencl/lib/r600/image/get_image_height.cl index 14a21823a826d..cfdfa8972d31d 100644 --- a/libclc/opencl/lib/r600/image/get_image_height.cl +++ b/libclc/opencl/lib/r600/image/get_image_height.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_height_2d(image2d_t); _CLC_DECL int __clc_get_image_height_3d(image3d_t); diff --git a/libclc/opencl/lib/r600/image/get_image_width.cl b/libclc/opencl/lib/r600/image/get_image_width.cl index fa54ec3628f2d..eb7bd73ea2f56 100644 --- a/libclc/opencl/lib/r600/image/get_image_width.cl +++ b/libclc/opencl/lib/r600/image/get_image_width.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL int __clc_get_image_width_2d(image2d_t); _CLC_DECL int __clc_get_image_width_3d(image3d_t); diff --git a/libclc/opencl/lib/r600/image/read_imagef.cl b/libclc/opencl/lib/r600/image/read_imagef.cl index fc597b762e52e..263972f7c22fc 100644 --- a/libclc/opencl/lib/r600/image/read_imagef.cl +++ b/libclc/opencl/lib/r600/image/read_imagef.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2); diff --git a/libclc/opencl/lib/r600/image/read_imagei.cl b/libclc/opencl/lib/r600/image/read_imagei.cl index bc54a631eabb5..24ec6b1a6661a 100644 --- a/libclc/opencl/lib/r600/image/read_imagei.cl +++ b/libclc/opencl/lib/r600/image/read_imagei.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2); diff --git a/libclc/opencl/lib/r600/image/read_imageui.cl b/libclc/opencl/lib/r600/image/read_imageui.cl index 8c266b9f2f854..30bbe766d671c 100644 --- a/libclc/opencl/lib/r600/image/read_imageui.cl +++ b/libclc/opencl/lib/r600/image/read_imageui.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL float4 __clc_read_imagef_tex(image2d_t, sampler_t, float2); diff --git a/libclc/opencl/lib/r600/image/write_imagef.cl b/libclc/opencl/lib/r600/image/write_imagef.cl index 0e828acad0823..85d9a0bce86d9 100644 --- a/libclc/opencl/lib/r600/image/write_imagef.cl +++ b/libclc/opencl/lib/r600/image/write_imagef.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL void __clc_write_imagef_2d(image2d_t image, int2 coord, float4 color); diff --git a/libclc/opencl/lib/r600/image/write_imagei.cl b/libclc/opencl/lib/r600/image/write_imagei.cl index 88ea35634abcd..73bfb94644a7e 100644 --- a/libclc/opencl/lib/r600/image/write_imagei.cl +++ b/libclc/opencl/lib/r600/image/write_imagei.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL void __clc_write_imagei_2d(image2d_t image, int2 coord, int4 color); diff --git a/libclc/opencl/lib/r600/image/write_imageui.cl b/libclc/opencl/lib/r600/image/write_imageui.cl index 40f3f33345836..c2f477d39b039 100644 --- a/libclc/opencl/lib/r600/image/write_imageui.cl +++ b/libclc/opencl/lib/r600/image/write_imageui.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DECL void __clc_write_imageui_2d(image2d_t image, int2 coord, uint4 color); diff --git a/libclc/opencl/lib/r600/synchronization/barrier.cl b/libclc/opencl/lib/r600/synchronization/barrier.cl index 69e87d9497fde..a6a7dcfc6be2e 100644 --- a/libclc/opencl/lib/r600/synchronization/barrier.cl +++ b/libclc/opencl/lib/r600/synchronization/barrier.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF void __clc_r600_barrier(void) __asm("llvm.r600.group.barrier"); diff --git a/libclc/opencl/lib/r600/workitem/get_global_offset.cl b/libclc/opencl/lib/r600/workitem/get_global_offset.cl index 988e482de2391..477e8f405ec07 100644 --- a/libclc/opencl/lib/r600/workitem/get_global_offset.cl +++ b/libclc/opencl/lib/r600/workitem/get_global_offset.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD uint get_global_offset(uint dim) { __attribute__((address_space(7))) uint *ptr = diff --git a/libclc/opencl/lib/r600/workitem/get_global_size.cl b/libclc/opencl/lib/r600/workitem/get_global_size.cl index 298487f87dc1e..3ea3881d2f3c6 100644 --- a/libclc/opencl/lib/r600/workitem/get_global_size.cl +++ b/libclc/opencl/lib/r600/workitem/get_global_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_r600_get_global_size_x(void) __asm("llvm.r600.read.global.size.x"); uint __clc_r600_get_global_size_y(void) __asm("llvm.r600.read.global.size.y"); diff --git a/libclc/opencl/lib/r600/workitem/get_group_id.cl b/libclc/opencl/lib/r600/workitem/get_group_id.cl index 196f0f21241e8..bf426cc2bb4dd 100644 --- a/libclc/opencl/lib/r600/workitem/get_group_id.cl +++ b/libclc/opencl/lib/r600/workitem/get_group_id.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD uint get_group_id(uint dim) { switch (dim) { diff --git a/libclc/opencl/lib/r600/workitem/get_local_id.cl b/libclc/opencl/lib/r600/workitem/get_local_id.cl index 1321e1e8362e2..4915e07e7f181 100644 --- a/libclc/opencl/lib/r600/workitem/get_local_id.cl +++ b/libclc/opencl/lib/r600/workitem/get_local_id.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD uint get_local_id(uint dim) { switch (dim) { diff --git a/libclc/opencl/lib/r600/workitem/get_local_size.cl b/libclc/opencl/lib/r600/workitem/get_local_size.cl index c0e4e15542769..877d9c359342c 100644 --- a/libclc/opencl/lib/r600/workitem/get_local_size.cl +++ b/libclc/opencl/lib/r600/workitem/get_local_size.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_r600_get_local_size_x(void) __asm("llvm.r600.read.local.size.x"); uint __clc_r600_get_local_size_y(void) __asm("llvm.r600.read.local.size.y"); diff --git a/libclc/opencl/lib/r600/workitem/get_num_groups.cl b/libclc/opencl/lib/r600/workitem/get_num_groups.cl index 098a9cb86a6dc..d04a69f9e0aa4 100644 --- a/libclc/opencl/lib/r600/workitem/get_num_groups.cl +++ b/libclc/opencl/lib/r600/workitem/get_num_groups.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include uint __clc_r600_get_num_groups_x(void) __asm("llvm.r600.read.ngroups.x"); uint __clc_r600_get_num_groups_y(void) __asm("llvm.r600.read.ngroups.y"); diff --git a/libclc/opencl/lib/r600/workitem/get_work_dim.cl b/libclc/opencl/lib/r600/workitem/get_work_dim.cl index a7917b864e407..1b743ae925a37 100644 --- a/libclc/opencl/lib/r600/workitem/get_work_dim.cl +++ b/libclc/opencl/lib/r600/workitem/get_work_dim.cl @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include +#include _CLC_DEF _CLC_OVERLOAD uint get_work_dim(void) { __attribute__((address_space(7))) uint *ptr = diff --git a/libclc/opencl/lib/spirv/math/fma.cl b/libclc/opencl/lib/spirv/math/fma.cl index 0e328903ba263..172ec32b8a3b3 100644 --- a/libclc/opencl/lib/spirv/math/fma.cl +++ b/libclc/opencl/lib/spirv/math/fma.cl @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include -#include #define __CLC_FLOAT_ONLY #define __CLC_FUNCTION fma From 898963b029619ee399393e49b547f3e80386d746 Mon Sep 17 00:00:00 2001 From: Zhaoxuan Jiang Date: Tue, 9 Dec 2025 11:29:02 +0800 Subject: [PATCH 04/11] [AArch64] Fix missing register definitions in homogeneous epilog lowering (#171118) The lowering for HOM_Epilog did not transfer explicit register defs from the pseudo-instruction to the generated helper calls. MachineVerifier would complain if a following tail call uses one of the restored CSRs. This scenario occurs in code generated by the Swift compiler, where X20 is used to pass swiftself. This patch fixes the issue by adding the missing defs back to the helper call as implicit defs. --- .../AArch64LowerHomogeneousPrologEpilog.cpp | 27 +++++++++++------- ...64-homogeneous-prolog-epilog-tail-call.mir | 28 +++++++++++++++++++ 2 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir diff --git a/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp b/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp index 03dd1cd702d17..d69f12e7c0a7c 100644 --- a/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp +++ b/llvm/lib/Target/AArch64/AArch64LowerHomogeneousPrologEpilog.cpp @@ -483,16 +483,17 @@ bool AArch64LowerHomogeneousPE::lowerEpilog( assert(MI.getOpcode() == AArch64::HOM_Epilog); auto Return = NextMBBI; + MachineInstr *HelperCall = nullptr; if (shouldUseFrameHelper(MBB, NextMBBI, Regs, FrameHelperType::EpilogTail)) { // When MBB ends with a return, emit a tail-call to the epilog helper auto *EpilogTailHelper = getOrCreateFrameHelper(M, MMI, Regs, FrameHelperType::EpilogTail); - BuildMI(MBB, MBBI, DL, TII->get(AArch64::TCRETURNdi)) - .addGlobalAddress(EpilogTailHelper) - .addImm(0) - .setMIFlag(MachineInstr::FrameDestroy) - .copyImplicitOps(MI) - .copyImplicitOps(*Return); + HelperCall = BuildMI(MBB, MBBI, DL, TII->get(AArch64::TCRETURNdi)) + .addGlobalAddress(EpilogTailHelper) + .addImm(0) + .setMIFlag(MachineInstr::FrameDestroy) + .copyImplicitOps(MI) + .copyImplicitOps(*Return); NextMBBI = std::next(Return); Return->removeFromParent(); } else if (shouldUseFrameHelper(MBB, NextMBBI, Regs, @@ -500,10 +501,10 @@ bool AArch64LowerHomogeneousPE::lowerEpilog( // The default epilog helper case. auto *EpilogHelper = getOrCreateFrameHelper(M, MMI, Regs, FrameHelperType::Epilog); - BuildMI(MBB, MBBI, DL, TII->get(AArch64::BL)) - .addGlobalAddress(EpilogHelper) - .setMIFlag(MachineInstr::FrameDestroy) - .copyImplicitOps(MI); + HelperCall = BuildMI(MBB, MBBI, DL, TII->get(AArch64::BL)) + .addGlobalAddress(EpilogHelper) + .setMIFlag(MachineInstr::FrameDestroy) + .copyImplicitOps(MI); } else { // Fall back to no-helper. for (int I = 0; I < Size - 2; I += 2) @@ -512,6 +513,12 @@ bool AArch64LowerHomogeneousPE::lowerEpilog( emitLoad(MF, MBB, MBBI, *TII, Regs[Size - 2], Regs[Size - 1], Size, true); } + // Make sure all explicit definitions are preserved in the helper call; + // implicit ones are already handled by copyImplicitOps. + if (HelperCall) + for (auto &Def : MBBI->defs()) + HelperCall->addRegisterDefined(Def.getReg(), + MF.getRegInfo().getTargetRegisterInfo()); MBBI->removeFromParent(); return true; } diff --git a/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir b/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir new file mode 100644 index 0000000000000..8a09df4693118 --- /dev/null +++ b/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir @@ -0,0 +1,28 @@ +# RUN: llc -verify-machineinstrs -mtriple=arm64-applie-ios7.0 -start-before=aarch64-lower-homogeneous-prolog-epilog -homogeneous-prolog-epilog %s +# +# This test ensures defined registers are preserved after lowering homogeneous +# epilog into helper calls. Without the fix, the verifier would complain about +# X20 being used by use_x20 without being defined. +--- | + define void @foo() { + entry: + ret void + } + declare void @use_x20() +... +--- +name: foo +alignment: 4 +tracksRegLiveness: true +liveins: + - { reg: '$x0' } + - { reg: '$x20' } +body: | + bb.0: + liveins: $x0, $x20, $lr, $x19, $x20 + frame-setup HOM_Prolog $lr, $fp, $x19, $x20, 16 + $sp = frame-setup SUBXri $sp, 32, 0 + bb.1: + $sp = frame-destroy ADDXri $sp, 32, 0 + $lr, $fp, $x19, $x20 = frame-destroy HOM_Epilog + TCRETURNdi @use_x20, 0, csr_aarch64_aapcs, implicit $sp, implicit $x20 From f2ddc7b0be83b1c9b247f0c3d5dcce189568e5e9 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Mon, 8 Dec 2025 19:31:15 -0800 Subject: [PATCH 05/11] [NFC] Run UTC --check-globals on LowerTypeTests/import.ll (#170755) --- llvm/test/Transforms/LowerTypeTests/import.ll | 290 ++++++++++-------- 1 file changed, 154 insertions(+), 136 deletions(-) diff --git a/llvm/test/Transforms/LowerTypeTests/import.ll b/llvm/test/Transforms/LowerTypeTests/import.ll index 819ede96f997e..e3c2d8a3d3e8c 100644 --- a/llvm/test/Transforms/LowerTypeTests/import.ll +++ b/llvm/test/Transforms/LowerTypeTests/import.ll @@ -1,4 +1,4 @@ -; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --version 3 ; RUN: opt -mtriple=x86_64-unknown-linux -S -passes=lowertypetests -lowertypetests-summary-action=import -lowertypetests-read-summary=%S/Inputs/import.yaml %s | FileCheck --check-prefixes=CHECK,X86 %s ; RUN: opt -mtriple=aarch64-unknown-linux -S -passes=lowertypetests -lowertypetests-summary-action=import -lowertypetests-read-summary=%S/Inputs/import.yaml %s | FileCheck --check-prefixes=CHECK,ARM %s @@ -6,48 +6,59 @@ target datalayout = "e-p:64:64" declare i1 @llvm.type.test(ptr %ptr, metadata %bitset) nounwind readnone -; CHECK-DAG: @__typeid_single_global_addr = external hidden global [0 x i8], code_model "small" -; CHECK-DAG: @__typeid_inline6_global_addr = external hidden global [0 x i8], code_model "small" -; X86-DAG: @__typeid_inline6_align = external hidden global [0 x i8], !absolute_symbol !0 -; X86-DAG: @__typeid_inline6_size_m1 = external hidden global [0 x i8], !absolute_symbol !1 -; X86-DAG: @__typeid_inline6_inline_bits = external hidden global [0 x i8], !absolute_symbol !2 -; CHECK-DAG: @__typeid_inline5_global_addr = external hidden global [0 x i8], code_model "small" -; X86-DAG: @__typeid_inline5_align = external hidden global [0 x i8], !absolute_symbol !0 -; X86-DAG: @__typeid_inline5_size_m1 = external hidden global [0 x i8], !absolute_symbol !3 -; X86-DAG: @__typeid_inline5_inline_bits = external hidden global [0 x i8], !absolute_symbol !4 -; CHECK-DAG: @__typeid_bytearray32_global_addr = external hidden global [0 x i8], code_model "small" -; X86-DAG: @__typeid_bytearray32_align = external hidden global [0 x i8], !absolute_symbol !0 -; X86-DAG: @__typeid_bytearray32_size_m1 = external hidden global [0 x i8], !absolute_symbol !4 -; CHECK-DAG: @__typeid_bytearray32_byte_array = external hidden global [0 x i8] -; X86-DAG: @__typeid_bytearray32_bit_mask = external hidden global [0 x i8], !absolute_symbol !0 -; CHECK-DAG: @__typeid_bytearray7_global_addr = external hidden global [0 x i8], code_model "small" -; X86-DAG: @__typeid_bytearray7_align = external hidden global [0 x i8], !absolute_symbol !0 -; X86-DAG: @__typeid_bytearray7_size_m1 = external hidden global [0 x i8], !absolute_symbol !5 -; CHECK-DAG: @__typeid_bytearray7_byte_array = external hidden global [0 x i8] -; X86-DAG: @__typeid_bytearray7_bit_mask = external hidden global [0 x i8], !absolute_symbol !0 -; CHECK-DAG: @__typeid_allones32_global_addr = external hidden global [0 x i8], code_model "small" -; X86-DAG: @__typeid_allones32_align = external hidden global [0 x i8], !absolute_symbol !0 -; X86-DAG: @__typeid_allones32_size_m1 = external hidden global [0 x i8], !absolute_symbol !4 -; CHECK-DAG: @__typeid_allones7_global_addr = external hidden global [0 x i8], code_model "small" -; X86-DAG: @__typeid_allones7_align = external hidden global [0 x i8], !absolute_symbol !0 -; X86-DAG: @__typeid_allones7_size_m1 = external hidden global [0 x i8], !absolute_symbol !5 - +;. +; X86: @__typeid_single_global_addr = external hidden global [0 x i8], code_model "small" +; X86: @__typeid_inline6_global_addr = external hidden global [0 x i8], code_model "small" +; X86: @__typeid_inline6_align = external hidden global [0 x i8], !absolute_symbol [[META0:![0-9]+]] +; X86: @__typeid_inline6_size_m1 = external hidden global [0 x i8], !absolute_symbol [[META1:![0-9]+]] +; X86: @__typeid_inline6_inline_bits = external hidden global [0 x i8], !absolute_symbol [[META2:![0-9]+]] +; X86: @__typeid_inline5_global_addr = external hidden global [0 x i8], code_model "small" +; X86: @__typeid_inline5_align = external hidden global [0 x i8], !absolute_symbol [[META0]] +; X86: @__typeid_inline5_size_m1 = external hidden global [0 x i8], !absolute_symbol [[META3:![0-9]+]] +; X86: @__typeid_inline5_inline_bits = external hidden global [0 x i8], !absolute_symbol [[META4:![0-9]+]] +; X86: @__typeid_bytearray32_global_addr = external hidden global [0 x i8], code_model "small" +; X86: @__typeid_bytearray32_align = external hidden global [0 x i8], !absolute_symbol [[META0]] +; X86: @__typeid_bytearray32_size_m1 = external hidden global [0 x i8], !absolute_symbol [[META4]] +; X86: @__typeid_bytearray32_byte_array = external hidden global [0 x i8] +; X86: @__typeid_bytearray32_bit_mask = external hidden global [0 x i8], !absolute_symbol [[META0]] +; X86: @__typeid_bytearray7_global_addr = external hidden global [0 x i8], code_model "small" +; X86: @__typeid_bytearray7_align = external hidden global [0 x i8], !absolute_symbol [[META0]] +; X86: @__typeid_bytearray7_size_m1 = external hidden global [0 x i8], !absolute_symbol [[META5:![0-9]+]] +; X86: @__typeid_bytearray7_byte_array = external hidden global [0 x i8] +; X86: @__typeid_bytearray7_bit_mask = external hidden global [0 x i8], !absolute_symbol [[META0]] +; X86: @__typeid_allones32_global_addr = external hidden global [0 x i8], code_model "small" +; X86: @__typeid_allones32_align = external hidden global [0 x i8], !absolute_symbol [[META0]] +; X86: @__typeid_allones32_size_m1 = external hidden global [0 x i8], !absolute_symbol [[META4]] +; X86: @__typeid_allones7_global_addr = external hidden global [0 x i8], code_model "small" +; X86: @__typeid_allones7_align = external hidden global [0 x i8], !absolute_symbol [[META0]] +; X86: @__typeid_allones7_size_m1 = external hidden global [0 x i8], !absolute_symbol [[META5]] +;. +; ARM: @__typeid_single_global_addr = external hidden global [0 x i8], code_model "small" +; ARM: @__typeid_inline6_global_addr = external hidden global [0 x i8], code_model "small" +; ARM: @__typeid_inline5_global_addr = external hidden global [0 x i8], code_model "small" +; ARM: @__typeid_bytearray32_global_addr = external hidden global [0 x i8], code_model "small" +; ARM: @__typeid_bytearray32_byte_array = external hidden global [0 x i8] +; ARM: @__typeid_bytearray7_global_addr = external hidden global [0 x i8], code_model "small" +; ARM: @__typeid_bytearray7_byte_array = external hidden global [0 x i8] +; ARM: @__typeid_allones32_global_addr = external hidden global [0 x i8], code_model "small" +; ARM: @__typeid_allones7_global_addr = external hidden global [0 x i8], code_model "small" +;. define i1 @allones7(ptr %p) { ; X86-LABEL: define i1 @allones7( ; X86-SAME: ptr [[P:%.*]]) { ; X86-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_allones7_global_addr to i64), [[TMP1]] -; X86-NEXT: [[TMP7:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_allones7_align to i64)) -; X86-NEXT: [[TMP8:%.*]] = icmp ule i64 [[TMP7]], ptrtoint (ptr @__typeid_allones7_size_m1 to i64) -; X86-NEXT: ret i1 [[TMP8]] +; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_allones7_align to i64)) +; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_allones7_size_m1 to i64) +; X86-NEXT: ret i1 [[TMP4]] ; ; ARM-LABEL: define i1 @allones7( ; ARM-SAME: ptr [[P:%.*]]) { ; ARM-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_allones7_global_addr to i64), [[TMP1]] -; ARM-NEXT: [[TMP5:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 1) -; ARM-NEXT: [[TMP6:%.*]] = icmp ule i64 [[TMP5]], 42 -; ARM-NEXT: ret i1 [[TMP6]] +; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 1) +; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 42 +; ARM-NEXT: ret i1 [[TMP4]] ; %x = call i1 @llvm.type.test(ptr %p, metadata !"allones7") ret i1 %x @@ -58,17 +69,17 @@ define i1 @allones32(ptr %p) { ; X86-SAME: ptr [[P:%.*]]) { ; X86-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_allones32_global_addr to i64), [[TMP1]] -; X86-NEXT: [[TMP7:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_allones32_align to i64)) -; X86-NEXT: [[TMP8:%.*]] = icmp ule i64 [[TMP7]], ptrtoint (ptr @__typeid_allones32_size_m1 to i64) -; X86-NEXT: ret i1 [[TMP8]] +; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_allones32_align to i64)) +; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_allones32_size_m1 to i64) +; X86-NEXT: ret i1 [[TMP4]] ; ; ARM-LABEL: define i1 @allones32( ; ARM-SAME: ptr [[P:%.*]]) { ; ARM-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_allones32_global_addr to i64), [[TMP1]] -; ARM-NEXT: [[TMP5:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 2) -; ARM-NEXT: [[TMP6:%.*]] = icmp ule i64 [[TMP5]], 12345 -; ARM-NEXT: ret i1 [[TMP6]] +; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 2) +; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 12345 +; ARM-NEXT: ret i1 [[TMP4]] ; %x = call i1 @llvm.type.test(ptr %p, metadata !"allones32") ret i1 %x @@ -79,35 +90,35 @@ define i1 @bytearray7(ptr %p) { ; X86-SAME: ptr [[P:%.*]]) { ; X86-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_bytearray7_global_addr to i64), [[TMP1]] -; X86-NEXT: [[TMP7:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_bytearray7_align to i64)) -; X86-NEXT: [[TMP8:%.*]] = icmp ule i64 [[TMP7]], ptrtoint (ptr @__typeid_bytearray7_size_m1 to i64) -; X86-NEXT: br i1 [[TMP8]], label %[[TMP9:.*]], label %[[TMP14:.*]] -; X86: [[TMP9]]: -; X86-NEXT: [[TMP10:%.*]] = getelementptr i8, ptr @__typeid_bytearray7_byte_array, i64 [[TMP7]] -; X86-NEXT: [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1 -; X86-NEXT: [[TMP12:%.*]] = and i8 [[TMP11]], ptrtoint (ptr @__typeid_bytearray7_bit_mask to i8) -; X86-NEXT: [[TMP13:%.*]] = icmp ne i8 [[TMP12]], 0 -; X86-NEXT: br label %[[TMP14]] -; X86: [[TMP14]]: -; X86-NEXT: [[TMP15:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP13]], %[[TMP9]] ] -; X86-NEXT: ret i1 [[TMP15]] +; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_bytearray7_align to i64)) +; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_bytearray7_size_m1 to i64) +; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; X86: 5: +; X86-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr @__typeid_bytearray7_byte_array, i64 [[TMP3]] +; X86-NEXT: [[TMP7:%.*]] = load i8, ptr [[TMP6]], align 1 +; X86-NEXT: [[TMP8:%.*]] = and i8 [[TMP7]], ptrtoint (ptr @__typeid_bytearray7_bit_mask to i8) +; X86-NEXT: [[TMP9:%.*]] = icmp ne i8 [[TMP8]], 0 +; X86-NEXT: br label [[TMP10]] +; X86: 10: +; X86-NEXT: [[TMP11:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP9]], [[TMP5]] ] +; X86-NEXT: ret i1 [[TMP11]] ; ; ARM-LABEL: define i1 @bytearray7( ; ARM-SAME: ptr [[P:%.*]]) { ; ARM-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_bytearray7_global_addr to i64), [[TMP1]] -; ARM-NEXT: [[TMP5:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 3) -; ARM-NEXT: [[TMP6:%.*]] = icmp ule i64 [[TMP5]], 43 -; ARM-NEXT: br i1 [[TMP6]], label [[TMP7:%.*]], label [[TMP12:%.*]] +; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 3) +; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 43 +; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] ; ARM: 5: -; ARM-NEXT: [[TMP8:%.*]] = getelementptr i8, ptr @__typeid_bytearray7_byte_array, i64 [[TMP5]] -; ARM-NEXT: [[TMP9:%.*]] = load i8, ptr [[TMP8]], align 1 -; ARM-NEXT: [[TMP10:%.*]] = and i8 [[TMP9]], ptrtoint (ptr inttoptr (i64 64 to ptr) to i8) -; ARM-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP10]], 0 -; ARM-NEXT: br label [[TMP12]] +; ARM-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr @__typeid_bytearray7_byte_array, i64 [[TMP3]] +; ARM-NEXT: [[TMP7:%.*]] = load i8, ptr [[TMP6]], align 1 +; ARM-NEXT: [[TMP8:%.*]] = and i8 [[TMP7]], ptrtoint (ptr inttoptr (i64 64 to ptr) to i8) +; ARM-NEXT: [[TMP9:%.*]] = icmp ne i8 [[TMP8]], 0 +; ARM-NEXT: br label [[TMP10]] ; ARM: 10: -; ARM-NEXT: [[TMP13:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP11]], [[TMP7]] ] -; ARM-NEXT: ret i1 [[TMP13]] +; ARM-NEXT: [[TMP11:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP9]], [[TMP5]] ] +; ARM-NEXT: ret i1 [[TMP11]] ; %x = call i1 @llvm.type.test(ptr %p, metadata !"bytearray7") ret i1 %x @@ -118,35 +129,35 @@ define i1 @bytearray32(ptr %p) { ; X86-SAME: ptr [[P:%.*]]) { ; X86-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_bytearray32_global_addr to i64), [[TMP1]] -; X86-NEXT: [[TMP7:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_bytearray32_align to i64)) -; X86-NEXT: [[TMP8:%.*]] = icmp ule i64 [[TMP7]], ptrtoint (ptr @__typeid_bytearray32_size_m1 to i64) -; X86-NEXT: br i1 [[TMP8]], label %[[TMP9:.*]], label %[[TMP14:.*]] -; X86: [[TMP9]]: -; X86-NEXT: [[TMP10:%.*]] = getelementptr i8, ptr @__typeid_bytearray32_byte_array, i64 [[TMP7]] -; X86-NEXT: [[TMP11:%.*]] = load i8, ptr [[TMP10]], align 1 -; X86-NEXT: [[TMP12:%.*]] = and i8 [[TMP11]], ptrtoint (ptr @__typeid_bytearray32_bit_mask to i8) -; X86-NEXT: [[TMP13:%.*]] = icmp ne i8 [[TMP12]], 0 -; X86-NEXT: br label %[[TMP14]] -; X86: [[TMP14]]: -; X86-NEXT: [[TMP15:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP13]], %[[TMP9]] ] -; X86-NEXT: ret i1 [[TMP15]] +; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_bytearray32_align to i64)) +; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_bytearray32_size_m1 to i64) +; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; X86: 5: +; X86-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr @__typeid_bytearray32_byte_array, i64 [[TMP3]] +; X86-NEXT: [[TMP7:%.*]] = load i8, ptr [[TMP6]], align 1 +; X86-NEXT: [[TMP8:%.*]] = and i8 [[TMP7]], ptrtoint (ptr @__typeid_bytearray32_bit_mask to i8) +; X86-NEXT: [[TMP9:%.*]] = icmp ne i8 [[TMP8]], 0 +; X86-NEXT: br label [[TMP10]] +; X86: 10: +; X86-NEXT: [[TMP11:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP9]], [[TMP5]] ] +; X86-NEXT: ret i1 [[TMP11]] ; ; ARM-LABEL: define i1 @bytearray32( ; ARM-SAME: ptr [[P:%.*]]) { ; ARM-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_bytearray32_global_addr to i64), [[TMP1]] -; ARM-NEXT: [[TMP5:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 4) -; ARM-NEXT: [[TMP6:%.*]] = icmp ule i64 [[TMP5]], 12346 -; ARM-NEXT: br i1 [[TMP6]], label [[TMP7:%.*]], label [[TMP12:%.*]] +; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 4) +; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 12346 +; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] ; ARM: 5: -; ARM-NEXT: [[TMP8:%.*]] = getelementptr i8, ptr @__typeid_bytearray32_byte_array, i64 [[TMP5]] -; ARM-NEXT: [[TMP9:%.*]] = load i8, ptr [[TMP8]], align 1 -; ARM-NEXT: [[TMP10:%.*]] = and i8 [[TMP9]], ptrtoint (ptr inttoptr (i64 128 to ptr) to i8) -; ARM-NEXT: [[TMP11:%.*]] = icmp ne i8 [[TMP10]], 0 -; ARM-NEXT: br label [[TMP12]] +; ARM-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr @__typeid_bytearray32_byte_array, i64 [[TMP3]] +; ARM-NEXT: [[TMP7:%.*]] = load i8, ptr [[TMP6]], align 1 +; ARM-NEXT: [[TMP8:%.*]] = and i8 [[TMP7]], ptrtoint (ptr inttoptr (i64 128 to ptr) to i8) +; ARM-NEXT: [[TMP9:%.*]] = icmp ne i8 [[TMP8]], 0 +; ARM-NEXT: br label [[TMP10]] ; ARM: 10: -; ARM-NEXT: [[TMP13:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP11]], [[TMP7]] ] -; ARM-NEXT: ret i1 [[TMP13]] +; ARM-NEXT: [[TMP11:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP9]], [[TMP5]] ] +; ARM-NEXT: ret i1 [[TMP11]] ; %x = call i1 @llvm.type.test(ptr %p, metadata !"bytearray32") ret i1 %x @@ -157,37 +168,37 @@ define i1 @inline5(ptr %p) { ; X86-SAME: ptr [[P:%.*]]) { ; X86-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_inline5_global_addr to i64), [[TMP1]] -; X86-NEXT: [[TMP7:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_inline5_align to i64)) -; X86-NEXT: [[TMP8:%.*]] = icmp ule i64 [[TMP7]], ptrtoint (ptr @__typeid_inline5_size_m1 to i64) -; X86-NEXT: br i1 [[TMP8]], label %[[TMP9:.*]], label %[[TMP15:.*]] -; X86: [[TMP9]]: -; X86-NEXT: [[TMP10:%.*]] = trunc i64 [[TMP7]] to i32 -; X86-NEXT: [[TMP11:%.*]] = and i32 [[TMP10]], 31 -; X86-NEXT: [[TMP12:%.*]] = shl i32 1, [[TMP11]] -; X86-NEXT: [[TMP13:%.*]] = and i32 ptrtoint (ptr @__typeid_inline5_inline_bits to i32), [[TMP12]] -; X86-NEXT: [[TMP14:%.*]] = icmp ne i32 [[TMP13]], 0 -; X86-NEXT: br label %[[TMP15]] -; X86: [[TMP15]]: -; X86-NEXT: [[TMP16:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP14]], %[[TMP9]] ] -; X86-NEXT: ret i1 [[TMP16]] +; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_inline5_align to i64)) +; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_inline5_size_m1 to i64) +; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP11:%.*]] +; X86: 5: +; X86-NEXT: [[TMP6:%.*]] = trunc i64 [[TMP3]] to i32 +; X86-NEXT: [[TMP7:%.*]] = and i32 [[TMP6]], 31 +; X86-NEXT: [[TMP8:%.*]] = shl i32 1, [[TMP7]] +; X86-NEXT: [[TMP9:%.*]] = and i32 ptrtoint (ptr @__typeid_inline5_inline_bits to i32), [[TMP8]] +; X86-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0 +; X86-NEXT: br label [[TMP11]] +; X86: 11: +; X86-NEXT: [[TMP12:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP10]], [[TMP5]] ] +; X86-NEXT: ret i1 [[TMP12]] ; ; ARM-LABEL: define i1 @inline5( ; ARM-SAME: ptr [[P:%.*]]) { ; ARM-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_inline5_global_addr to i64), [[TMP1]] -; ARM-NEXT: [[TMP5:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 5) -; ARM-NEXT: [[TMP6:%.*]] = icmp ule i64 [[TMP5]], 31 -; ARM-NEXT: br i1 [[TMP6]], label [[TMP7:%.*]], label [[TMP13:%.*]] +; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 5) +; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 31 +; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP11:%.*]] ; ARM: 5: -; ARM-NEXT: [[TMP8:%.*]] = trunc i64 [[TMP5]] to i32 -; ARM-NEXT: [[TMP9:%.*]] = and i32 [[TMP8]], 31 -; ARM-NEXT: [[TMP10:%.*]] = shl i32 1, [[TMP9]] -; ARM-NEXT: [[TMP11:%.*]] = and i32 123, [[TMP10]] -; ARM-NEXT: [[TMP12:%.*]] = icmp ne i32 [[TMP11]], 0 -; ARM-NEXT: br label [[TMP13]] +; ARM-NEXT: [[TMP6:%.*]] = trunc i64 [[TMP3]] to i32 +; ARM-NEXT: [[TMP7:%.*]] = and i32 [[TMP6]], 31 +; ARM-NEXT: [[TMP8:%.*]] = shl i32 1, [[TMP7]] +; ARM-NEXT: [[TMP9:%.*]] = and i32 123, [[TMP8]] +; ARM-NEXT: [[TMP10:%.*]] = icmp ne i32 [[TMP9]], 0 +; ARM-NEXT: br label [[TMP11]] ; ARM: 11: -; ARM-NEXT: [[TMP14:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP12]], [[TMP7]] ] -; ARM-NEXT: ret i1 [[TMP14]] +; ARM-NEXT: [[TMP12:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP10]], [[TMP5]] ] +; ARM-NEXT: ret i1 [[TMP12]] ; %x = call i1 @llvm.type.test(ptr %p, metadata !"inline5") ret i1 %x @@ -198,35 +209,35 @@ define i1 @inline6(ptr %p) { ; X86-SAME: ptr [[P:%.*]]) { ; X86-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_inline6_global_addr to i64), [[TMP1]] -; X86-NEXT: [[TMP7:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_inline6_align to i64)) -; X86-NEXT: [[TMP8:%.*]] = icmp ule i64 [[TMP7]], ptrtoint (ptr @__typeid_inline6_size_m1 to i64) -; X86-NEXT: br i1 [[TMP8]], label %[[TMP9:.*]], label %[[TMP14:.*]] -; X86: [[TMP9]]: -; X86-NEXT: [[TMP10:%.*]] = and i64 [[TMP7]], 63 -; X86-NEXT: [[TMP11:%.*]] = shl i64 1, [[TMP10]] -; X86-NEXT: [[TMP12:%.*]] = and i64 ptrtoint (ptr @__typeid_inline6_inline_bits to i64), [[TMP11]] -; X86-NEXT: [[TMP13:%.*]] = icmp ne i64 [[TMP12]], 0 -; X86-NEXT: br label %[[TMP14]] -; X86: [[TMP14]]: -; X86-NEXT: [[TMP15:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP13]], %[[TMP9]] ] -; X86-NEXT: ret i1 [[TMP15]] +; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_inline6_align to i64)) +; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_inline6_size_m1 to i64) +; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; X86: 5: +; X86-NEXT: [[TMP6:%.*]] = and i64 [[TMP3]], 63 +; X86-NEXT: [[TMP7:%.*]] = shl i64 1, [[TMP6]] +; X86-NEXT: [[TMP8:%.*]] = and i64 ptrtoint (ptr @__typeid_inline6_inline_bits to i64), [[TMP7]] +; X86-NEXT: [[TMP9:%.*]] = icmp ne i64 [[TMP8]], 0 +; X86-NEXT: br label [[TMP10]] +; X86: 10: +; X86-NEXT: [[TMP11:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP9]], [[TMP5]] ] +; X86-NEXT: ret i1 [[TMP11]] ; ; ARM-LABEL: define i1 @inline6( ; ARM-SAME: ptr [[P:%.*]]) { ; ARM-NEXT: [[TMP1:%.*]] = ptrtoint ptr [[P]] to i64 ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_inline6_global_addr to i64), [[TMP1]] -; ARM-NEXT: [[TMP5:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 6) -; ARM-NEXT: [[TMP6:%.*]] = icmp ule i64 [[TMP5]], 63 -; ARM-NEXT: br i1 [[TMP6]], label [[TMP7:%.*]], label [[TMP12:%.*]] +; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 6) +; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 63 +; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] ; ARM: 5: -; ARM-NEXT: [[TMP8:%.*]] = and i64 [[TMP5]], 63 -; ARM-NEXT: [[TMP9:%.*]] = shl i64 1, [[TMP8]] -; ARM-NEXT: [[TMP10:%.*]] = and i64 1000000000000, [[TMP9]] -; ARM-NEXT: [[TMP11:%.*]] = icmp ne i64 [[TMP10]], 0 -; ARM-NEXT: br label [[TMP12]] +; ARM-NEXT: [[TMP6:%.*]] = and i64 [[TMP3]], 63 +; ARM-NEXT: [[TMP7:%.*]] = shl i64 1, [[TMP6]] +; ARM-NEXT: [[TMP8:%.*]] = and i64 1000000000000, [[TMP7]] +; ARM-NEXT: [[TMP9:%.*]] = icmp ne i64 [[TMP8]], 0 +; ARM-NEXT: br label [[TMP10]] ; ARM: 10: -; ARM-NEXT: [[TMP13:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP11]], [[TMP7]] ] -; ARM-NEXT: ret i1 [[TMP13]] +; ARM-NEXT: [[TMP11:%.*]] = phi i1 [ false, [[TMP0:%.*]] ], [ [[TMP9]], [[TMP5]] ] +; ARM-NEXT: ret i1 [[TMP11]] ; %x = call i1 @llvm.type.test(ptr %p, metadata !"inline6") ret i1 %x @@ -242,10 +253,17 @@ define i1 @single(ptr %p) { %x = call i1 @llvm.type.test(ptr %p, metadata !"single") ret i1 %x } - -; X86: !0 = !{i64 0, i64 256} -; X86: !1 = !{i64 0, i64 64} -; X86: !2 = !{i64 -1, i64 -1} -; X86: !3 = !{i64 0, i64 32} -; X86: !4 = !{i64 0, i64 4294967296} -; X86: !5 = !{i64 0, i64 128} +;. +; X86: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +; X86: attributes #[[ATTR1:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +;. +; X86: [[META0]] = !{i64 0, i64 256} +; X86: [[META1]] = !{i64 0, i64 64} +; X86: [[META2]] = !{i64 -1, i64 -1} +; X86: [[META3]] = !{i64 0, i64 32} +; X86: [[META4]] = !{i64 0, i64 4294967296} +; X86: [[META5]] = !{i64 0, i64 128} +;. +; ARM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +; ARM: attributes #[[ATTR1:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +;. From 893479adcc03e8ce0ed5e0b550cae7d32724cd9a Mon Sep 17 00:00:00 2001 From: Pengcheng Wang Date: Mon, 8 Dec 2025 16:05:22 +0800 Subject: [PATCH 06/11] [RISCV] Precommit test for unrolling loops with vector operands --- .../Transforms/LoopUnroll/RISCV/vector.ll | 217 +++++++++++++++++- 1 file changed, 210 insertions(+), 7 deletions(-) diff --git a/llvm/test/Transforms/LoopUnroll/RISCV/vector.ll b/llvm/test/Transforms/LoopUnroll/RISCV/vector.ll index b575057ff6d15..e4b18ad6c705f 100644 --- a/llvm/test/Transforms/LoopUnroll/RISCV/vector.ll +++ b/llvm/test/Transforms/LoopUnroll/RISCV/vector.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 ; RUN: opt -p loop-unroll -mtriple riscv64 -mattr=+v,+f -S %s | FileCheck %s --check-prefixes=COMMON,CHECK -; RUN: opt -p loop-unroll -mtriple=riscv64 -mcpu=sifive-s76 -S %s | FileCheck %s --check-prefixes=COMMON,SIFIVE +; RUN: opt -p loop-unroll -mtriple=riscv64 -mcpu=sifive-p870 -S %s | FileCheck %s --check-prefixes=COMMON,SIFIVE define void @reverse(ptr %dst, ptr %src, i64 %len) { ; CHECK-LABEL: define void @reverse( @@ -248,7 +248,7 @@ define void @saxpy_tripcount1K_av0(ptr %dst, ptr %src, float %a) { ; SIFIVE-NEXT: [[BROADCAST_SPLAT:%.*]] = shufflevector <4 x float> [[BROADCAST_SPLATINSERT]], <4 x float> poison, <4 x i32> zeroinitializer ; SIFIVE-NEXT: br label %[[VECTOR_BODY:.*]] ; SIFIVE: [[VECTOR_BODY]]: -; SIFIVE-NEXT: [[INDEX:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[INDEX_NEXT:%.*]], %[[VECTOR_BODY]] ] +; SIFIVE-NEXT: [[INDEX:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[INDEX_NEXT_15:%.*]], %[[VECTOR_BODY]] ] ; SIFIVE-NEXT: [[TMP0:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX]] ; SIFIVE-NEXT: [[WIDE_LOAD:%.*]] = load <4 x float>, ptr [[TMP0]], align 4 ; SIFIVE-NEXT: [[TMP1:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX]] @@ -276,9 +276,93 @@ define void @saxpy_tripcount1K_av0(ptr %dst, ptr %src, float %a) { ; SIFIVE-NEXT: [[WIDE_LOAD12_3:%.*]] = load <4 x float>, ptr [[TMP10]], align 4 ; SIFIVE-NEXT: [[TMP11:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_3]], <4 x float> [[WIDE_LOAD12_3]]) ; SIFIVE-NEXT: store <4 x float> [[TMP11]], ptr [[TMP10]], align 4 -; SIFIVE-NEXT: [[INDEX_NEXT]] = add nuw nsw i64 [[INDEX]], 16 -; SIFIVE-NEXT: [[TMP3:%.*]] = icmp eq i64 [[INDEX_NEXT]], 1024 -; SIFIVE-NEXT: br i1 [[TMP3]], label %[[EXIT:.*]], label %[[VECTOR_BODY]] +; SIFIVE-NEXT: [[INDEX_NEXT:%.*]] = add nuw nsw i64 [[INDEX]], 16 +; SIFIVE-NEXT: [[TMP49:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT]] +; SIFIVE-NEXT: [[WIDE_LOAD_4:%.*]] = load <4 x float>, ptr [[TMP49]], align 4 +; SIFIVE-NEXT: [[TMP13:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT]] +; SIFIVE-NEXT: [[WIDE_LOAD12_4:%.*]] = load <4 x float>, ptr [[TMP13]], align 4 +; SIFIVE-NEXT: [[TMP14:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_4]], <4 x float> [[WIDE_LOAD12_4]]) +; SIFIVE-NEXT: store <4 x float> [[TMP14]], ptr [[TMP13]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_4:%.*]] = add nuw nsw i64 [[INDEX]], 20 +; SIFIVE-NEXT: [[TMP15:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_4]] +; SIFIVE-NEXT: [[WIDE_LOAD_5:%.*]] = load <4 x float>, ptr [[TMP15]], align 4 +; SIFIVE-NEXT: [[TMP16:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_4]] +; SIFIVE-NEXT: [[WIDE_LOAD12_5:%.*]] = load <4 x float>, ptr [[TMP16]], align 4 +; SIFIVE-NEXT: [[TMP17:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_5]], <4 x float> [[WIDE_LOAD12_5]]) +; SIFIVE-NEXT: store <4 x float> [[TMP17]], ptr [[TMP16]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_5:%.*]] = add nuw nsw i64 [[INDEX]], 24 +; SIFIVE-NEXT: [[TMP18:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_5]] +; SIFIVE-NEXT: [[WIDE_LOAD_6:%.*]] = load <4 x float>, ptr [[TMP18]], align 4 +; SIFIVE-NEXT: [[TMP19:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_5]] +; SIFIVE-NEXT: [[WIDE_LOAD12_6:%.*]] = load <4 x float>, ptr [[TMP19]], align 4 +; SIFIVE-NEXT: [[TMP20:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_6]], <4 x float> [[WIDE_LOAD12_6]]) +; SIFIVE-NEXT: store <4 x float> [[TMP20]], ptr [[TMP19]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_6:%.*]] = add nuw nsw i64 [[INDEX]], 28 +; SIFIVE-NEXT: [[TMP21:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_6]] +; SIFIVE-NEXT: [[WIDE_LOAD_7:%.*]] = load <4 x float>, ptr [[TMP21]], align 4 +; SIFIVE-NEXT: [[TMP22:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_6]] +; SIFIVE-NEXT: [[WIDE_LOAD12_7:%.*]] = load <4 x float>, ptr [[TMP22]], align 4 +; SIFIVE-NEXT: [[TMP23:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_7]], <4 x float> [[WIDE_LOAD12_7]]) +; SIFIVE-NEXT: store <4 x float> [[TMP23]], ptr [[TMP22]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_7:%.*]] = add nuw nsw i64 [[INDEX]], 32 +; SIFIVE-NEXT: [[TMP24:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_7]] +; SIFIVE-NEXT: [[WIDE_LOAD_8:%.*]] = load <4 x float>, ptr [[TMP24]], align 4 +; SIFIVE-NEXT: [[TMP25:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_7]] +; SIFIVE-NEXT: [[WIDE_LOAD12_8:%.*]] = load <4 x float>, ptr [[TMP25]], align 4 +; SIFIVE-NEXT: [[TMP26:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_8]], <4 x float> [[WIDE_LOAD12_8]]) +; SIFIVE-NEXT: store <4 x float> [[TMP26]], ptr [[TMP25]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_8:%.*]] = add nuw nsw i64 [[INDEX]], 36 +; SIFIVE-NEXT: [[TMP27:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_8]] +; SIFIVE-NEXT: [[WIDE_LOAD_9:%.*]] = load <4 x float>, ptr [[TMP27]], align 4 +; SIFIVE-NEXT: [[TMP28:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_8]] +; SIFIVE-NEXT: [[WIDE_LOAD12_9:%.*]] = load <4 x float>, ptr [[TMP28]], align 4 +; SIFIVE-NEXT: [[TMP29:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_9]], <4 x float> [[WIDE_LOAD12_9]]) +; SIFIVE-NEXT: store <4 x float> [[TMP29]], ptr [[TMP28]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_9:%.*]] = add nuw nsw i64 [[INDEX]], 40 +; SIFIVE-NEXT: [[TMP30:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_9]] +; SIFIVE-NEXT: [[WIDE_LOAD_10:%.*]] = load <4 x float>, ptr [[TMP30]], align 4 +; SIFIVE-NEXT: [[TMP31:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_9]] +; SIFIVE-NEXT: [[WIDE_LOAD12_10:%.*]] = load <4 x float>, ptr [[TMP31]], align 4 +; SIFIVE-NEXT: [[TMP32:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_10]], <4 x float> [[WIDE_LOAD12_10]]) +; SIFIVE-NEXT: store <4 x float> [[TMP32]], ptr [[TMP31]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_10:%.*]] = add nuw nsw i64 [[INDEX]], 44 +; SIFIVE-NEXT: [[TMP33:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_10]] +; SIFIVE-NEXT: [[WIDE_LOAD_11:%.*]] = load <4 x float>, ptr [[TMP33]], align 4 +; SIFIVE-NEXT: [[TMP34:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_10]] +; SIFIVE-NEXT: [[WIDE_LOAD12_11:%.*]] = load <4 x float>, ptr [[TMP34]], align 4 +; SIFIVE-NEXT: [[TMP35:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_11]], <4 x float> [[WIDE_LOAD12_11]]) +; SIFIVE-NEXT: store <4 x float> [[TMP35]], ptr [[TMP34]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_11:%.*]] = add nuw nsw i64 [[INDEX]], 48 +; SIFIVE-NEXT: [[TMP36:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_11]] +; SIFIVE-NEXT: [[WIDE_LOAD_12:%.*]] = load <4 x float>, ptr [[TMP36]], align 4 +; SIFIVE-NEXT: [[TMP37:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_11]] +; SIFIVE-NEXT: [[WIDE_LOAD12_12:%.*]] = load <4 x float>, ptr [[TMP37]], align 4 +; SIFIVE-NEXT: [[TMP38:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_12]], <4 x float> [[WIDE_LOAD12_12]]) +; SIFIVE-NEXT: store <4 x float> [[TMP38]], ptr [[TMP37]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_12:%.*]] = add nuw nsw i64 [[INDEX]], 52 +; SIFIVE-NEXT: [[TMP39:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_12]] +; SIFIVE-NEXT: [[WIDE_LOAD_13:%.*]] = load <4 x float>, ptr [[TMP39]], align 4 +; SIFIVE-NEXT: [[TMP40:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_12]] +; SIFIVE-NEXT: [[WIDE_LOAD12_13:%.*]] = load <4 x float>, ptr [[TMP40]], align 4 +; SIFIVE-NEXT: [[TMP41:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_13]], <4 x float> [[WIDE_LOAD12_13]]) +; SIFIVE-NEXT: store <4 x float> [[TMP41]], ptr [[TMP40]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_13:%.*]] = add nuw nsw i64 [[INDEX]], 56 +; SIFIVE-NEXT: [[TMP42:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_13]] +; SIFIVE-NEXT: [[WIDE_LOAD_14:%.*]] = load <4 x float>, ptr [[TMP42]], align 4 +; SIFIVE-NEXT: [[TMP43:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_13]] +; SIFIVE-NEXT: [[WIDE_LOAD12_14:%.*]] = load <4 x float>, ptr [[TMP43]], align 4 +; SIFIVE-NEXT: [[TMP44:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_14]], <4 x float> [[WIDE_LOAD12_14]]) +; SIFIVE-NEXT: store <4 x float> [[TMP44]], ptr [[TMP43]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_14:%.*]] = add nuw nsw i64 [[INDEX]], 60 +; SIFIVE-NEXT: [[TMP45:%.*]] = getelementptr inbounds nuw float, ptr [[SRC]], i64 [[INDEX_NEXT_14]] +; SIFIVE-NEXT: [[WIDE_LOAD_15:%.*]] = load <4 x float>, ptr [[TMP45]], align 4 +; SIFIVE-NEXT: [[TMP46:%.*]] = getelementptr inbounds nuw float, ptr [[DST]], i64 [[INDEX_NEXT_14]] +; SIFIVE-NEXT: [[WIDE_LOAD12_15:%.*]] = load <4 x float>, ptr [[TMP46]], align 4 +; SIFIVE-NEXT: [[TMP47:%.*]] = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> [[BROADCAST_SPLAT]], <4 x float> [[WIDE_LOAD_15]], <4 x float> [[WIDE_LOAD12_15]]) +; SIFIVE-NEXT: store <4 x float> [[TMP47]], ptr [[TMP46]], align 4 +; SIFIVE-NEXT: [[INDEX_NEXT_15]] = add nuw nsw i64 [[INDEX]], 64 +; SIFIVE-NEXT: [[TMP48:%.*]] = icmp eq i64 [[INDEX_NEXT_15]], 1024 +; SIFIVE-NEXT: br i1 [[TMP48]], label %[[EXIT:.*]], label %[[VECTOR_BODY]] ; SIFIVE: [[EXIT]]: ; SIFIVE-NEXT: ret void ; @@ -345,8 +429,6 @@ vector.body: ; preds = %vector.body, %entry exit: ; preds = %vector.body ret void } -!0 = !{!0, !1} -!1 = !{!"llvm.loop.isvectorized", i32 1} ; On SiFive we should runtime unroll the scalar epilogue loop, but not the ; vector loop. @@ -587,6 +669,127 @@ exit: ret void } +define void @vector_operands(ptr %p, i64 %n) { +; CHECK-LABEL: define void @vector_operands( +; CHECK-SAME: ptr [[P:%.*]], i64 [[N:%.*]]) #[[ATTR0]] { +; CHECK-NEXT: [[ENTRY:.*]]: +; CHECK-NEXT: br label %[[VECTOR_BODY:.*]] +; CHECK: [[VECTOR_BODY]]: +; CHECK-NEXT: [[EVL_BASED_IV:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[INDEX_EVL_NEXT:%.*]], %[[VECTOR_BODY]] ] +; CHECK-NEXT: [[AVL:%.*]] = phi i64 [ [[N]], %[[ENTRY]] ], [ [[AVL_NEXT:%.*]], %[[VECTOR_BODY]] ] +; CHECK-NEXT: [[VL:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL]], i32 2, i1 true) +; CHECK-NEXT: [[ADDR:%.*]] = getelementptr i64, ptr [[P]], i64 [[EVL_BASED_IV]] +; CHECK-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR]], splat (i1 true), i32 [[VL]]) +; CHECK-NEXT: [[VL_ZEXT:%.*]] = zext i32 [[VL]] to i64 +; CHECK-NEXT: [[INDEX_EVL_NEXT]] = add nuw i64 [[VL_ZEXT]], [[EVL_BASED_IV]] +; CHECK-NEXT: [[AVL_NEXT]] = sub nuw i64 [[AVL]], [[VL_ZEXT]] +; CHECK-NEXT: [[TMP0:%.*]] = icmp eq i64 [[AVL_NEXT]], 0 +; CHECK-NEXT: br i1 [[TMP0]], label %[[EXIT:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP2]] +; CHECK: [[EXIT]]: +; CHECK-NEXT: ret void +; +; SIFIVE-LABEL: define void @vector_operands( +; SIFIVE-SAME: ptr [[P:%.*]], i64 [[N:%.*]]) #[[ATTR0]] { +; SIFIVE-NEXT: [[ENTRY:.*]]: +; SIFIVE-NEXT: br label %[[VECTOR_BODY:.*]] +; SIFIVE: [[VECTOR_BODY]]: +; SIFIVE-NEXT: [[EVL_BASED_IV:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[INDEX_EVL_NEXT_7:%.*]], %[[VECTOR_BODY_7:.*]] ] +; SIFIVE-NEXT: [[AVL:%.*]] = phi i64 [ [[N]], %[[ENTRY]] ], [ [[AVL_NEXT_7:%.*]], %[[VECTOR_BODY_7]] ] +; SIFIVE-NEXT: [[VL:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL]], i32 2, i1 true) +; SIFIVE-NEXT: [[ADDR:%.*]] = getelementptr i64, ptr [[P]], i64 [[EVL_BASED_IV]] +; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR]], splat (i1 true), i32 [[VL]]) +; SIFIVE-NEXT: [[VL_ZEXT:%.*]] = zext i32 [[VL]] to i64 +; SIFIVE-NEXT: [[INDEX_EVL_NEXT:%.*]] = add nuw i64 [[VL_ZEXT]], [[EVL_BASED_IV]] +; SIFIVE-NEXT: [[AVL_NEXT:%.*]] = sub nuw i64 [[AVL]], [[VL_ZEXT]] +; SIFIVE-NEXT: [[TMP0:%.*]] = icmp eq i64 [[AVL_NEXT]], 0 +; SIFIVE-NEXT: br i1 [[TMP0]], label %[[EXIT:.*]], label %[[VECTOR_BODY_1:.*]], !llvm.loop [[LOOP2]] +; SIFIVE: [[VECTOR_BODY_1]]: +; SIFIVE-NEXT: [[VL_1:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT]], i32 2, i1 true) +; SIFIVE-NEXT: [[ADDR_1:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT]] +; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_1]], splat (i1 true), i32 [[VL_1]]) +; SIFIVE-NEXT: [[VL_ZEXT_1:%.*]] = zext i32 [[VL_1]] to i64 +; SIFIVE-NEXT: [[INDEX_EVL_NEXT_1:%.*]] = add nuw i64 [[VL_ZEXT_1]], [[INDEX_EVL_NEXT]] +; SIFIVE-NEXT: [[AVL_NEXT_1:%.*]] = sub nuw i64 [[AVL_NEXT]], [[VL_ZEXT_1]] +; SIFIVE-NEXT: [[TMP1:%.*]] = icmp eq i64 [[AVL_NEXT_1]], 0 +; SIFIVE-NEXT: br i1 [[TMP1]], label %[[EXIT]], label %[[VECTOR_BODY_2:.*]], !llvm.loop [[LOOP2]] +; SIFIVE: [[VECTOR_BODY_2]]: +; SIFIVE-NEXT: [[VL_2:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_1]], i32 2, i1 true) +; SIFIVE-NEXT: [[ADDR_2:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_1]] +; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_2]], splat (i1 true), i32 [[VL_2]]) +; SIFIVE-NEXT: [[VL_ZEXT_2:%.*]] = zext i32 [[VL_2]] to i64 +; SIFIVE-NEXT: [[INDEX_EVL_NEXT_2:%.*]] = add nuw i64 [[VL_ZEXT_2]], [[INDEX_EVL_NEXT_1]] +; SIFIVE-NEXT: [[AVL_NEXT_2:%.*]] = sub nuw i64 [[AVL_NEXT_1]], [[VL_ZEXT_2]] +; SIFIVE-NEXT: [[TMP2:%.*]] = icmp eq i64 [[AVL_NEXT_2]], 0 +; SIFIVE-NEXT: br i1 [[TMP2]], label %[[EXIT]], label %[[VECTOR_BODY_3:.*]], !llvm.loop [[LOOP2]] +; SIFIVE: [[VECTOR_BODY_3]]: +; SIFIVE-NEXT: [[VL_3:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_2]], i32 2, i1 true) +; SIFIVE-NEXT: [[ADDR_3:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_2]] +; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_3]], splat (i1 true), i32 [[VL_3]]) +; SIFIVE-NEXT: [[VL_ZEXT_3:%.*]] = zext i32 [[VL_3]] to i64 +; SIFIVE-NEXT: [[INDEX_EVL_NEXT_3:%.*]] = add nuw i64 [[VL_ZEXT_3]], [[INDEX_EVL_NEXT_2]] +; SIFIVE-NEXT: [[AVL_NEXT_3:%.*]] = sub nuw i64 [[AVL_NEXT_2]], [[VL_ZEXT_3]] +; SIFIVE-NEXT: [[TMP3:%.*]] = icmp eq i64 [[AVL_NEXT_3]], 0 +; SIFIVE-NEXT: br i1 [[TMP3]], label %[[EXIT]], label %[[VECTOR_BODY_4:.*]], !llvm.loop [[LOOP2]] +; SIFIVE: [[VECTOR_BODY_4]]: +; SIFIVE-NEXT: [[VL_4:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_3]], i32 2, i1 true) +; SIFIVE-NEXT: [[ADDR_4:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_3]] +; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_4]], splat (i1 true), i32 [[VL_4]]) +; SIFIVE-NEXT: [[VL_ZEXT_4:%.*]] = zext i32 [[VL_4]] to i64 +; SIFIVE-NEXT: [[INDEX_EVL_NEXT_4:%.*]] = add nuw i64 [[VL_ZEXT_4]], [[INDEX_EVL_NEXT_3]] +; SIFIVE-NEXT: [[AVL_NEXT_4:%.*]] = sub nuw i64 [[AVL_NEXT_3]], [[VL_ZEXT_4]] +; SIFIVE-NEXT: [[TMP4:%.*]] = icmp eq i64 [[AVL_NEXT_4]], 0 +; SIFIVE-NEXT: br i1 [[TMP4]], label %[[EXIT]], label %[[VECTOR_BODY_5:.*]], !llvm.loop [[LOOP2]] +; SIFIVE: [[VECTOR_BODY_5]]: +; SIFIVE-NEXT: [[VL_5:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_4]], i32 2, i1 true) +; SIFIVE-NEXT: [[ADDR_5:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_4]] +; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_5]], splat (i1 true), i32 [[VL_5]]) +; SIFIVE-NEXT: [[VL_ZEXT_5:%.*]] = zext i32 [[VL_5]] to i64 +; SIFIVE-NEXT: [[INDEX_EVL_NEXT_5:%.*]] = add nuw i64 [[VL_ZEXT_5]], [[INDEX_EVL_NEXT_4]] +; SIFIVE-NEXT: [[AVL_NEXT_5:%.*]] = sub nuw i64 [[AVL_NEXT_4]], [[VL_ZEXT_5]] +; SIFIVE-NEXT: [[TMP5:%.*]] = icmp eq i64 [[AVL_NEXT_5]], 0 +; SIFIVE-NEXT: br i1 [[TMP5]], label %[[EXIT]], label %[[VECTOR_BODY_6:.*]], !llvm.loop [[LOOP2]] +; SIFIVE: [[VECTOR_BODY_6]]: +; SIFIVE-NEXT: [[VL_6:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_5]], i32 2, i1 true) +; SIFIVE-NEXT: [[ADDR_6:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_5]] +; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_6]], splat (i1 true), i32 [[VL_6]]) +; SIFIVE-NEXT: [[VL_ZEXT_6:%.*]] = zext i32 [[VL_6]] to i64 +; SIFIVE-NEXT: [[INDEX_EVL_NEXT_6:%.*]] = add nuw i64 [[VL_ZEXT_6]], [[INDEX_EVL_NEXT_5]] +; SIFIVE-NEXT: [[AVL_NEXT_6:%.*]] = sub nuw i64 [[AVL_NEXT_5]], [[VL_ZEXT_6]] +; SIFIVE-NEXT: [[TMP6:%.*]] = icmp eq i64 [[AVL_NEXT_6]], 0 +; SIFIVE-NEXT: br i1 [[TMP6]], label %[[EXIT]], label %[[VECTOR_BODY_7]], !llvm.loop [[LOOP2]] +; SIFIVE: [[VECTOR_BODY_7]]: +; SIFIVE-NEXT: [[VL_7:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_6]], i32 2, i1 true) +; SIFIVE-NEXT: [[ADDR_7:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_6]] +; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_7]], splat (i1 true), i32 [[VL_7]]) +; SIFIVE-NEXT: [[VL_ZEXT_7:%.*]] = zext i32 [[VL_7]] to i64 +; SIFIVE-NEXT: [[INDEX_EVL_NEXT_7]] = add nuw i64 [[VL_ZEXT_7]], [[INDEX_EVL_NEXT_6]] +; SIFIVE-NEXT: [[AVL_NEXT_7]] = sub nuw i64 [[AVL_NEXT_6]], [[VL_ZEXT_7]] +; SIFIVE-NEXT: [[TMP7:%.*]] = icmp eq i64 [[AVL_NEXT_7]], 0 +; SIFIVE-NEXT: br i1 [[TMP7]], label %[[EXIT]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP2]] +; SIFIVE: [[EXIT]]: +; SIFIVE-NEXT: ret void +; +entry: + br label %vector.body + +vector.body: + %evl.based.iv = phi i64 [ 0, %entry ], [ %index.evl.next, %vector.body ] + %avl = phi i64 [ %n, %entry ], [ %avl.next, %vector.body ] + %vl = call i32 @llvm.experimental.get.vector.length.i64(i64 %avl, i32 2, i1 true) + %addr = getelementptr i64, ptr %p, i64 %evl.based.iv + call void @llvm.vp.store.nxv2i64.p0( splat (i64 0), ptr align 8 %addr, splat (i1 true), i32 %vl) + %vl.zext = zext i32 %vl to i64 + %index.evl.next = add nuw i64 %vl.zext, %evl.based.iv + %avl.next = sub nuw i64 %avl, %vl.zext + %3 = icmp eq i64 %avl.next, 0 + br i1 %3, label %exit, label %vector.body, !llvm.loop !2 + +exit: + ret void +} + +!0 = !{!0, !1} +!1 = !{!"llvm.loop.isvectorized", i32 1} !2 = distinct !{!2, !1} !3 = distinct !{!3, !1} From e5a1821f5b345d278a3fadee0a975dbd228f9a65 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 9 Dec 2025 12:37:27 +0800 Subject: [PATCH 07/11] [OpenCL] Add missing Intel extensions to OpenCLExtensions.def (#169875) Add following extensions: cl_intel_bfloat16_conversion cl_intel_subgroup_buffer_prefetch cl_intel_subgroup_local_block_io cl_intel_subgroups_char cl_intel_subgroups_long This allows targets to expose these extensions via getSupportedOpenCLOpts and ensures macros are defined when enabled. --- .../include/clang/Basic/OpenCLExtensions.def | 5 +++ clang/test/SemaOpenCL/extension-version.cl | 36 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/clang/include/clang/Basic/OpenCLExtensions.def b/clang/include/clang/Basic/OpenCLExtensions.def index 809f73be90c4e..b0c08b7f320c4 100644 --- a/clang/include/clang/Basic/OpenCLExtensions.def +++ b/clang/include/clang/Basic/OpenCLExtensions.def @@ -140,8 +140,13 @@ OPENCL_EXTENSION(cl_amd_media_ops, true, 100) OPENCL_EXTENSION(cl_amd_media_ops2, true, 100) // Intel OpenCL extensions +OPENCL_EXTENSION(cl_intel_bfloat16_conversion, false, 100) OPENCL_EXTENSION(cl_intel_subgroups, true, 120) +OPENCL_EXTENSION(cl_intel_subgroups_char, true, 120) +OPENCL_EXTENSION(cl_intel_subgroups_long, true, 120) OPENCL_EXTENSION(cl_intel_subgroups_short, true, 120) +OPENCL_EXTENSION(cl_intel_subgroup_buffer_prefetch, false, 120) +OPENCL_EXTENSION(cl_intel_subgroup_local_block_io, false, 120) OPENCL_EXTENSION(cl_intel_device_side_avc_motion_estimation, true, 120) // OpenCL C 3.0 features (6.2.1. Features) diff --git a/clang/test/SemaOpenCL/extension-version.cl b/clang/test/SemaOpenCL/extension-version.cl index c634cf313b36d..f736e5f5ff9fe 100644 --- a/clang/test/SemaOpenCL/extension-version.cl +++ b/clang/test/SemaOpenCL/extension-version.cl @@ -331,6 +331,12 @@ #endif #pragma OPENCL EXTENSION cl_khr_depth_images : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 100) +#ifndef cl_intel_bfloat16_conversion +#error "Missing cl_intel_bfloat16_conversion define" +#endif +#endif + #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_intel_subgroups #error "Missing cl_intel_subgroups define" @@ -340,6 +346,24 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#ifndef cl_intel_subgroups_char +#error "Missing cl_intel_subgroups_char define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups_char' - ignoring}} +#endif +#pragma OPENCL EXTENSION cl_intel_subgroups_char : enable + +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#ifndef cl_intel_subgroups_long +#error "Missing cl_intel_subgroups_long define" +#endif +#else +// expected-warning@+2{{unsupported OpenCL extension 'cl_intel_subgroups_long' - ignoring}} +#endif +#pragma OPENCL EXTENSION cl_intel_subgroups_long : enable + #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_intel_subgroups_short #error "Missing cl_intel_subgroups_short define" @@ -349,6 +373,18 @@ #endif #pragma OPENCL EXTENSION cl_intel_subgroups_short : enable +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#ifndef cl_intel_subgroup_buffer_prefetch +#error "Missing cl_intel_subgroup_buffer_prefetch define" +#endif +#endif + +#if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) +#ifndef cl_intel_subgroup_local_block_io +#error "Missing cl_intel_subgroup_local_block_io define" +#endif +#endif + #if (defined(__OPENCL_CPP_VERSION__) || __OPENCL_C_VERSION__ >= 120) #ifndef cl_intel_device_side_avc_motion_estimation #error "Missing cl_intel_device_side_avc_motion_estimation define" From a0b6638c85065b6a098a9a4b1bc468652e8cddc5 Mon Sep 17 00:00:00 2001 From: Pengcheng Wang Date: Tue, 9 Dec 2025 12:42:41 +0800 Subject: [PATCH 08/11] [RISCV] Don't unroll vectorized loops with vector operands (#171089) We have disabled unrolling for vectorized loops in #151525 but this PR only checked the instruction type. For some loops, there is no instruction with vector type but they are still vector operations (just like the memset zero test in the precommit test). Here we check the operands as well to cover these cases. --- .../Target/RISCV/RISCVTargetTransformInfo.cpp | 5 +- .../Transforms/LoopUnroll/RISCV/vector.ll | 115 +++--------------- 2 files changed, 21 insertions(+), 99 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp index afc2f2c9cd07b..79cd651febf85 100644 --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -2802,7 +2802,10 @@ void RISCVTTIImpl::getUnrollingPreferences( // Both auto-vectorized loops and the scalar remainder have the // isvectorized attribute, so differentiate between them by the presence // of vector instructions. - if (IsVectorized && I.getType()->isVectorTy()) + if (IsVectorized && (I.getType()->isVectorTy() || + llvm::any_of(I.operand_values(), [](Value *V) { + return V->getType()->isVectorTy(); + }))) return; if (isa(I) || isa(I)) { diff --git a/llvm/test/Transforms/LoopUnroll/RISCV/vector.ll b/llvm/test/Transforms/LoopUnroll/RISCV/vector.ll index e4b18ad6c705f..b441f42f267af 100644 --- a/llvm/test/Transforms/LoopUnroll/RISCV/vector.ll +++ b/llvm/test/Transforms/LoopUnroll/RISCV/vector.ll @@ -670,104 +670,23 @@ exit: } define void @vector_operands(ptr %p, i64 %n) { -; CHECK-LABEL: define void @vector_operands( -; CHECK-SAME: ptr [[P:%.*]], i64 [[N:%.*]]) #[[ATTR0]] { -; CHECK-NEXT: [[ENTRY:.*]]: -; CHECK-NEXT: br label %[[VECTOR_BODY:.*]] -; CHECK: [[VECTOR_BODY]]: -; CHECK-NEXT: [[EVL_BASED_IV:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[INDEX_EVL_NEXT:%.*]], %[[VECTOR_BODY]] ] -; CHECK-NEXT: [[AVL:%.*]] = phi i64 [ [[N]], %[[ENTRY]] ], [ [[AVL_NEXT:%.*]], %[[VECTOR_BODY]] ] -; CHECK-NEXT: [[VL:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL]], i32 2, i1 true) -; CHECK-NEXT: [[ADDR:%.*]] = getelementptr i64, ptr [[P]], i64 [[EVL_BASED_IV]] -; CHECK-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR]], splat (i1 true), i32 [[VL]]) -; CHECK-NEXT: [[VL_ZEXT:%.*]] = zext i32 [[VL]] to i64 -; CHECK-NEXT: [[INDEX_EVL_NEXT]] = add nuw i64 [[VL_ZEXT]], [[EVL_BASED_IV]] -; CHECK-NEXT: [[AVL_NEXT]] = sub nuw i64 [[AVL]], [[VL_ZEXT]] -; CHECK-NEXT: [[TMP0:%.*]] = icmp eq i64 [[AVL_NEXT]], 0 -; CHECK-NEXT: br i1 [[TMP0]], label %[[EXIT:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP2]] -; CHECK: [[EXIT]]: -; CHECK-NEXT: ret void -; -; SIFIVE-LABEL: define void @vector_operands( -; SIFIVE-SAME: ptr [[P:%.*]], i64 [[N:%.*]]) #[[ATTR0]] { -; SIFIVE-NEXT: [[ENTRY:.*]]: -; SIFIVE-NEXT: br label %[[VECTOR_BODY:.*]] -; SIFIVE: [[VECTOR_BODY]]: -; SIFIVE-NEXT: [[EVL_BASED_IV:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[INDEX_EVL_NEXT_7:%.*]], %[[VECTOR_BODY_7:.*]] ] -; SIFIVE-NEXT: [[AVL:%.*]] = phi i64 [ [[N]], %[[ENTRY]] ], [ [[AVL_NEXT_7:%.*]], %[[VECTOR_BODY_7]] ] -; SIFIVE-NEXT: [[VL:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL]], i32 2, i1 true) -; SIFIVE-NEXT: [[ADDR:%.*]] = getelementptr i64, ptr [[P]], i64 [[EVL_BASED_IV]] -; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR]], splat (i1 true), i32 [[VL]]) -; SIFIVE-NEXT: [[VL_ZEXT:%.*]] = zext i32 [[VL]] to i64 -; SIFIVE-NEXT: [[INDEX_EVL_NEXT:%.*]] = add nuw i64 [[VL_ZEXT]], [[EVL_BASED_IV]] -; SIFIVE-NEXT: [[AVL_NEXT:%.*]] = sub nuw i64 [[AVL]], [[VL_ZEXT]] -; SIFIVE-NEXT: [[TMP0:%.*]] = icmp eq i64 [[AVL_NEXT]], 0 -; SIFIVE-NEXT: br i1 [[TMP0]], label %[[EXIT:.*]], label %[[VECTOR_BODY_1:.*]], !llvm.loop [[LOOP2]] -; SIFIVE: [[VECTOR_BODY_1]]: -; SIFIVE-NEXT: [[VL_1:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT]], i32 2, i1 true) -; SIFIVE-NEXT: [[ADDR_1:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT]] -; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_1]], splat (i1 true), i32 [[VL_1]]) -; SIFIVE-NEXT: [[VL_ZEXT_1:%.*]] = zext i32 [[VL_1]] to i64 -; SIFIVE-NEXT: [[INDEX_EVL_NEXT_1:%.*]] = add nuw i64 [[VL_ZEXT_1]], [[INDEX_EVL_NEXT]] -; SIFIVE-NEXT: [[AVL_NEXT_1:%.*]] = sub nuw i64 [[AVL_NEXT]], [[VL_ZEXT_1]] -; SIFIVE-NEXT: [[TMP1:%.*]] = icmp eq i64 [[AVL_NEXT_1]], 0 -; SIFIVE-NEXT: br i1 [[TMP1]], label %[[EXIT]], label %[[VECTOR_BODY_2:.*]], !llvm.loop [[LOOP2]] -; SIFIVE: [[VECTOR_BODY_2]]: -; SIFIVE-NEXT: [[VL_2:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_1]], i32 2, i1 true) -; SIFIVE-NEXT: [[ADDR_2:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_1]] -; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_2]], splat (i1 true), i32 [[VL_2]]) -; SIFIVE-NEXT: [[VL_ZEXT_2:%.*]] = zext i32 [[VL_2]] to i64 -; SIFIVE-NEXT: [[INDEX_EVL_NEXT_2:%.*]] = add nuw i64 [[VL_ZEXT_2]], [[INDEX_EVL_NEXT_1]] -; SIFIVE-NEXT: [[AVL_NEXT_2:%.*]] = sub nuw i64 [[AVL_NEXT_1]], [[VL_ZEXT_2]] -; SIFIVE-NEXT: [[TMP2:%.*]] = icmp eq i64 [[AVL_NEXT_2]], 0 -; SIFIVE-NEXT: br i1 [[TMP2]], label %[[EXIT]], label %[[VECTOR_BODY_3:.*]], !llvm.loop [[LOOP2]] -; SIFIVE: [[VECTOR_BODY_3]]: -; SIFIVE-NEXT: [[VL_3:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_2]], i32 2, i1 true) -; SIFIVE-NEXT: [[ADDR_3:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_2]] -; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_3]], splat (i1 true), i32 [[VL_3]]) -; SIFIVE-NEXT: [[VL_ZEXT_3:%.*]] = zext i32 [[VL_3]] to i64 -; SIFIVE-NEXT: [[INDEX_EVL_NEXT_3:%.*]] = add nuw i64 [[VL_ZEXT_3]], [[INDEX_EVL_NEXT_2]] -; SIFIVE-NEXT: [[AVL_NEXT_3:%.*]] = sub nuw i64 [[AVL_NEXT_2]], [[VL_ZEXT_3]] -; SIFIVE-NEXT: [[TMP3:%.*]] = icmp eq i64 [[AVL_NEXT_3]], 0 -; SIFIVE-NEXT: br i1 [[TMP3]], label %[[EXIT]], label %[[VECTOR_BODY_4:.*]], !llvm.loop [[LOOP2]] -; SIFIVE: [[VECTOR_BODY_4]]: -; SIFIVE-NEXT: [[VL_4:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_3]], i32 2, i1 true) -; SIFIVE-NEXT: [[ADDR_4:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_3]] -; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_4]], splat (i1 true), i32 [[VL_4]]) -; SIFIVE-NEXT: [[VL_ZEXT_4:%.*]] = zext i32 [[VL_4]] to i64 -; SIFIVE-NEXT: [[INDEX_EVL_NEXT_4:%.*]] = add nuw i64 [[VL_ZEXT_4]], [[INDEX_EVL_NEXT_3]] -; SIFIVE-NEXT: [[AVL_NEXT_4:%.*]] = sub nuw i64 [[AVL_NEXT_3]], [[VL_ZEXT_4]] -; SIFIVE-NEXT: [[TMP4:%.*]] = icmp eq i64 [[AVL_NEXT_4]], 0 -; SIFIVE-NEXT: br i1 [[TMP4]], label %[[EXIT]], label %[[VECTOR_BODY_5:.*]], !llvm.loop [[LOOP2]] -; SIFIVE: [[VECTOR_BODY_5]]: -; SIFIVE-NEXT: [[VL_5:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_4]], i32 2, i1 true) -; SIFIVE-NEXT: [[ADDR_5:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_4]] -; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_5]], splat (i1 true), i32 [[VL_5]]) -; SIFIVE-NEXT: [[VL_ZEXT_5:%.*]] = zext i32 [[VL_5]] to i64 -; SIFIVE-NEXT: [[INDEX_EVL_NEXT_5:%.*]] = add nuw i64 [[VL_ZEXT_5]], [[INDEX_EVL_NEXT_4]] -; SIFIVE-NEXT: [[AVL_NEXT_5:%.*]] = sub nuw i64 [[AVL_NEXT_4]], [[VL_ZEXT_5]] -; SIFIVE-NEXT: [[TMP5:%.*]] = icmp eq i64 [[AVL_NEXT_5]], 0 -; SIFIVE-NEXT: br i1 [[TMP5]], label %[[EXIT]], label %[[VECTOR_BODY_6:.*]], !llvm.loop [[LOOP2]] -; SIFIVE: [[VECTOR_BODY_6]]: -; SIFIVE-NEXT: [[VL_6:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_5]], i32 2, i1 true) -; SIFIVE-NEXT: [[ADDR_6:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_5]] -; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_6]], splat (i1 true), i32 [[VL_6]]) -; SIFIVE-NEXT: [[VL_ZEXT_6:%.*]] = zext i32 [[VL_6]] to i64 -; SIFIVE-NEXT: [[INDEX_EVL_NEXT_6:%.*]] = add nuw i64 [[VL_ZEXT_6]], [[INDEX_EVL_NEXT_5]] -; SIFIVE-NEXT: [[AVL_NEXT_6:%.*]] = sub nuw i64 [[AVL_NEXT_5]], [[VL_ZEXT_6]] -; SIFIVE-NEXT: [[TMP6:%.*]] = icmp eq i64 [[AVL_NEXT_6]], 0 -; SIFIVE-NEXT: br i1 [[TMP6]], label %[[EXIT]], label %[[VECTOR_BODY_7]], !llvm.loop [[LOOP2]] -; SIFIVE: [[VECTOR_BODY_7]]: -; SIFIVE-NEXT: [[VL_7:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL_NEXT_6]], i32 2, i1 true) -; SIFIVE-NEXT: [[ADDR_7:%.*]] = getelementptr i64, ptr [[P]], i64 [[INDEX_EVL_NEXT_6]] -; SIFIVE-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR_7]], splat (i1 true), i32 [[VL_7]]) -; SIFIVE-NEXT: [[VL_ZEXT_7:%.*]] = zext i32 [[VL_7]] to i64 -; SIFIVE-NEXT: [[INDEX_EVL_NEXT_7]] = add nuw i64 [[VL_ZEXT_7]], [[INDEX_EVL_NEXT_6]] -; SIFIVE-NEXT: [[AVL_NEXT_7]] = sub nuw i64 [[AVL_NEXT_6]], [[VL_ZEXT_7]] -; SIFIVE-NEXT: [[TMP7:%.*]] = icmp eq i64 [[AVL_NEXT_7]], 0 -; SIFIVE-NEXT: br i1 [[TMP7]], label %[[EXIT]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP2]] -; SIFIVE: [[EXIT]]: -; SIFIVE-NEXT: ret void +; COMMON-LABEL: define void @vector_operands( +; COMMON-SAME: ptr [[P:%.*]], i64 [[N:%.*]]) #[[ATTR0]] { +; COMMON-NEXT: [[ENTRY:.*]]: +; COMMON-NEXT: br label %[[VECTOR_BODY:.*]] +; COMMON: [[VECTOR_BODY]]: +; COMMON-NEXT: [[EVL_BASED_IV:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[INDEX_EVL_NEXT:%.*]], %[[VECTOR_BODY]] ] +; COMMON-NEXT: [[AVL:%.*]] = phi i64 [ [[N]], %[[ENTRY]] ], [ [[AVL_NEXT:%.*]], %[[VECTOR_BODY]] ] +; COMMON-NEXT: [[VL:%.*]] = call i32 @llvm.experimental.get.vector.length.i64(i64 [[AVL]], i32 2, i1 true) +; COMMON-NEXT: [[ADDR:%.*]] = getelementptr i64, ptr [[P]], i64 [[EVL_BASED_IV]] +; COMMON-NEXT: call void @llvm.vp.store.nxv2i64.p0( zeroinitializer, ptr align 8 [[ADDR]], splat (i1 true), i32 [[VL]]) +; COMMON-NEXT: [[VL_ZEXT:%.*]] = zext i32 [[VL]] to i64 +; COMMON-NEXT: [[INDEX_EVL_NEXT]] = add nuw i64 [[VL_ZEXT]], [[EVL_BASED_IV]] +; COMMON-NEXT: [[AVL_NEXT]] = sub nuw i64 [[AVL]], [[VL_ZEXT]] +; COMMON-NEXT: [[TMP0:%.*]] = icmp eq i64 [[AVL_NEXT]], 0 +; COMMON-NEXT: br i1 [[TMP0]], label %[[EXIT:.*]], label %[[VECTOR_BODY]], !llvm.loop [[LOOP2:![0-9]+]] +; COMMON: [[EXIT]]: +; COMMON-NEXT: ret void ; entry: br label %vector.body From ba3208e19f7dcaf8c8a95f47f03c46a5b3acf57d Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Mon, 8 Dec 2025 22:44:07 -0600 Subject: [PATCH 09/11] [LLVM/CodeGen] Use the correct address space when building structor tables. (#171247) No in-tree target exercises this, but it's needed for CHERI, and I believe its correctness is verifiable by inspection. Co-authored-by: Alex Richardson --- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 3aa245b7f3f1e..c459b80baf4ab 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -3473,7 +3473,7 @@ void AsmPrinter::emitXXStructorList(const DataLayout &DL, const Constant *List, if (!TM.Options.UseInitArray) std::reverse(Structors.begin(), Structors.end()); - const Align Align = DL.getPointerPrefAlignment(); + const Align Align = DL.getPointerPrefAlignment(DL.getProgramAddressSpace()); for (Structor &S : Structors) { const TargetLoweringObjectFile &Obj = getObjFileLowering(); const MCSymbol *KeySym = nullptr; From ce76c393ce749f854e51e1d32a1bb2e5e092e106 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Mon, 8 Dec 2025 20:56:32 -0800 Subject: [PATCH 10/11] Fix test outputting to test dir (#171255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test introduced in #171118 has `llc` inadvertently producing an output into the same dir as the test file itself. Most build bots don't clean up the local git repo, which is assumed to not be written by build + test, and patch on top (for build performance reasons), which means the produced output from the aforementioned PR is treated as a test from here onwards, by all bots. Since it's missing `RUN` lines, we get errors, for example  https://lab.llvm.org/buildbot/#/builders/108/builds/20674 This patch fixes the `llc` line and also removes the `.s`. This avoids all bot maintainers go restart their bots. Then, the cleanup is removed in #171256. --- .../AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir b/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir index 8a09df4693118..ec094109cad6e 100644 --- a/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir +++ b/llvm/test/CodeGen/AArch64/arm64-homogeneous-prolog-epilog-tail-call.mir @@ -1,4 +1,5 @@ -# RUN: llc -verify-machineinstrs -mtriple=arm64-applie-ios7.0 -start-before=aarch64-lower-homogeneous-prolog-epilog -homogeneous-prolog-epilog %s +# RUN: rm -rf %S/arm64-homogeneous-prolog-epilog-tail-call.s +# RUN: llc -verify-machineinstrs -mtriple=arm64-applie-ios7.0 -start-before=aarch64-lower-homogeneous-prolog-epilog -homogeneous-prolog-epilog %s -o /dev/null # # This test ensures defined registers are preserved after lowering homogeneous # epilog into helper calls. Without the fix, the verifier would complain about From 93c7ad188042bfade0af38754ab87426a17e059c Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Mon, 8 Dec 2025 21:02:23 -0800 Subject: [PATCH 11/11] [LTT] Bias branch weights as "expected" when lowering type tests with conditional (#170752) We expect the type test to succeed. --- llvm/lib/Transforms/IPO/LowerTypeTests.cpp | 6 ++++- llvm/test/Transforms/LowerTypeTests/import.ll | 23 +++++++++++-------- llvm/utils/profcheck-xfail.txt | 2 -- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp index f7aeda95e41b3..06deea8ba5848 100644 --- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp +++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp @@ -48,12 +48,14 @@ #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Intrinsics.h" #include "llvm/IR/LLVMContext.h" +#include "llvm/IR/MDBuilder.h" #include "llvm/IR/Metadata.h" #include "llvm/IR/Module.h" #include "llvm/IR/ModuleSummaryIndex.h" #include "llvm/IR/ModuleSummaryIndexYAML.h" #include "llvm/IR/Operator.h" #include "llvm/IR/PassManager.h" +#include "llvm/IR/ProfDataUtils.h" #include "llvm/IR/ReplaceConstant.h" #include "llvm/IR/Type.h" #include "llvm/IR/Use.h" @@ -802,7 +804,9 @@ Value *LowerTypeTestsModule::lowerTypeTestCall(Metadata *TypeId, CallInst *CI, return createBitSetTest(ThenB, TIL, BitOffset); } - IRBuilder<> ThenB(SplitBlockAndInsertIfThen(OffsetInRange, CI, false)); + MDBuilder MDB(M.getContext()); + IRBuilder<> ThenB(SplitBlockAndInsertIfThen(OffsetInRange, CI, false, + MDB.createLikelyBranchWeights())); // Now that we know that the offset is in range and aligned, load the // appropriate bit from the bitset. diff --git a/llvm/test/Transforms/LowerTypeTests/import.ll b/llvm/test/Transforms/LowerTypeTests/import.ll index e3c2d8a3d3e8c..1583dda58cddc 100644 --- a/llvm/test/Transforms/LowerTypeTests/import.ll +++ b/llvm/test/Transforms/LowerTypeTests/import.ll @@ -92,7 +92,7 @@ define i1 @bytearray7(ptr %p) { ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_bytearray7_global_addr to i64), [[TMP1]] ; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_bytearray7_align to i64)) ; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_bytearray7_size_m1 to i64) -; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]], !prof [[PROF6:![0-9]+]] ; X86: 5: ; X86-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr @__typeid_bytearray7_byte_array, i64 [[TMP3]] ; X86-NEXT: [[TMP7:%.*]] = load i8, ptr [[TMP6]], align 1 @@ -109,7 +109,7 @@ define i1 @bytearray7(ptr %p) { ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_bytearray7_global_addr to i64), [[TMP1]] ; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 3) ; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 43 -; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]], !prof [[PROF0:![0-9]+]] ; ARM: 5: ; ARM-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr @__typeid_bytearray7_byte_array, i64 [[TMP3]] ; ARM-NEXT: [[TMP7:%.*]] = load i8, ptr [[TMP6]], align 1 @@ -131,7 +131,7 @@ define i1 @bytearray32(ptr %p) { ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_bytearray32_global_addr to i64), [[TMP1]] ; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_bytearray32_align to i64)) ; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_bytearray32_size_m1 to i64) -; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]], !prof [[PROF6]] ; X86: 5: ; X86-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr @__typeid_bytearray32_byte_array, i64 [[TMP3]] ; X86-NEXT: [[TMP7:%.*]] = load i8, ptr [[TMP6]], align 1 @@ -148,7 +148,7 @@ define i1 @bytearray32(ptr %p) { ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_bytearray32_global_addr to i64), [[TMP1]] ; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 4) ; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 12346 -; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]], !prof [[PROF0]] ; ARM: 5: ; ARM-NEXT: [[TMP6:%.*]] = getelementptr i8, ptr @__typeid_bytearray32_byte_array, i64 [[TMP3]] ; ARM-NEXT: [[TMP7:%.*]] = load i8, ptr [[TMP6]], align 1 @@ -170,7 +170,7 @@ define i1 @inline5(ptr %p) { ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_inline5_global_addr to i64), [[TMP1]] ; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_inline5_align to i64)) ; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_inline5_size_m1 to i64) -; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP11:%.*]] +; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP11:%.*]], !prof [[PROF6]] ; X86: 5: ; X86-NEXT: [[TMP6:%.*]] = trunc i64 [[TMP3]] to i32 ; X86-NEXT: [[TMP7:%.*]] = and i32 [[TMP6]], 31 @@ -188,7 +188,7 @@ define i1 @inline5(ptr %p) { ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_inline5_global_addr to i64), [[TMP1]] ; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 5) ; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 31 -; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP11:%.*]] +; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP11:%.*]], !prof [[PROF0]] ; ARM: 5: ; ARM-NEXT: [[TMP6:%.*]] = trunc i64 [[TMP3]] to i32 ; ARM-NEXT: [[TMP7:%.*]] = and i32 [[TMP6]], 31 @@ -211,7 +211,7 @@ define i1 @inline6(ptr %p) { ; X86-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_inline6_global_addr to i64), [[TMP1]] ; X86-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 ptrtoint (ptr @__typeid_inline6_align to i64)) ; X86-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], ptrtoint (ptr @__typeid_inline6_size_m1 to i64) -; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; X86-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]], !prof [[PROF6]] ; X86: 5: ; X86-NEXT: [[TMP6:%.*]] = and i64 [[TMP3]], 63 ; X86-NEXT: [[TMP7:%.*]] = shl i64 1, [[TMP6]] @@ -228,7 +228,7 @@ define i1 @inline6(ptr %p) { ; ARM-NEXT: [[TMP2:%.*]] = sub i64 ptrtoint (ptr @__typeid_inline6_global_addr to i64), [[TMP1]] ; ARM-NEXT: [[TMP3:%.*]] = call i64 @llvm.fshr.i64(i64 [[TMP2]], i64 [[TMP2]], i64 6) ; ARM-NEXT: [[TMP4:%.*]] = icmp ule i64 [[TMP3]], 63 -; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]] +; ARM-NEXT: br i1 [[TMP4]], label [[TMP5:%.*]], label [[TMP10:%.*]], !prof [[PROF0]] ; ARM: 5: ; ARM-NEXT: [[TMP6:%.*]] = and i64 [[TMP3]], 63 ; ARM-NEXT: [[TMP7:%.*]] = shl i64 1, [[TMP6]] @@ -257,13 +257,16 @@ define i1 @single(ptr %p) { ; X86: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } ; X86: attributes #[[ATTR1:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } ;. +; ARM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } +; ARM: attributes #[[ATTR1:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +;. ; X86: [[META0]] = !{i64 0, i64 256} ; X86: [[META1]] = !{i64 0, i64 64} ; X86: [[META2]] = !{i64 -1, i64 -1} ; X86: [[META3]] = !{i64 0, i64 32} ; X86: [[META4]] = !{i64 0, i64 4294967296} ; X86: [[META5]] = !{i64 0, i64 128} +; X86: [[PROF6]] = !{!"branch_weights", i32 1048575, i32 1} ;. -; ARM: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } -; ARM: attributes #[[ATTR1:[0-9]+]] = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } +; ARM: [[PROF0]] = !{!"branch_weights", i32 1048575, i32 1} ;. diff --git a/llvm/utils/profcheck-xfail.txt b/llvm/utils/profcheck-xfail.txt index bd0c4868ae17f..959d227992580 100644 --- a/llvm/utils/profcheck-xfail.txt +++ b/llvm/utils/profcheck-xfail.txt @@ -490,8 +490,6 @@ Transforms/LowerSwitch/do-not-handle-impossible-values.ll Transforms/LowerSwitch/feature.ll Transforms/LowerSwitch/fold-popular-case-to-unreachable-default.ll Transforms/LowerSwitch/pr59316.ll -Transforms/LowerTypeTests/import.ll -Transforms/LowerTypeTests/simple.ll Transforms/MergeFunc/2011-02-08-RemoveEqual.ll Transforms/MergeFunc/apply_function_attributes.ll Transforms/MergeFunc/call-and-invoke-with-ranges-attr.ll