From 7e22b0903150c7f722b5290155d251b50d839c3a Mon Sep 17 00:00:00 2001
From: Fraser Cormack <fraser@codeplay.com>
Date: Mon, 24 Mar 2025 16:21:59 +0000
Subject: [PATCH] [libclc] Add missing license headers to source IR files
 (#132758)

---
 .../lib/cl_khr_int64_extended_atomics/minmax_helpers.ll   | 8 ++++++++
 libclc/amdgpu/lib/shared/vload_half_helpers.ll            | 8 ++++++++
 libclc/amdgpu/lib/shared/vstore_half_helpers.ll           | 8 ++++++++
 libclc/generic/lib/subnormal_disable.ll                   | 8 ++++++++
 libclc/generic/lib/subnormal_helper_func.ll               | 8 ++++++++
 libclc/generic/lib/subnormal_use_default.ll               | 8 ++++++++
 libclc/ptx/lib/shared/vload_half_helpers.ll               | 8 ++++++++
 libclc/ptx/lib/shared/vstore_half_helpers.ll              | 8 ++++++++
 libclc/r600/lib/image/get_image_attributes_impl.ll        | 8 ++++++++
 libclc/r600/lib/image/read_image_impl.ll                  | 8 ++++++++
 libclc/r600/lib/image/write_image_impl.ll                 | 8 ++++++++
 11 files changed, 88 insertions(+)

diff --git a/libclc/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll b/libclc/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll
index 7f12556c0abb..3ed5e99be314 100644
--- a/libclc/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll
+++ b/libclc/amdgcn/lib/cl_khr_int64_extended_atomics/minmax_helpers.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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 i64 @__clc__sync_fetch_and_min_global_8(i64 addrspace(1)* nocapture %ptr, i64 %value) nounwind alwaysinline {
 entry:
   %0 = atomicrmw volatile min i64 addrspace(1)* %ptr, i64 %value seq_cst
diff --git a/libclc/amdgpu/lib/shared/vload_half_helpers.ll b/libclc/amdgpu/lib/shared/vload_half_helpers.ll
index b8c905af6fc8..bf7d544afbf5 100644
--- a/libclc/amdgpu/lib/shared/vload_half_helpers.ll
+++ b/libclc/amdgpu/lib/shared/vload_half_helpers.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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 float @__clc_vload_half_float_helper__private(half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
   %data = load half, half addrspace(0)* %ptr
   %res = fpext half %data to float
diff --git a/libclc/amdgpu/lib/shared/vstore_half_helpers.ll b/libclc/amdgpu/lib/shared/vstore_half_helpers.ll
index e958664e5601..5ec193d6d40a 100644
--- a/libclc/amdgpu/lib/shared/vstore_half_helpers.ll
+++ b/libclc/amdgpu/lib/shared/vstore_half_helpers.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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 void @__clc_vstore_half_float_helper__private(float %data, half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
   %res = fptrunc float %data to half
   store half %res, half addrspace(0)* %ptr
diff --git a/libclc/generic/lib/subnormal_disable.ll b/libclc/generic/lib/subnormal_disable.ll
index b935583b5ade..732d09ff09ab 100644
--- a/libclc/generic/lib/subnormal_disable.ll
+++ b/libclc/generic/lib/subnormal_disable.ll
@@ -1 +1,9 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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_SUBNORMAL_DISABLE = unnamed_addr constant i1 true
diff --git a/libclc/generic/lib/subnormal_helper_func.ll b/libclc/generic/lib/subnormal_helper_func.ll
index fb1b5d2b679f..03beecf97926 100644
--- a/libclc/generic/lib/subnormal_helper_func.ll
+++ b/libclc/generic/lib/subnormal_helper_func.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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_SUBNORMAL_DISABLE = external global i1
 
 define i1 @__clc_subnormals_disabled() #0 {
diff --git a/libclc/generic/lib/subnormal_use_default.ll b/libclc/generic/lib/subnormal_use_default.ll
index d70c63bc0475..c648cc0a8ade 100644
--- a/libclc/generic/lib/subnormal_use_default.ll
+++ b/libclc/generic/lib/subnormal_use_default.ll
@@ -1 +1,9 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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_SUBNORMAL_DISABLE = unnamed_addr constant i1 false
diff --git a/libclc/ptx/lib/shared/vload_half_helpers.ll b/libclc/ptx/lib/shared/vload_half_helpers.ll
index f79d104d547e..5fbae19fde28 100644
--- a/libclc/ptx/lib/shared/vload_half_helpers.ll
+++ b/libclc/ptx/lib/shared/vload_half_helpers.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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 float @__clc_vload_half_float_helper__private(half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
   %data = load half, half addrspace(0)* %ptr
   %res = fpext half %data to float
diff --git a/libclc/ptx/lib/shared/vstore_half_helpers.ll b/libclc/ptx/lib/shared/vstore_half_helpers.ll
index e958664e5601..5ec193d6d40a 100644
--- a/libclc/ptx/lib/shared/vstore_half_helpers.ll
+++ b/libclc/ptx/lib/shared/vstore_half_helpers.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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 void @__clc_vstore_half_float_helper__private(float %data, half addrspace(0)* nocapture %ptr) nounwind alwaysinline {
   %res = fptrunc float %data to half
   store half %res, half addrspace(0)* %ptr
diff --git a/libclc/r600/lib/image/get_image_attributes_impl.ll b/libclc/r600/lib/image/get_image_attributes_impl.ll
index 7f1965de7602..e7b605df62e4 100644
--- a/libclc/r600/lib/image/get_image_attributes_impl.ll
+++ b/libclc/r600/lib/image/get_image_attributes_impl.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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
+;
+;;===----------------------------------------------------------------------===;;
+
 %opencl.image2d_t = type opaque
 %opencl.image3d_t = type opaque
 
diff --git a/libclc/r600/lib/image/read_image_impl.ll b/libclc/r600/lib/image/read_image_impl.ll
index 229a2526c374..9187469b191f 100644
--- a/libclc/r600/lib/image/read_image_impl.ll
+++ b/libclc/r600/lib/image/read_image_impl.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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
+;
+;;===----------------------------------------------------------------------===;;
+
 %opencl.image2d_t = type opaque
 
 declare <4 x float> @llvm.R600.tex(<4 x float>, i32, i32, i32, i32, i32, i32,
diff --git a/libclc/r600/lib/image/write_image_impl.ll b/libclc/r600/lib/image/write_image_impl.ll
index 265f5d6045e4..f3dea44c7927 100644
--- a/libclc/r600/lib/image/write_image_impl.ll
+++ b/libclc/r600/lib/image/write_image_impl.ll
@@ -1,3 +1,11 @@
+;;===----------------------------------------------------------------------===;;
+;
+; 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
+;
+;;===----------------------------------------------------------------------===;;
+
 %opencl.image2d_t = type opaque
 %opencl.image3d_t = type opaque