[clang] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (PR #146854)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 3 03:50:54 PDT 2025


https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/146854

The test checks x86 target in fsycl-is-device mode. x86 is not a valid offloading target and IMO test meant to check fsycl-is-host mode to make sure host invocations of __builtin_sycl_unique_stable_name work correctly. This also switches the test to use sycl_entry_point attribute instead of sycl_kernel because the intention for the future SYCL changes is to use sycl_entry_point and eventually remove sycl_kernel attribute when sycl_entry_point supports enough SYCL cases.

>From 9a640eefb5d27a65f236b5f7df1398bdf1bcc017 Mon Sep 17 00:00:00 2001
From: "Podchishchaeva, Mariya" <mariya.podchishchaeva at intel.com>
Date: Thu, 3 Jul 2025 03:46:41 -0700
Subject: [PATCH] [NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff
 test

The test checks x86 target in fsycl-is-device mode. x86 is not a valid
offloading target and IMO test meant to check fsycl-is-host mode to make
sure host invocations of __builtin_sycl_unique_stable_name work
correctly.
---
 .../test/CodeGenSYCL/unique_stable_name_windows_diff.cpp  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/clang/test/CodeGenSYCL/unique_stable_name_windows_diff.cpp b/clang/test/CodeGenSYCL/unique_stable_name_windows_diff.cpp
index 7dd08a0c89255..70a09e4afd275 100644
--- a/clang/test/CodeGenSYCL/unique_stable_name_windows_diff.cpp
+++ b/clang/test/CodeGenSYCL/unique_stable_name_windows_diff.cpp
@@ -1,19 +1,19 @@
 // RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s '-D$ADDRSPACE=addrspace(1) '
-// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s '-D$ADDRSPACE='
+// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fsycl-is-host -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s '-D$ADDRSPACE='
 
 
 template<typename KN, typename Func>
-__attribute__((sycl_kernel)) void kernel(Func F){
+[[clang::sycl_entry_point]] void kernel(Func F){
   F();
 }
 
 template<typename KN, typename Func>
-__attribute__((sycl_kernel)) void kernel2(Func F){
+[[clang::sycl_entry_point]] void kernel2(Func F){
   F(1);
 }
 
 template<typename KN, typename Func>
-__attribute__((sycl_kernel)) void kernel3(Func F){
+[[clang::sycl_entry_point]] void kernel3(Func F){
   F(1.1);
 }
 



More information about the cfe-commits mailing list