Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
2d50750
remove dummy bin
jinge90 Nov 24, 2025
9c76946
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Nov 26, 2025
fe628a9
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Nov 27, 2025
7a7e62b
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Nov 28, 2025
4de8fa5
merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Dec 1, 2025
e52bb98
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Dec 4, 2025
4b63322
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Dec 10, 2025
544d912
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Dec 12, 2025
2ad6143
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Dec 17, 2025
cf391d9
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Dec 24, 2025
e0f2a15
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Jan 6, 2026
aa7a97c
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Jan 12, 2026
9244680
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Jan 30, 2026
b4b5793
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Feb 3, 2026
50f8f75
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Feb 4, 2026
ebc7166
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Feb 4, 2026
159748c
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Feb 4, 2026
17362e0
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Mar 3, 2026
9e38387
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Mar 5, 2026
dd1e30b
Merge remote-tracking branch 'origin/sycl' into sycl
jinge90 Mar 5, 2026
01fa557
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Mar 25, 2026
78adbd8
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Mar 26, 2026
c681812
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Apr 9, 2026
0726c0d
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Apr 10, 2026
f96405d
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Apr 14, 2026
d1f74f4
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Apr 21, 2026
eac7780
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 Apr 24, 2026
ff388a2
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 May 7, 2026
fc841dd
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 May 8, 2026
615606d
Merge remote-tracking branch 'upstream/sycl' into sycl
jinge90 May 14, 2026
508a311
[SYCL] Enable LLVM libc for SPIRV64 in SYCL
jinge90 May 14, 2026
fb7eec6
build spirv64 libc with sycl toolchain
jinge90 May 14, 2026
0145013
build all libm functions for spirv
jinge90 May 14, 2026
1084d29
build libc ok
jinge90 May 15, 2026
6885c28
Add libm.bc in old driver mode
jinge90 May 15, 2026
8c60243
remove log1p
jinge90 May 15, 2026
838c4ce
Merge remote-tracking branch 'upstream/sycl' into enable_libc_spirv64
jinge90 May 18, 2026
4904c74
disable fmodf in libm
jinge90 May 18, 2026
5935b32
make windows to build
jinge90 May 18, 2026
8052634
fix clang format
jinge90 May 18, 2026
67df1df
guard win specific code
jinge90 May 18, 2026
829bfbf
fix kernel compiler
jinge90 May 19, 2026
d078d4e
fix clang-format
jinge90 May 19, 2026
268a9a9
fix kernel compiler tests
jinge90 May 19, 2026
35ce1c1
fix clang driver lit
jinge90 May 19, 2026
e62e4db
fix sycl-jit
jinge90 May 20, 2026
0e36c4c
fix KernelCompiler failure
jinge90 May 20, 2026
88a030b
update license header #1
jinge90 May 20, 2026
ecffb94
disable generic impl using double for fp32
jinge90 May 20, 2026
209637d
update license header
jinge90 May 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,16 @@ def do_configure(args, passthrough_args):
"-DBUG_REPORT_URL=https://github.com/intel/llvm/issues",
]

llvm_spirv64_runtimes = "libc"
runtime_targets += ";spirv64-unknown-unknown"
cmake_cmd.extend(
[
"-DRUNTIMES_spirv64-unknown-unknown_LLVM_ENABLE_RUNTIMES={}".format(
llvm_spirv64_runtimes
),
]
)

if llvm_enable_runtimes:
cmake_cmd.extend(
[
Expand All @@ -225,19 +235,18 @@ def do_configure(args, passthrough_args):

if libclc_enabled:
for target in runtime_targets.split(";"):
if target == "default":
if target == "default" or target == "spirv64-unknown-unknown":
continue
cmake_cmd.extend(
[
f"-DRUNTIMES_{target}_LLVM_ENABLE_RUNTIMES=libclc",
]
)
cmake_cmd.extend(
[
"-DLLVM_RUNTIME_TARGETS={}".format(runtime_targets),
]
)

cmake_cmd.extend(
[
"-DLLVM_RUNTIME_TARGETS={}".format(runtime_targets),
]
)
if args.l0_headers and args.l0_loader:
cmake_cmd.extend(
[
Expand Down
9 changes: 9 additions & 0 deletions clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5852,6 +5852,15 @@ class OffloadingActionBuilder final {
SmallVector<SmallString<128>, 4> LibLocCandidates;
SYCLInstallation.getSYCLDeviceLibPath(LibLocCandidates);

if (TC->getTriple().isSPIROrSPIRV()) {
SmallVector<SmallString<128>, 4> OriginalLibLocs(LibLocCandidates);
for (auto LibLoc : OriginalLibLocs) {
SmallString<128> SPIRVLibLoc(LibLoc);
llvm::sys::path::append(SPIRVLibLoc, "spirv64-unknown-unknown");
if (llvm::sys::fs::exists(SPIRVLibLoc))
LibLocCandidates.emplace_back(SPIRVLibLoc);
}
}
const toolchains::SYCLToolChain &SYCLTC =
static_cast<const toolchains::SYCLToolChain &>(*TC);
SmallVector<ToolChain::BitCodeLibraryInfo, 8> DeviceLibraries;
Expand Down
14 changes: 13 additions & 1 deletion clang/lib/Driver/ToolChains/SYCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ SYCLToolChain::getDeviceLibNames(const Driver &D,
#if defined(_WIN32)
"libsycl-msvc-math",
#endif
"libsycl-imf"};
"libsycl-imf", "libm"};
auto addLibraries = [&](const SYCLDeviceLibsList &LibsList) {
for (const StringRef &Lib : LibsList)
addLibToList(Args.MakeArgString(Lib + ".bc"));
Expand Down Expand Up @@ -821,6 +821,9 @@ const char *SYCL::Linker::constructLLVMLinkCommand(
InputFilename.contains("libspirv") ||
InputFilename.contains("libdevice")))
return true;
if ((InputFilename.compare("libm.bc") == 0) &&
(FileName.find("spirv64-unknown-unknown") != std::string::npos))
return true;
StringRef LibSyclPrefix("libsycl-");
if (!InputFilename.starts_with(LibSyclPrefix) ||
!InputFilename.ends_with(LibPostfix))
Expand Down Expand Up @@ -1908,6 +1911,15 @@ SYCLToolChain::getDeviceLibs(
SmallVector<SmallString<128>, 4> LibraryPaths;
SYCLInstallation.getSYCLDeviceLibPath(LibraryPaths);

if (getTriple().isSPIROrSPIRV()) {
SmallVector<SmallString<128>, 4> OriginalLibraryPaths(LibraryPaths);
for (auto LP : OriginalLibraryPaths) {
SmallString<128> SPIRVLibraryPath(LP);
llvm::sys::path::append(SPIRVLibraryPath, "spirv64-unknown-unknown");
if (llvm::sys::fs::exists(SPIRVLibraryPath))
LibraryPaths.emplace_back(SPIRVLibraryPath);
}
}
// Formulate all of the device libraries needed for this compilation.
SmallVector<BitCodeLibraryInfo, 8> DeviceLibs =
getDeviceLibNames(getDriver(), DriverArgs, getTriple());
Expand Down
Empty file.
12 changes: 6 additions & 6 deletions clang/test/Driver/clang-linker-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// -------
// Generate .o file as linker wrapper input.
//
// RUN: %clang %s -fsycl -fsycl-targets=spir64-unknown-unknown -c --offload-new-driver -o %t.o
// RUN: %clang %s -fsycl -fsycl-targets=intel_gpu_pvc -c --offload-new-driver -o %t_aot_gpu.o
// RUN: %clang %s -fsycl -fsycl-targets=spir64_x86_64 -c --offload-new-driver -o %t_aot_cpu.o
// RUN: %clang %s -fsycl -fsycl-targets=spir64-unknown-unknown -c --offload-new-driver --no-offloadlib -o %t.o
// RUN: %clang %s -fsycl -fsycl-targets=intel_gpu_pvc -c --offload-new-driver --no-offloadlib -o %t_aot_gpu.o
// RUN: %clang %s -fsycl -fsycl-targets=spir64_x86_64 -c --offload-new-driver --no-offloadlib -o %t_aot_cpu.o
// RUN: %clang %s -fsycl -fsycl-targets=nvptx64-nvidia-cuda --cuda-gpu-arch=sm_50 -nocudalib -fno-sycl-libspirv -c --offload-new-driver -o %t_nvptx.o
// RUN: %clang %s -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend=amdgcn-amd-amdhsa --offload-arch=gfx803 -fgpu-rdc -nogpulib -fno-sycl-libspirv -c --offload-new-driver -o %t_amdgcn.o
// RUN: %clang %s -fsycl -fsycl-targets=native_cpu -fno-sycl-libspirv -c --offload-new-driver -o %t_native_cpu.o
Expand Down Expand Up @@ -105,7 +105,7 @@
// -------
// Generate .o file as linker wrapper input.
//
// RUN: %clang %s -fsycl -fsycl-targets=intel_gpu_pvc -c --offload-new-driver -o %t1.o
// RUN: %clang %s -fsycl -fsycl-targets=intel_gpu_pvc -c --offload-new-driver --no-offloadlib -o %t1.o
//
// Generate .bc file as SYCL device library file.
//
Expand Down Expand Up @@ -136,7 +136,7 @@
// -------
// Generate .o file as linker wrapper input.
//
// RUN: %clang %s -fsycl -fsycl-targets=spir64_x86_64 -c --offload-new-driver -o %t2.o
// RUN: %clang %s -fsycl -fsycl-targets=spir64_x86_64 -c --offload-new-driver --no-offloadlib -o %t2.o
//
// Generate .bc file as SYCL device library file.
//
Expand Down Expand Up @@ -251,7 +251,7 @@
// -------
// Generate .o file as linker wrapper input.
//
// RUN: %clang %s -fsycl -fsycl-targets=spir64-unknown-unknown -c --offload-new-driver -o %t5.o
// RUN: %clang %s -fsycl -fsycl-targets=spir64-unknown-unknown -c --offload-new-driver --no-offloadlib -o %t5.o
//
// RUN: clang-linker-wrapper -sycl-post-link-options="SYCL_POST_LINK_OPTIONS" -llvm-spirv-options="LLVM_SPIRV_OPTIONS" "--host-triple=x86_64-unknown-linux-gnu" "--linker-path=/usr/bin/ld" "--" HOST_LINKER_FLAGS "-dynamic-linker" HOST_DYN_LIB "-o" "a.out" HOST_LIB_PATH HOST_STAT_LIB %t5.o --bitcode-library=spir64-unknown-unknown=%S/Inputs/SYCL/lib/libsycl-crt.bc -sycl-device-library-location=%S/Inputs/SYCL/lib --dry-run 2>&1 | FileCheck -check-prefix=CHK-CMDS-DEVICE-LIB-DIR %s
// CHK-CMDS-DEVICE-LIB-DIR: spirv-to-ir-wrapper{{.*}} --llvm-spirv-opts --spirv-preserve-auxdata --spirv-target-env=SPV-IR --spirv-builtin-format=global
Expand Down
8 changes: 4 additions & 4 deletions clang/test/Driver/sycl-device-traits-macros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/// In this case, where no specific sycl targets are passed, the sycl
/// targets are spir64 and the host target (e.g. x86_64). We expect two
/// occurrences of the macro definition, one for host and one for device.
// RUN: %clang -fsycl --no-offload-new-driver -### %s 2>&1 \
// RUN: %clang -fsycl --no-offload-new-driver --no-offloadlib -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-ENABLED %s
// RUN: %clang -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-ENABLED %s
Expand All @@ -18,7 +18,7 @@
/// In this case the sycl targets are spir64, spir64_gen and the host
/// target (e.g. x86_64). We expect three occurrences of the macro
/// definition, one for host and one for each of the two devices.
// RUN: %clang -fsycl --no-offload-new-driver -fsycl-targets=spir64,spir64_gen -### %s 2>&1 \
// RUN: %clang -fsycl --no-offload-new-driver --no-offloadlib -fsycl-targets=spir64,spir64_gen -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-SYCL-TARGETS %s
// RUN: %clang -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64,spir64_gen -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-SYCL-TARGETS %s
Expand All @@ -35,11 +35,11 @@

/// Check device traits macros are defined if sycl is enabled:
/// Verify that when compiling for multiple targets and maySupportOtherAspects
/// is false for all of the targets, the driver will never add the
/// is false for all of the targets, the driver --no-offloadlib will never add the
/// __SYCL_ANY_DEVICE_HAS_ANY_ASPECT__ macro to the compilation arguments.
/// NOTE: Both intel_gpu_pvc and amd_gpu_gfx906 have non-empty aspects lists and
/// set maySupportOtherAspects to false, hence why they are used for this test.
// RUN: %clangxx -fsycl --no-offload-new-driver -nogpulib -fsycl-targets=intel_gpu_pvc,amd_gpu_gfx906 \
// RUN: %clangxx -fsycl --no-offload-new-driver --no-offloadlib -nogpulib -fsycl-targets=intel_gpu_pvc,amd_gpu_gfx906 \
// RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-SYCL-TARGETS-NO-MAY-SUPPORT-OTHER-ASPECTS %s
// RUN: %clangxx -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -nogpulib -fsycl-targets=intel_gpu_pvc,amd_gpu_gfx906 \
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-esimd-force-stateless-mem.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

/// Verify that the driver option is translated to corresponding options
/// Verify that the driver --no-offloadlib option is translated to corresponding options
/// to host/device compilation and sycl-post-link.

// Case1: Check that the enforcing is turned on by default.
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-fsyclbin.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Tests behaviors of -fsyclbin

/// -fsyclbin is only used with the new offloading model.
// RUN: %clangxx -fsycl -fsyclbin --no-offload-new-driver %s -### 2>&1 \
// RUN: %clangxx -fsycl -fsyclbin --no-offload-new-driver --no-offloadlib %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=UNUSED
// UNUSED: warning: argument unused during compilation: '-fsyclbin'

Expand Down
30 changes: 15 additions & 15 deletions clang/test/Driver/sycl-no-rdc-fat-archive-old-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
// CHECK: 2: clang-offload-unbundler, {1}, tempfilelist
// CHECK: 3: spirv-to-ir-wrapper, {2}, tempfilelist, (device-sycl)
// CHECK: 4: input, "{{.*}}libsycl-crt.bc", ir, (device-sycl)
// CHECK: 10: linker, {4, {{.*}}}, ir, (device-sycl)
// CHECK: 11: linker, {3, 10}, ir, (device-sycl)
// CHECK: 12: foreach, {3, 11}, ir, (device-sycl)
// CHECK: 13: file-table-tform, {3, 12}, tempfilelist, (device-sycl)
// CHECK: 14: sycl-post-link, {13}, tempfiletable, (device-sycl)
// CHECK: 15: foreach, {13, 14}, tempfiletable, (device-sycl)
// CHECK: 16: file-table-tform, {15}, tempfilelist, (device-sycl)
// CHECK: 17: file-table-tform, {15}, tempfilelist, (device-sycl)
// CHECK: 18: foreach, {13, 17}, tempfilelist, (device-sycl)
// CHECK: 19: file-table-tform, {18}, tempfilelist, (device-sycl)
// CHECK: 20: llvm-spirv, {19}, tempfilelist, (device-sycl)
// CHECK: 21: file-table-tform, {16, 20}, tempfiletable, (device-sycl)
// CHECK: 22: clang-offload-wrapper, {21}, object, (device-sycl)
// CHECK: 23: offload, "device-sycl (spir64-unknown-unknown)" {22}, object
// CHECK: 24: linker, {0, 23}, image, (host-sycl)
// CHECK: 11: linker, {4, {{.*}}}, ir, (device-sycl)
// CHECK: 12: linker, {3, 11}, ir, (device-sycl)
// CHECK: 13: foreach, {3, 12}, ir, (device-sycl)
// CHECK: 14: file-table-tform, {3, 13}, tempfilelist, (device-sycl)
// CHECK: 15: sycl-post-link, {14}, tempfiletable, (device-sycl)
// CHECK: 16: foreach, {14, 15}, tempfiletable, (device-sycl)
// CHECK: 17: file-table-tform, {16}, tempfilelist, (device-sycl)
// CHECK: 18: file-table-tform, {16}, tempfilelist, (device-sycl)
// CHECK: 19: foreach, {14, 18}, tempfilelist, (device-sycl)
// CHECK: 20: file-table-tform, {19}, tempfilelist, (device-sycl)
// CHECK: 21: llvm-spirv, {20}, tempfilelist, (device-sycl)
// CHECK: 22: file-table-tform, {17, 21}, tempfiletable, (device-sycl)
// CHECK: 23: clang-offload-wrapper, {22}, object, (device-sycl)
// CHECK: 24: offload, "device-sycl (spir64-unknown-unknown)" {23}, object
// CHECK: 25: linker, {0, 24}, image, (host-sycl)
32 changes: 16 additions & 16 deletions clang/test/Driver/sycl-no-rdc-old-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
// CHECK: 12: preprocessor, {11}, c++-cpp-output, (device-sycl)
// CHECK: 13: compiler, {12}, ir, (device-sycl)
// CHECK: 18: input, "{{.*}}libsycl-crt.bc", ir, (device-sycl)
// CHECK: 24: linker, {18, {{.*}}}, ir, (device-sycl)
// CHECK: 25: linker, {4, 24}, ir, (device-sycl)
// CHECK: 26: sycl-post-link, {25}, tempfiletable, (device-sycl)
// CHECK: 27: file-table-tform, {26}, tempfilelist, (device-sycl)
// CHECK: 28: llvm-spirv, {27}, tempfilelist, (device-sycl)
// CHECK: 29: file-table-tform, {26, 28}, tempfiletable, (device-sycl)
// CHECK: 30: clang-offload-wrapper, {29}, object, (device-sycl)
// CHECK: 31: offload, "device-sycl (spir64-unknown-unknown)" {30}, object
// CHECK: 32: linker, {13, 24}, ir, (device-sycl)
// CHECK: 33: sycl-post-link, {32}, tempfiletable, (device-sycl)
// CHECK: 34: file-table-tform, {33}, tempfilelist, (device-sycl)
// CHECK: 35: llvm-spirv, {34}, tempfilelist, (device-sycl)
// CHECK: 36: file-table-tform, {33, 35}, tempfiletable, (device-sycl)
// CHECK: 37: clang-offload-wrapper, {36}, object, (device-sycl)
// CHECK: 38: offload, "device-sycl (spir64-unknown-unknown)" {37}, object
// CHECK: 39: linker, {8, 17, 31, 38}, image, (host-sycl)
// CHECK: 25: linker, {18, {{.*}}}, ir, (device-sycl)
// CHECK: 26: linker, {4, 25}, ir, (device-sycl)
// CHECK: 27: sycl-post-link, {26}, tempfiletable, (device-sycl)
// CHECK: 28: file-table-tform, {27}, tempfilelist, (device-sycl)
// CHECK: 29: llvm-spirv, {28}, tempfilelist, (device-sycl)
// CHECK: 30: file-table-tform, {27, 29}, tempfiletable, (device-sycl)
// CHECK: 31: clang-offload-wrapper, {30}, object, (device-sycl)
// CHECK: 32: offload, "device-sycl (spir64-unknown-unknown)" {31}, object
// CHECK: 33: linker, {13, 25}, ir, (device-sycl)
// CHECK: 34: sycl-post-link, {33}, tempfiletable, (device-sycl)
// CHECK: 35: file-table-tform, {34}, tempfilelist, (device-sycl)
// CHECK: 36: llvm-spirv, {35}, tempfilelist, (device-sycl)
// CHECK: 37: file-table-tform, {34, 36}, tempfiletable, (device-sycl)
// CHECK: 38: clang-offload-wrapper, {37}, object, (device-sycl)
// CHECK: 39: offload, "device-sycl (spir64-unknown-unknown)" {38}, object
// CHECK: 40: linker, {8, 17, 32, 39}, image, (host-sycl)
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-arch-intel-cpu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Tests the behaviors of using -fsycl --offload-new-driver
/// Tests the behaviors of using -fsycl --offload-new-driver --no-offloadlib
// --offload-arch=<intel-cpu-values>.

// SYCL AOT compilation to Intel CPUs using --offload-arch
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-arch-intel-gpu.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Tests the behaviors of using -fsycl --offload-new-driver
/// Tests the behaviors of using -fsycl --offload-new-driver --no-offloadlib
// --offload-arch=<intel-gpu-values>.

// SYCL AOT compilation to Intel GPUs using --offload-arch
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl-offload-jit.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Perform several driver tests for SYCL offloading for JIT
/// Perform several driver --no-offloadlib tests for SYCL offloading for JIT

/// Check the phases graph with -fsycl. Use of -fsycl enables offload
// RUN: %clang --offload-new-driver --sysroot=%S/Inputs/SYCL -ccc-print-phases --target=x86_64-unknown-linux-gnu -fsycl %s 2>&1 \
Expand Down Expand Up @@ -57,6 +57,6 @@
/// Check for option incompatibility with -fsycl
// RUN: not %clang -### -fsycl -ffreestanding %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-INCOMPATIBILITY %s -DINCOMPATOPT=-ffreestanding
// RUN: not %clang -### -fsycl --offload-new-driver -static-libstdc++ %s 2>&1 \
// RUN: not %clang -### -fsycl --offload-new-driver --no-offloadlib -static-libstdc++ %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-INCOMPATIBILITY %s -DINCOMPATOPT=-static-libstdc++
// CHK-INCOMPATIBILITY: error: invalid argument '[[INCOMPATOPT]]' not allowed with '-fsycl'
6 changes: 3 additions & 3 deletions clang/test/Driver/sycl-offload-new-driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
// CHK-FLOW-NEXT: clang-linker-wrapper{{.*}} "--host-triple=x86_64-unknown-linux-gnu"{{.*}} "--linker-path={{.*}}/ld" {{.*}} "[[CC1FINALOUT]]"

/// Verify phases used to generate SPIR-V instead of LLVM-IR
// RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsycl --offload-new-driver \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsycl --offload-new-driver --no-offloadlib \
// RUN: -fsycl-device-obj=spirv -ccc-print-phases %s 2>&1 \
// RUN: | FileCheck -check-prefix SPIRV_OBJ %s
// RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsycl --offload-new-driver \
// RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsycl --offload-new-driver --no-offloadlib \
// RUN: -fsycl-device-only -fsycl-device-obj=spirv \
// RUN: -ccc-print-phases %s 2>&1 \
// RUN: | FileCheck -check-prefix SPIRV_OBJ %s
Expand Down Expand Up @@ -113,7 +113,7 @@
/// Check phases with multiple intel_gpu settings
// RUN: %clangxx --target=x86_64-unknown-linux-gnu -fsycl \
// RUN: -fsycl-targets=intel_gpu_dg1,intel_gpu_pvc \
// RUN: --offload-new-driver -ccc-print-phases %s 2>&1 \
// RUN: --offload-new-driver --no-offloadlib -ccc-print-phases %s 2>&1 \
// RUN: | FileCheck -check-prefix=MULT_TARG_PHASES %s
// MULT_TARG_PHASES: 0: input, "[[INPUT:.+\.cpp]]", c++, (host-sycl)
// MULT_TARG_PHASES: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)
Expand Down
12 changes: 6 additions & 6 deletions clang/test/Driver/sycl-offload.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
///
/// Perform several driver tests for SYCL offloading
/// Perform several driver --no-offloadlib tests for SYCL offloading
///

// REQUIRES: x86-registered-target
Expand Down Expand Up @@ -33,7 +33,7 @@

/// ###########################################################################

/// Check error for no -fsycl --offload-new-driver option
/// Check error for no -fsycl --offload-new-driver --no-offloadlib option
// RUN: not %clang -### -fsycl-targets=spir64-unknown-unknown %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-NO-FSYCL %s
// RUN: not %clang_cl -### -fsycl-targets=spir64-unknown-unknown %s 2>&1 \
Expand Down Expand Up @@ -479,14 +479,14 @@
/// passing of a library should not trigger the unbundler
// RUN: touch %t.a
// RUN: touch %t.lib
// RUN: %clang -ccc-print-phases -fsycl --offload-new-driver -fno-sycl-instrument-device-code --no-offloadlib %t.a %s 2>&1 \
// RUN: %clang -ccc-print-phases -fsycl --offload-new-driver --no-offloadlib -fno-sycl-instrument-device-code --no-offloadlib %t.a %s 2>&1 \
// RUN: | FileCheck -check-prefix=LIB-UNBUNDLE-CHECK %s
// RUN: %clang_cl -ccc-print-phases -fsycl --offload-new-driver -fno-sycl-instrument-device-code --no-offloadlib %t.lib %s 2>&1 \
// RUN: %clang_cl -ccc-print-phases -fsycl --offload-new-driver --no-offloadlib -fno-sycl-instrument-device-code --no-offloadlib %t.lib %s 2>&1 \
// RUN: | FileCheck -check-prefix=LIB-UNBUNDLE-CHECK %s
// LIB-UNBUNDLE-CHECK-NOT: clang-offload-unbundler

/// passing of only a library should not create a device link
// RUN: %clang -ccc-print-phases -fsycl --offload-new-driver -lsomelib 2>&1 \
// RUN: %clang -ccc-print-phases -fsycl --offload-new-driver --no-offloadlib -lsomelib 2>&1 \
// RUN: | FileCheck -check-prefix=LIB-NODEVICE %s
// LIB-NODEVICE: 0: input, "somelib", object, (host-sycl)
// LIB-NODEVICE: 1: clang-linker-wrapper, {0}, image, (host-sycl)
Expand Down Expand Up @@ -612,7 +612,7 @@

/// ###########################################################################

/// Check that the needed -fsycl --offload-new-driver -fsycl-is-device and -fsycl-is-host options
/// Check that the needed -fsycl --offload-new-driver --no-offloadlib -fsycl-is-device and -fsycl-is-host options
/// are passed to all of the needed compilation steps regardless of final
/// phase.
// RUN: %clang -### -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -c %s 2>&1 | FileCheck -check-prefix=CHECK-OPTS %s
Expand Down
Loading
Loading