https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/171959
>From 9710adbca44d02f49bc4903e2b0862ec517c5495 Mon Sep 17 00:00:00 2001 From: Wenju He <[email protected]> Date: Fri, 12 Dec 2025 04:33:49 +0100 Subject: [PATCH 1/2] [NFC][OpenCL] Refine test4 in intel-unsupported-extensions.cl __local address space function requires both cl_intel_subgroups_short and cl_intel_subgroup_local_block_io. Change it to __global so that only cl_intel_subgroups_short is required. This fixes test fail when cl_intel_subgroups_short is enabled but cl_intel_subgroup_local_block_io isn't. --- clang/test/SemaOpenCL/intel-unsupported-extensions.cl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/test/SemaOpenCL/intel-unsupported-extensions.cl b/clang/test/SemaOpenCL/intel-unsupported-extensions.cl index ea8fd126073f1..11ab7b4bd61c7 100644 --- a/clang/test/SemaOpenCL/intel-unsupported-extensions.cl +++ b/clang/test/SemaOpenCL/intel-unsupported-extensions.cl @@ -26,7 +26,7 @@ uchar test3(read_only image2d_t im, int2 i) { // expected-error@-3{{use of undeclared identifier 'intel_sub_group_block_read_uc'}} #endif -ushort test4(const __local ushort* p) { +ushort test4(const __global ushort* p) { return intel_sub_group_block_read_us(p); } #if !defined(cl_intel_subgroups_short) >From 28288d95d0b644ed9d1f2f4f5b9cc90c394bc8c8 Mon Sep 17 00:00:00 2001 From: Wenju He <[email protected]> Date: Sat, 13 Dec 2025 11:32:06 +0100 Subject: [PATCH 2/2] test -cl-ext=-cl_intel_subgroup_local_block_io --- .../test/SemaOpenCL/intel-unsupported-extensions.cl | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/clang/test/SemaOpenCL/intel-unsupported-extensions.cl b/clang/test/SemaOpenCL/intel-unsupported-extensions.cl index 11ab7b4bd61c7..3481dfad201cf 100644 --- a/clang/test/SemaOpenCL/intel-unsupported-extensions.cl +++ b/clang/test/SemaOpenCL/intel-unsupported-extensions.cl @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple spir-unknown-unknown -verify -finclude-default-header -cl-std=CL3.0 -cl-ext=-cl_intel_subgroups,-cl_intel_subgroup_buffer_prefetch,-cl_intel_subgroups_char,-cl_intel_subgroups_short,-cl_intel_subgroups_long,-cl_intel_bfloat16_conversions,-cl_intel_subgroup_local_block_io,-cl_intel_device_side_avc_motion_estimation %s +// RUN: %clang_cc1 -triple spir-unknown-unknown -verify -finclude-default-header -cl-std=CL3.0 -cl-ext=-cl_intel_subgroup_local_block_io %s // RUN: %clang_cc1 -triple spir-unknown-unknown -verify -finclude-default-header -cl-std=CL3.0 %s #if defined(cl_intel_subgroups) && defined(cl_intel_subgroup_buffer_prefetch) && defined(cl_intel_subgroups_char) && defined(cl_intel_subgroups_short) && defined(cl_intel_subgroups_long) && defined(cl_intel_bfloat16_conversions) && defined(cl_intel_subgroup_local_block_io) && defined(cl_intel_device_side_avc_motion_estimation) @@ -47,11 +48,17 @@ ushort test6(float f) { // expected-error@-3{{use of undeclared identifier 'intel_convert_bfloat16_as_ushort'}} #endif -uint test7(const __local uint* p) { - return intel_sub_group_block_read(p); +#if defined(cl_intel_subgroups_short) && !defined(cl_intel_subgroup_local_block_io) +ushort test7(const __local ushort* p) { + return intel_sub_group_block_read_us(p); // expected-error{{no matching function for call to 'intel_sub_group_block_read_us'}} expected-error 0+{{}} // expected-note@* {{}} // expected-note@* {{}} // expected-note@* {{}} +} +#else +ushort test7(const __local ushort* p) { + return intel_sub_group_block_read_us(p); } #if !defined(cl_intel_subgroup_local_block_io) -// expected-error@-3{{use of undeclared identifier 'intel_sub_group_block_read'}} +// expected-error@-3{{use of undeclared identifier 'intel_sub_group_block_read_us'}} +#endif #endif uchar test8(uchar slice_type, uchar qp) { _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
