From 1285c721004dc56bc646bfbd2f56996898c40af8 Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Tue, 25 Nov 2025 15:59:51 -0800 Subject: [PATCH 1/4] [SYCL] Switch to new sycl::vec implementation --- sycl/include/sycl/detail/type_traits/vec_marray_traits.hpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sycl/include/sycl/detail/type_traits/vec_marray_traits.hpp b/sycl/include/sycl/detail/type_traits/vec_marray_traits.hpp index ff456ace8816e..90779a0463d86 100644 --- a/sycl/include/sycl/detail/type_traits/vec_marray_traits.hpp +++ b/sycl/include/sycl/detail/type_traits/vec_marray_traits.hpp @@ -14,11 +14,7 @@ #include #ifndef __SYCL_USE_LIBSYCL8_VEC_IMPL -#if defined(__INTEL_PREVIEW_BREAKING_CHANGES) #define __SYCL_USE_LIBSYCL8_VEC_IMPL 0 -#else -#define __SYCL_USE_LIBSYCL8_VEC_IMPL 1 -#endif #endif namespace sycl { From c00aa39b05f0502132db7d37cd83ebba0a528b6a Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Tue, 25 Nov 2025 17:05:35 -0800 Subject: [PATCH 2/4] Adjust tests --- sycl/test-e2e/Basic/vector/bool.cpp | 4 +- sycl/test-e2e/Basic/vector/byte.cpp | 4 +- sycl/test-e2e/Basic/vector/int-convert.cpp | 4 +- sycl/test-e2e/Basic/vector/load_store.cpp | 4 +- .../vector/vec_binary_scalar_order_arith.cpp | 3 +- .../vec_binary_scalar_order_bitwise.cpp | 3 +- sycl/test-e2e/Regression/swizzle_opassign.cpp | 4 +- .../Regression/vec_rel_swizzle_ops.cpp | 4 +- sycl/test/basic_tests/vectors/assign.cpp | 110 +++++------ .../vectors/constexpr-constructor.cpp | 2 +- .../basic_tests/vectors/cxx_conversions.cpp | 184 +++++++++--------- sycl/test/basic_tests/vectors/negative.cpp | 2 +- .../basic_tests/vectors/size_one_checks.cpp | 4 +- sycl/test/basic_tests/vectors/storage.cpp | 2 +- sycl/test/basic_tests/vectors/vectors.cpp | 4 +- .../vector/{as_preview.cpp => as_new_vec.cpp} | 4 +- .../vector/{as.cpp => as_old_vec.cpp} | 2 +- ..._preview.cpp => bf16_builtins_new_vec.cpp} | 4 +- ...builtins.cpp => bf16_builtins_old_vec.cpp} | 2 +- ...preview.cpp => convert_bfloat_new_vec.cpp} | 0 ..._bfloat.cpp => convert_bfloat_old_vec.cpp} | 0 ...h_ops_preview.cpp => math_ops_new_vec.cpp} | 4 +- .../{math_ops.cpp => math_ops_old_vec.cpp} | 2 +- sycl/test/regression/vec-logical-ops.cpp | 2 +- sycl/test/regression/vec_array_windows.cpp | 2 +- 25 files changed, 177 insertions(+), 183 deletions(-) rename sycl/test/check_device_code/vector/{as_preview.cpp => as_new_vec.cpp} (89%) rename sycl/test/check_device_code/vector/{as.cpp => as_old_vec.cpp} (88%) rename sycl/test/check_device_code/vector/{bf16_builtins_preview.cpp => bf16_builtins_new_vec.cpp} (98%) rename sycl/test/check_device_code/vector/{bf16_builtins.cpp => bf16_builtins_old_vec.cpp} (99%) rename sycl/test/check_device_code/vector/{convert_bfloat_preview.cpp => convert_bfloat_new_vec.cpp} (100%) rename sycl/test/check_device_code/vector/{convert_bfloat.cpp => convert_bfloat_old_vec.cpp} (100%) rename sycl/test/check_device_code/vector/{math_ops_preview.cpp => math_ops_new_vec.cpp} (99%) rename sycl/test/check_device_code/vector/{math_ops.cpp => math_ops_old_vec.cpp} (99%) diff --git a/sycl/test-e2e/Basic/vector/bool.cpp b/sycl/test-e2e/Basic/vector/bool.cpp index b440f65e3261e..af35f0f9387aa 100644 --- a/sycl/test-e2e/Basic/vector/bool.cpp +++ b/sycl/test-e2e/Basic/vector/bool.cpp @@ -1,8 +1,8 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} +// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -o %t2.out +// RUN: %{run} %t2.out //==-------------- vec_bool.cpp - SYCL vec<> for bool test -----------------==// // diff --git a/sycl/test-e2e/Basic/vector/byte.cpp b/sycl/test-e2e/Basic/vector/byte.cpp index c2edadf147ed3..d74ef5f97f7c4 100644 --- a/sycl/test-e2e/Basic/vector/byte.cpp +++ b/sycl/test-e2e/Basic/vector/byte.cpp @@ -1,8 +1,8 @@ // RUN: %{build} %cxx_std_optionc++17 -o %t.out // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes %cxx_std_optionc++17 -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} +// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 %cxx_std_optionc++17 -o %t2.out +// RUN: %{run} %t2.out //==---------- vector_byte.cpp - SYCL vec<> for std::byte test -------------==// // diff --git a/sycl/test-e2e/Basic/vector/int-convert.cpp b/sycl/test-e2e/Basic/vector/int-convert.cpp index ba5060292a164..77397e4d109d5 100644 --- a/sycl/test-e2e/Basic/vector/int-convert.cpp +++ b/sycl/test-e2e/Basic/vector/int-convert.cpp @@ -7,8 +7,8 @@ // RUN: %{build} -o %t.out -DSYCL2020_DISABLE_DEPRECATION_WARNINGS // RUN: %{run} %t.out // -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -DSYCL2020_DISABLE_DEPRECATION_WARNINGS -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} +// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -DSYCL2020_DISABLE_DEPRECATION_WARNINGS -o %t2.out +// RUN: %{run} %t2.out #include #include diff --git a/sycl/test-e2e/Basic/vector/load_store.cpp b/sycl/test-e2e/Basic/vector/load_store.cpp index 00ddf5a0a3402..a0f763cbe253a 100644 --- a/sycl/test-e2e/Basic/vector/load_store.cpp +++ b/sycl/test-e2e/Basic/vector/load_store.cpp @@ -1,8 +1,8 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} +// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -o %t2.out +// RUN: %{run} %t2.out // XFAIL: target-native_cpu // XFAIL-TRACKER: https://github.com/intel/llvm/issues/20142 diff --git a/sycl/test-e2e/Basic/vector/vec_binary_scalar_order_arith.cpp b/sycl/test-e2e/Basic/vector/vec_binary_scalar_order_arith.cpp index d5b74859b701c..d8f4a7093fa0b 100644 --- a/sycl/test-e2e/Basic/vector/vec_binary_scalar_order_arith.cpp +++ b/sycl/test-e2e/Basic/vector/vec_binary_scalar_order_arith.cpp @@ -1,5 +1,4 @@ -// REQUIRES: preview-breaking-changes-supported -// RUN: %{build} -fpreview-breaking-changes -o %t.out +// RUN: %{build} -o %t.out // RUN: %{run} %t.out // Checks scalar/vec arithmetic operator ordering. diff --git a/sycl/test-e2e/Basic/vector/vec_binary_scalar_order_bitwise.cpp b/sycl/test-e2e/Basic/vector/vec_binary_scalar_order_bitwise.cpp index 6ca491fb6afba..5edda79ec464e 100644 --- a/sycl/test-e2e/Basic/vector/vec_binary_scalar_order_bitwise.cpp +++ b/sycl/test-e2e/Basic/vector/vec_binary_scalar_order_bitwise.cpp @@ -1,5 +1,4 @@ -// REQUIRES: preview-breaking-changes-supported -// RUN: %{build} -fpreview-breaking-changes -o %t.out +// RUN: %{build} -o %t.out // RUN: %{run} %t.out // Checks scalar/vec bitwise operator ordering. diff --git a/sycl/test-e2e/Regression/swizzle_opassign.cpp b/sycl/test-e2e/Regression/swizzle_opassign.cpp index f8ee858edd655..c6f86242b3474 100644 --- a/sycl/test-e2e/Regression/swizzle_opassign.cpp +++ b/sycl/test-e2e/Regression/swizzle_opassign.cpp @@ -1,7 +1,7 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} +// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -o %t2.out +// RUN: %{run} %t2.out // Tests that the mutating operators (+=, -=, ..., ++, --) on swizzles compile // and correctly mutate the elements in the corresponding vector. diff --git a/sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp b/sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp index 6184f0905f86a..9a53a4fdcab7b 100644 --- a/sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp +++ b/sycl/test-e2e/Regression/vec_rel_swizzle_ops.cpp @@ -1,8 +1,8 @@ // RUN: %{build} -o %t.out // RUN: %{run} %t.out -// RUN: %if preview-breaking-changes-supported %{ %{build} -fpreview-breaking-changes -o %t2.out %} -// RUN: %if preview-breaking-changes-supported %{ %{run} %t2.out %} +// RUN: %{build} -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -o %t2.out +// RUN: %{run} %t2.out #include #include diff --git a/sycl/test/basic_tests/vectors/assign.cpp b/sycl/test/basic_tests/vectors/assign.cpp index f284089646419..0c150de8aec3c 100644 --- a/sycl/test/basic_tests/vectors/assign.cpp +++ b/sycl/test/basic_tests/vectors/assign.cpp @@ -1,5 +1,5 @@ -// RUN: %clangxx -fsycl -fsyntax-only %s -fpreview-breaking-changes // RUN: %clangxx -fsycl -fsyntax-only %s +// RUN: %clangxx -fsycl -fsyntax-only %s -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 #include @@ -14,69 +14,65 @@ using sw_float_2 = decltype(std::declval>().swizzle<1, 2>()); using sw_double_1 = decltype(std::declval>().swizzle<1>()); using sw_double_2 = decltype(std::declval>().swizzle<1, 2>()); -#if __INTEL_PREVIEW_BREAKING_CHANGES -#define EXCEPT_IN_PREVIEW ! +#if defined(__SYCL_USE_LIBSYCL8_VEC_IMPL) && (__SYCL_USE_LIBSYCL8_VEC_IMPL) +#define EXCEPT_IF_NEW_VEC_IMPL #else -#define EXCEPT_IN_PREVIEW +#define EXCEPT_IF_NEW_VEC_IMPL ! #endif // clang-format off +static_assert( std::is_assignable_v, half>); +static_assert( std::is_assignable_v, float>); +static_assert( std::is_assignable_v, double>); +static_assert( std::is_assignable_v, vec>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, vec>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, vec>); +static_assert( std::is_assignable_v, sw_half_1>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, sw_float_1>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, sw_double_1>); +static_assert( !std::is_assignable_v, sw_half_2>); +static_assert( !std::is_assignable_v, sw_float_2>); +static_assert( !std::is_assignable_v, sw_double_2>); -// IN_PREVIEW_ONLY condition<> -// EXCEPT_IN_PREVIEW condition<> +static_assert( std::is_assignable_v, half>); +static_assert( std::is_assignable_v, float>); +static_assert( std::is_assignable_v, double>); +static_assert( std::is_assignable_v, vec>); +static_assert( !std::is_assignable_v, vec>); +static_assert( !std::is_assignable_v, vec>); +static_assert( std::is_assignable_v, sw_half_1>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, sw_float_1>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, sw_double_1>); +static_assert( std::is_assignable_v, sw_half_2>); +static_assert( !std::is_assignable_v, sw_float_2>); +static_assert( !std::is_assignable_v, sw_double_2>); -static_assert( std::is_assignable_v, half>); -static_assert( std::is_assignable_v, float>); -static_assert( std::is_assignable_v, double>); -static_assert( std::is_assignable_v, vec>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, vec>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, vec>); -static_assert( std::is_assignable_v, sw_half_1>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, sw_float_1>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, sw_double_1>); -static_assert( !std::is_assignable_v, sw_half_2>); -static_assert( !std::is_assignable_v, sw_float_2>); -static_assert( !std::is_assignable_v, sw_double_2>); +static_assert( std::is_assignable_v, half>); +static_assert( std::is_assignable_v, float>); +static_assert( std::is_assignable_v, double>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, vec>); +static_assert( std::is_assignable_v, vec>); +static_assert( std::is_assignable_v, vec>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, sw_half_1>); +static_assert( std::is_assignable_v, sw_float_1>); +static_assert( std::is_assignable_v, sw_double_1>); +static_assert( !std::is_assignable_v, sw_half_2>); +static_assert( !std::is_assignable_v, sw_float_2>); +static_assert( !std::is_assignable_v, sw_double_2>); -static_assert( std::is_assignable_v, half>); -static_assert( std::is_assignable_v, float>); -static_assert( std::is_assignable_v, double>); -static_assert( std::is_assignable_v, vec>); -static_assert( !std::is_assignable_v, vec>); -static_assert( !std::is_assignable_v, vec>); -static_assert( std::is_assignable_v, sw_half_1>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, sw_float_1>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, sw_double_1>); -static_assert( std::is_assignable_v, sw_half_2>); -static_assert( !std::is_assignable_v, sw_float_2>); -static_assert( !std::is_assignable_v, sw_double_2>); - -static_assert( std::is_assignable_v, half>); -static_assert( std::is_assignable_v, float>); -static_assert( std::is_assignable_v, double>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, vec>); -static_assert( std::is_assignable_v, vec>); -static_assert( std::is_assignable_v, vec>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, sw_half_1>); -static_assert( std::is_assignable_v, sw_float_1>); -static_assert( std::is_assignable_v, sw_double_1>); -static_assert( !std::is_assignable_v, sw_half_2>); -static_assert( !std::is_assignable_v, sw_float_2>); -static_assert( !std::is_assignable_v, sw_double_2>); - -static_assert( std::is_assignable_v, half>); -static_assert( std::is_assignable_v, float>); -static_assert( std::is_assignable_v, double>); +static_assert( std::is_assignable_v, half>); +static_assert( std::is_assignable_v, float>); +static_assert( std::is_assignable_v, double>); #if __SYCL_DEVICE_ONLY__ -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, vec>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, vec>); #else -static_assert( !std::is_assignable_v, vec>); +static_assert( !std::is_assignable_v, vec>); #endif -static_assert( std::is_assignable_v, vec>); -static_assert( std::is_assignable_v, vec>); -static_assert(EXCEPT_IN_PREVIEW std::is_assignable_v, sw_half_1>); -static_assert( std::is_assignable_v, sw_float_1>); -static_assert( std::is_assignable_v, sw_double_1>); -static_assert( !std::is_assignable_v, sw_half_2>); -static_assert( std::is_assignable_v, sw_float_2>); -static_assert( !std::is_assignable_v, sw_double_2>); +static_assert( std::is_assignable_v, vec>); +static_assert( std::is_assignable_v, vec>); +static_assert(EXCEPT_IF_NEW_VEC_IMPL std::is_assignable_v, sw_half_1>); +static_assert( std::is_assignable_v, sw_float_1>); +static_assert( std::is_assignable_v, sw_double_1>); +static_assert( !std::is_assignable_v, sw_half_2>); +static_assert( std::is_assignable_v, sw_float_2>); +static_assert( !std::is_assignable_v, sw_double_2>); diff --git a/sycl/test/basic_tests/vectors/constexpr-constructor.cpp b/sycl/test/basic_tests/vectors/constexpr-constructor.cpp index 9ff8a80ba0836..2a23c2a0bafcd 100644 --- a/sycl/test/basic_tests/vectors/constexpr-constructor.cpp +++ b/sycl/test/basic_tests/vectors/constexpr-constructor.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl -fsyntax-only -Wno-deprecated-declarations %s -// RUN: %if preview-breaking-changes-supported %{%clangxx -fsycl -fsyntax-only -fpreview-breaking-changes -Wno-deprecated-declarations %s%} +// RUN: %clangxx -fsycl -fsyntax-only -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -Wno-deprecated-declarations %s #include diff --git a/sycl/test/basic_tests/vectors/cxx_conversions.cpp b/sycl/test/basic_tests/vectors/cxx_conversions.cpp index 4bed8d6da86a0..e4afd1a157409 100644 --- a/sycl/test/basic_tests/vectors/cxx_conversions.cpp +++ b/sycl/test/basic_tests/vectors/cxx_conversions.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -fsyntax-only %s -fpreview-breaking-changes +// RUN: %clangxx -fsycl -fsyntax-only %s -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 // RUN: %clangxx -fsycl -fsyntax-only %s #include @@ -36,103 +36,103 @@ using sw_float_2 = decltype(std::declval>().swizzle<1, 2>()); using sw_double_1 = decltype(std::declval>().swizzle<1>()); using sw_double_2 = decltype(std::declval>().swizzle<1, 2>()); -#if __INTEL_PREVIEW_BREAKING_CHANGES -#define EXCEPT_IN_PREVIEW ! -#define PREVIEW_ONLY +#if defined(__SYCL_USE_LIBSYCL8_VEC_IMPL) && (__SYCL_USE_LIBSYCL8_VEC_IMPL) +#define EXCEPT_NEW_VEC_IMPL +#define NEW_VEC_IMPL_ONLY ! #else -#define EXCEPT_IN_PREVIEW -#define PREVIEW_ONLY ! +#define EXCEPT_NEW_VEC_IMPL ! +#define NEW_VEC_IMPL_ONLY #endif // clang-format off -// IN_PREVIEW_ONLY condition<> -// EXCEPT_IN_PREVIEW condition<> - -static_assert( std::is_invocable_v); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v); -static_assert( std::is_invocable_v); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v); -static_assert( std::is_invocable_v>); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v>); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v>); - -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v); -static_assert( std::is_invocable_v); -static_assert( std::is_invocable_v); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v); -static_assert( std::is_invocable_v); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v>); -static_assert( std::is_invocable_v>); -static_assert(EXCEPT_IN_PREVIEW std::is_invocable_v>); - -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); - -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); -static_assert( !std::is_invocable_v); - -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); - -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); - -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( !is_explicitly_convertible_to_v>); -static_assert( !is_explicitly_convertible_to_v>); -static_assert( !is_explicitly_convertible_to_v>); -static_assert( !is_explicitly_convertible_to_v>); -static_assert( !is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( !is_explicitly_convertible_to_v>); -static_assert( !is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); -static_assert( is_explicitly_convertible_to_v>); - -static_assert( is_explicitly_convertible_to_v, half>); +// NEW_VEC_IMPL_ONLY condition<> +// EXCEPT_NEW_VEC_IMPL condition<> + +static_assert( std::is_invocable_v); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v); +static_assert( std::is_invocable_v); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v); +static_assert( std::is_invocable_v>); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v>); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v>); + +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v); +static_assert( std::is_invocable_v); +static_assert( std::is_invocable_v); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v); +static_assert( std::is_invocable_v); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v>); +static_assert( std::is_invocable_v>); +static_assert(EXCEPT_NEW_VEC_IMPL std::is_invocable_v>); + +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); + +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); +static_assert( !std::is_invocable_v); + +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); + +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); + +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( !is_explicitly_convertible_to_v>); +static_assert( !is_explicitly_convertible_to_v>); +static_assert( !is_explicitly_convertible_to_v>); +static_assert( !is_explicitly_convertible_to_v>); +static_assert( !is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( !is_explicitly_convertible_to_v>); +static_assert( !is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); +static_assert( is_explicitly_convertible_to_v>); + +static_assert( is_explicitly_convertible_to_v, half>); #if __SYCL_DEVICE_ONLY__ -static_assert( is_explicitly_convertible_to_v, float>); -static_assert( is_explicitly_convertible_to_v, double>); +static_assert( is_explicitly_convertible_to_v, float>); +static_assert( is_explicitly_convertible_to_v, double>); #else -static_assert(PREVIEW_ONLY is_explicitly_convertible_to_v, float>); -static_assert(PREVIEW_ONLY is_explicitly_convertible_to_v, double>); +static_assert(NEW_VEC_IMPL_ONLY is_explicitly_convertible_to_v, float>); +static_assert(NEW_VEC_IMPL_ONLY is_explicitly_convertible_to_v, double>); #endif -static_assert( is_explicitly_convertible_to_v, half>); -static_assert( is_explicitly_convertible_to_v, float>); -static_assert( is_explicitly_convertible_to_v, double>); +static_assert( is_explicitly_convertible_to_v, half>); +static_assert( is_explicitly_convertible_to_v, float>); +static_assert( is_explicitly_convertible_to_v, double>); diff --git a/sycl/test/basic_tests/vectors/negative.cpp b/sycl/test/basic_tests/vectors/negative.cpp index 7a9291d77882d..69883236f81de 100644 --- a/sycl/test/basic_tests/vectors/negative.cpp +++ b/sycl/test/basic_tests/vectors/negative.cpp @@ -2,7 +2,7 @@ // DataT or N produces a verbose error message. // // RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,error %s -// RUN: %if preview-breaking-changes-supported %{%clangxx %fsycl-host-only -fsyntax-only -fpreview-breaking-changes -Xclang -verify -Xclang -verify-ignore-unexpected=note,error %s%} +// RUN: %clangxx %fsycl-host-only -fsyntax-only -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -Xclang -verify -Xclang -verify-ignore-unexpected=note,error %s // Note: there is one more error being emitted: "requested alignemnt is not a // power of 2" It happens because in all cases above we weren't able to select diff --git a/sycl/test/basic_tests/vectors/size_one_checks.cpp b/sycl/test/basic_tests/vectors/size_one_checks.cpp index c1dbb7bfa20e0..bf8273632f4e8 100644 --- a/sycl/test/basic_tests/vectors/size_one_checks.cpp +++ b/sycl/test/basic_tests/vectors/size_one_checks.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl %s -o %t_default.out // RUN: %t_default.out -// RUN: %if preview-breaking-changes-supported %{ %clangxx -fsycl -fpreview-breaking-changes %s -o %t_vec.out %} -// RUN: %if preview-breaking-changes-supported %{ %t_vec.out %} +// RUN: %clangxx -fsycl -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 %s -o %t_vec.out +// RUN: %t_vec.out #include diff --git a/sycl/test/basic_tests/vectors/storage.cpp b/sycl/test/basic_tests/vectors/storage.cpp index bbb14cfe24227..a549b8d2a870e 100644 --- a/sycl/test/basic_tests/vectors/storage.cpp +++ b/sycl/test/basic_tests/vectors/storage.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl -Xclang -verify %s -fsyntax-only -// RUN: %clangxx -fsycl -Xclang -verify %s -fsyntax-only -fpreview-breaking-changes +// RUN: %clangxx -fsycl -Xclang -verify %s -fsyntax-only -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 // RUN: %clangxx -fsycl -Xclang -verify %s -fsyntax-only -D__SYCL_USE_PLAIN_ARRAY_AS_VEC_STORAGE=1 // expected-no-diagnostics diff --git a/sycl/test/basic_tests/vectors/vectors.cpp b/sycl/test/basic_tests/vectors/vectors.cpp index 9ef5dcae5bf63..e5c40ae02fc39 100644 --- a/sycl/test/basic_tests/vectors/vectors.cpp +++ b/sycl/test/basic_tests/vectors/vectors.cpp @@ -1,7 +1,7 @@ // RUN: %clangxx -fsycl %s -o %t_default.out // RUN: %t_default.out -// RUN: %if preview-breaking-changes-supported %{ %clangxx -fsycl -fpreview-breaking-changes %s -o %t_vec.out %} -// RUN: %if preview-breaking-changes-supported %{ %t_vec.out %} +// RUN: %clangxx -fsycl -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 %s -o %t_vec.out +// RUN: %t_vec.out // XFAIL: libcxx // XFAIL-TRACKER: https://github.com/intel/llvm/issues/19616 diff --git a/sycl/test/check_device_code/vector/as_preview.cpp b/sycl/test/check_device_code/vector/as_new_vec.cpp similarity index 89% rename from sycl/test/check_device_code/vector/as_preview.cpp rename to sycl/test/check_device_code/vector/as_new_vec.cpp index 16aadcb3a837d..9bb401ab71f9d 100644 --- a/sycl/test/check_device_code/vector/as_preview.cpp +++ b/sycl/test/check_device_code/vector/as_new_vec.cpp @@ -1,12 +1,12 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --functions "as" --include-generated-funcs --version 4 -// RUN: %clangxx -O3 -fsycl -fsycl-device-only -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -o - %s -fpreview-breaking-changes +// RUN: %clangxx -O3 -fsycl -fsycl-device-only -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -o - %s // Windows/linux have some slight differences in IR generation (function // arguments passing and long/long long differences/mangling) that could // complicate test updates while not improving test coverage. Limiting to linux // should be fine. -// REQUIRES: linux && preview-breaking-changes-supported +// REQUIRES: linux #include diff --git a/sycl/test/check_device_code/vector/as.cpp b/sycl/test/check_device_code/vector/as_old_vec.cpp similarity index 88% rename from sycl/test/check_device_code/vector/as.cpp rename to sycl/test/check_device_code/vector/as_old_vec.cpp index 96a4c7a951e56..4c02026b105ab 100644 --- a/sycl/test/check_device_code/vector/as.cpp +++ b/sycl/test/check_device_code/vector/as_old_vec.cpp @@ -2,7 +2,7 @@ // NOTE: "%if preview-breaking-changes-supported" guard has to be temporarily // NOTE: removed/disabled to re-generate the checks. -// RUN: %clangxx -O3 -fsycl -fsycl-device-only -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -o - %s | FileCheck %s +// RUN: %clangxx -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -O3 -fsycl -fsycl-device-only -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -o - %s | FileCheck %s // Windows/linux have some slight differences in IR generation (function // arguments passing and long/long long differences/mangling) that could diff --git a/sycl/test/check_device_code/vector/bf16_builtins_preview.cpp b/sycl/test/check_device_code/vector/bf16_builtins_new_vec.cpp similarity index 98% rename from sycl/test/check_device_code/vector/bf16_builtins_preview.cpp rename to sycl/test/check_device_code/vector/bf16_builtins_new_vec.cpp index 1377b7c374b73..6aa09e56ddfb7 100644 --- a/sycl/test/check_device_code/vector/bf16_builtins_preview.cpp +++ b/sycl/test/check_device_code/vector/bf16_builtins_new_vec.cpp @@ -3,13 +3,13 @@ // Had to increase inline threashold for this test to force inline of the vec<> // math builtins. -// RUN: %clangxx -I %sycl_include -fpreview-breaking-changes -mllvm -inline-threshold=400 -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers -O3 -fsycl-device-only %s -o - | FileCheck %s +// RUN: %clangxx -I %sycl_include -mllvm -inline-threshold=400 -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers -O3 -fsycl-device-only %s -o - | FileCheck %s // Windows/linux have some slight differences in IR generation (function // arguments passing and long/long long differences/mangling) that could // complicate test updates while not improving test coverage. Limiting to linux // should be fine. -// REQUIRES: linux && preview-breaking-changes-supported +// REQUIRES: linux // This test checks the device code generated for vec math builtins. #include diff --git a/sycl/test/check_device_code/vector/bf16_builtins.cpp b/sycl/test/check_device_code/vector/bf16_builtins_old_vec.cpp similarity index 99% rename from sycl/test/check_device_code/vector/bf16_builtins.cpp rename to sycl/test/check_device_code/vector/bf16_builtins_old_vec.cpp index 8c5ddbda63a11..d9743d96be1e9 100644 --- a/sycl/test/check_device_code/vector/bf16_builtins.cpp +++ b/sycl/test/check_device_code/vector/bf16_builtins_old_vec.cpp @@ -3,7 +3,7 @@ // Had to increase inline threashold for this test to force inline of the vec<> // math builtins. -// RUN: %clangxx -I %sycl_include -mllvm -inline-threshold=400 -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers -O3 -fsycl-device-only %s -o - | FileCheck %s +// RUN: %clangxx -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -I %sycl_include -mllvm -inline-threshold=400 -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers -O3 -fsycl-device-only %s -o - | FileCheck %s // Windows/linux have some slight differences in IR generation (function // arguments passing and long/long long differences/mangling) that could diff --git a/sycl/test/check_device_code/vector/convert_bfloat_preview.cpp b/sycl/test/check_device_code/vector/convert_bfloat_new_vec.cpp similarity index 100% rename from sycl/test/check_device_code/vector/convert_bfloat_preview.cpp rename to sycl/test/check_device_code/vector/convert_bfloat_new_vec.cpp diff --git a/sycl/test/check_device_code/vector/convert_bfloat.cpp b/sycl/test/check_device_code/vector/convert_bfloat_old_vec.cpp similarity index 100% rename from sycl/test/check_device_code/vector/convert_bfloat.cpp rename to sycl/test/check_device_code/vector/convert_bfloat_old_vec.cpp diff --git a/sycl/test/check_device_code/vector/math_ops_preview.cpp b/sycl/test/check_device_code/vector/math_ops_new_vec.cpp similarity index 99% rename from sycl/test/check_device_code/vector/math_ops_preview.cpp rename to sycl/test/check_device_code/vector/math_ops_new_vec.cpp index db2f10d208731..fec94dd11c4e3 100644 --- a/sycl/test/check_device_code/vector/math_ops_preview.cpp +++ b/sycl/test/check_device_code/vector/math_ops_new_vec.cpp @@ -1,13 +1,13 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals none --version 4 // NOTE: ..., followed by some manual cleanup. -// RUN: %clangxx -I %sycl_include -fpreview-breaking-changes -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers -fsycl-device-only %s -o - | FileCheck %s +// RUN: %clangxx -I %sycl_include -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers -fsycl-device-only %s -o - | FileCheck %s // Windows/linux have some slight differences in IR generation (function // arguments passing and long/long long differences/mangling) that could // complicate test updates while not improving test coverage. Limiting to linux // should be fine. -// REQUIRES: linux && preview-breaking-changes-supported +// REQUIRES: linux // This test checks // (1) the storage type of sycl::vec on device for all data types, and diff --git a/sycl/test/check_device_code/vector/math_ops.cpp b/sycl/test/check_device_code/vector/math_ops_old_vec.cpp similarity index 99% rename from sycl/test/check_device_code/vector/math_ops.cpp rename to sycl/test/check_device_code/vector/math_ops_old_vec.cpp index 843588263e28a..2c6db53deebd0 100644 --- a/sycl/test/check_device_code/vector/math_ops.cpp +++ b/sycl/test/check_device_code/vector/math_ops_old_vec.cpp @@ -1,7 +1,7 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals none --version 4 // NOTE: ..., followed by some manual cleanup. -// RUN: %clangxx -I %sycl_include -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers -fsycl-device-only %s -o - | FileCheck %s +// RUN: %clangxx -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -I %sycl_include -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers -fsycl-device-only %s -o - | FileCheck %s // Windows/linux have some slight differences in IR generation (function // arguments passing and long/long long differences/mangling) that could diff --git a/sycl/test/regression/vec-logical-ops.cpp b/sycl/test/regression/vec-logical-ops.cpp index a5844a476bbbc..a69e79057bfbc 100644 --- a/sycl/test/regression/vec-logical-ops.cpp +++ b/sycl/test/regression/vec-logical-ops.cpp @@ -1,5 +1,5 @@ // RUN: %clangxx -fsycl -fsyntax-only %s -// RUN: %clangxx -fsycl -fpreview-breaking-changes -fsyntax-only %s +// RUN: %clangxx -fsycl -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -fsyntax-only %s #include diff --git a/sycl/test/regression/vec_array_windows.cpp b/sycl/test/regression/vec_array_windows.cpp index d9511de372f54..c7694ce2ca3a0 100644 --- a/sycl/test/regression/vec_array_windows.cpp +++ b/sycl/test/regression/vec_array_windows.cpp @@ -6,7 +6,7 @@ // REQUIRES: windows // RUN: %clangxx -fsycl -D_DEBUG %s -fsycl-device-only -Xclang -verify %s -Xclang -verify-ignore-unexpected=note,warning -// RUN: %if preview-breaking-changes-supported %{ %clangxx -fsycl -fpreview-breaking-changes -D_DEBUG -fsycl-device-only %s %} +// RUN: %clangxx -fsycl -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -D_DEBUG -fsycl-device-only %s #include From 5f9928b815384d5110f48c388b921cb7864ff421 Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Wed, 26 Nov 2025 14:19:43 -0800 Subject: [PATCH 3/4] Change renamed files --- sycl/test/check_device_code/vector/convert_bfloat_new_vec.cpp | 4 ++-- sycl/test/check_device_code/vector/convert_bfloat_old_vec.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/test/check_device_code/vector/convert_bfloat_new_vec.cpp b/sycl/test/check_device_code/vector/convert_bfloat_new_vec.cpp index be30f5066234b..3f8e458ae78a0 100644 --- a/sycl/test/check_device_code/vector/convert_bfloat_new_vec.cpp +++ b/sycl/test/check_device_code/vector/convert_bfloat_new_vec.cpp @@ -1,8 +1,8 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals none --version 4 // NOTE: ..., followed by some manual cleanup. -// RUN: %clangxx -I %sycl_include -fpreview-breaking-changes -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers %s -fsycl-device-only -o - | FileCheck %s -// REQUIRES: linux && preview-breaking-changes-supported +// RUN: %clangxx -I %sycl_include -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers %s -fsycl-device-only -o - | FileCheck %s +// REQUIRES: linux #include #include diff --git a/sycl/test/check_device_code/vector/convert_bfloat_old_vec.cpp b/sycl/test/check_device_code/vector/convert_bfloat_old_vec.cpp index 5000bc2193d45..be6c6e0523a7b 100644 --- a/sycl/test/check_device_code/vector/convert_bfloat_old_vec.cpp +++ b/sycl/test/check_device_code/vector/convert_bfloat_old_vec.cpp @@ -1,7 +1,7 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --check-globals none --version 4 // NOTE: ..., followed by some manual cleanup. -// RUN: %clangxx -I %sycl_include -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers %s -fsycl-device-only -o - | FileCheck %s +// RUN: %clangxx -D__SYCL_USE_LIBSYCL8_VEC_IMPL=1 -I %sycl_include -fno-discard-value-names -S -emit-llvm -fno-sycl-instrument-device-code -Xclang -disable-lifetime-markers %s -fsycl-device-only -o - | FileCheck %s // REQUIRES: linux #include From c38e15e1213727d57e1ddcac6ee5d924062d7514 Mon Sep 17 00:00:00 2001 From: Artur Gainullin Date: Wed, 26 Nov 2025 14:30:14 -0800 Subject: [PATCH 4/4] Format --- sycl/test/check_device_code/vector/as_old_vec.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/test/check_device_code/vector/as_old_vec.cpp b/sycl/test/check_device_code/vector/as_old_vec.cpp index 4c02026b105ab..89a7c214136c5 100644 --- a/sycl/test/check_device_code/vector/as_old_vec.cpp +++ b/sycl/test/check_device_code/vector/as_old_vec.cpp @@ -12,7 +12,8 @@ #include -template SYCL_EXTERNAL sycl::vec sycl::vec::as>() const; +template SYCL_EXTERNAL sycl::vec +sycl::vec::as>() const; // CHECK-LABEL: define weak_odr dso_local spir_func void @_ZNK4sycl3_V13vecIfLi4EE2asINS1_IiLi4EEEEET_v( // CHECK-SAME: ptr addrspace(4) dead_on_unwind noalias writable sret(%"class.sycl::_V1::vec") align 16 [[AGG_RESULT:%.*]], ptr addrspace(4) noundef align 16 dereferenceable_or_null(16) [[THIS:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] comdat align 2 !sycl_fixed_targets [[META6:![0-9]+]] { // CHECK-NEXT: entry: