diff --git a/clang/lib/Driver/ToolChains/SYCL.cpp b/clang/lib/Driver/ToolChains/SYCL.cpp index f26a1374217d3..7f13c60d8c073 100644 --- a/clang/lib/Driver/ToolChains/SYCL.cpp +++ b/clang/lib/Driver/ToolChains/SYCL.cpp @@ -700,7 +700,7 @@ getDeviceLibrariesLegacy(const Compilation &C, const llvm::Triple &TargetTriple, StringRef LibSuffix = ".bc"; if (IsNewOffload) // For new offload model, we use packaged .bc files. - LibSuffix = IsWindowsMSVCEnv ? ".new.obj" : ".new.o"; + LibSuffix = IsWindowsMSVCEnv ? ".obj" : ".o"; auto addLibraries = [&](const SYCLDeviceLibsList &LibsList) { for (const DeviceLibOptInfo &Lib : LibsList) { if (!DeviceLibLinkInfo[Lib.DeviceLibOption]) @@ -807,7 +807,7 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple, StringRef LibSuffix = ".bc"; if (IsNewOffload) // For new offload model, we use packaged .bc files. - LibSuffix = IsWindowsMSVCEnv ? ".new.obj" : ".new.o"; + LibSuffix = IsWindowsMSVCEnv ? ".obj" : ".o"; auto addLibraries = [&](const SYCLDeviceLibsList &LibsList) { for (const StringRef &Lib : LibsList) { LibraryList.push_back(Args.MakeArgString(Twine(Lib) + LibSuffix)); @@ -1024,10 +1024,10 @@ const char *SYCL::Linker::constructLLVMLinkCommand( const bool IsSYCLNativeCPU = this->getToolChain().getTriple().isNativeCPU(); StringRef LibPostfix = ".bc"; - StringRef NewLibPostfix = ".new.o"; + StringRef NewLibPostfix = ".o"; if (HostTC->getTriple().isWindowsMSVCEnvironment() && C.getDriver().IsCLMode()) - NewLibPostfix = ".new.obj"; + NewLibPostfix = ".obj"; std::string FileName = this->getToolChain().getInputFilename(II); StringRef InputFilename = llvm::sys::path::filename(FileName); // NativeCPU links against libclc (libspirv) diff --git a/libdevice/cmake/modules/SYCLLibdevice.cmake b/libdevice/cmake/modules/SYCLLibdevice.cmake index ac23ef5dc14cb..50e308d7f8454 100644 --- a/libdevice/cmake/modules/SYCLLibdevice.cmake +++ b/libdevice/cmake/modules/SYCLLibdevice.cmake @@ -1,26 +1,26 @@ include(CheckCXXCompilerFlag) set(obj_binary_dir "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") -set(obj-new-offload_binary_dir "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") +set(obj-old-offload_binary_dir "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") if (MSVC) set(obj-suffix obj) - set(obj-new-offload-suffix new.obj) + set(obj-old-offload-suffix old.obj) set(spv_binary_dir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") set(install_dest_spv bin) set(devicelib_host_static_obj sycl-devicelib-host.lib) - set(devicelib_host_static_obj-new-offload sycl-devicelib-host.new.lib) + set(devicelib_host_static_obj-old-offload sycl-devicelib-host.old.lib) else() set(obj-suffix o) - set(obj-new-offload-suffix new.o) + set(obj-old-offload-suffix old.o) set(spv_binary_dir "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") set(install_dest_spv lib${LLVM_LIBDIR_SUFFIX}) set(devicelib_host_static_obj libsycl-devicelib-host.a) - set(devicelib_host_static_obj-new-offload libsycl-devicelib-host.new.a) + set(devicelib_host_static_obj-old-offload libsycl-devicelib-host.old.a) endif() set(spv-suffix spv) set(bc-suffix bc) set(bc_binary_dir "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") set(install_dest_obj lib${LLVM_LIBDIR_SUFFIX}) -set(install_dest_obj-new-offload lib${LLVM_LIBDIR_SUFFIX}) +set(install_dest_obj-old-offload lib${LLVM_LIBDIR_SUFFIX}) set(install_dest_bc lib${LLVM_LIBDIR_SUFFIX}) string(CONCAT sycl_targets_opt @@ -80,8 +80,8 @@ endif() add_custom_target(libsycldevice) -set(filetypes obj obj-new-offload spv bc) -set(filetypes_no_spv obj obj-new-offload bc) +set(filetypes obj obj-old-offload spv bc) +set(filetypes_no_spv obj obj-old-offload bc) foreach(filetype IN LISTS filetypes) add_custom_target(libsycldevice-${filetype}) @@ -109,9 +109,9 @@ endif() set(spv_device_compile_opts -fsycl-device-only -fsycl-device-obj=spirv) set(bc_device_compile_opts -fsycl-device-only -fsycl-device-obj=llvmir) -set(obj-new-offload_device_compile_opts -fsycl -c --offload-new-driver +set(obj-old-offload_device_compile_opts -fsycl -c ${sycl_targets_opt} --no-offload-new-driver) +set(obj_device_compile_opts -fsycl -c --offload-new-driver -foffload-lto=thin ${sycl_targets_opt}) -set(obj_device_compile_opts -fsycl -c ${sycl_targets_opt}) # Compiles and installs a single device library. # @@ -364,47 +364,50 @@ if (NOT MSVC AND UR_SANITIZER_INCLUDE_DIR) -I${UR_SANITIZER_INCLUDE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}) - set(sanitizer_pvc_compile_opts_obj -fsycl -c + set(sanitizer_pvc_compile_opts_obj -fsycl -c --offload-new-driver + -foffload-lto=thin ${sanitizer_generic_compile_opts} ${sycl_pvc_target_opt} -D__LIBDEVICE_PVC__) - set(sanitizer_cpu_compile_opts_obj -fsycl -c + set(sanitizer_cpu_compile_opts_obj -fsycl -c --offload-new-driver + -foffload-lto=thin ${sanitizer_generic_compile_opts} ${sycl_cpu_target_opt} -D__LIBDEVICE_CPU__) - set(sanitizer_dg2_compile_opts_obj -fsycl -c + set(sanitizer_dg2_compile_opts_obj -fsycl -c --offload-new-driver + -foffload-lto=thin ${sanitizer_generic_compile_opts} ${sycl_dg2_target_opt} -D__LIBDEVICE_DG2__) - set(sanitizer_pvc_compile_opts_bc ${bc_device_compile_opts} + set(sanitizer_pvc_compile_opts_bc ${bc_device_compile_opts} --offload-new-driver + -foffload-lto=thin ${sanitizer_generic_compile_opts} -D__LIBDEVICE_PVC__) - set(sanitizer_cpu_compile_opts_bc ${bc_device_compile_opts} + set(sanitizer_cpu_compile_opts_bc ${bc_device_compile_opts} --offload-new-driver + -foffload-lto=thin ${sanitizer_generic_compile_opts} -D__LIBDEVICE_CPU__) - set(sanitizer_dg2_compile_opts_bc ${bc_device_compile_opts} + set(sanitizer_dg2_compile_opts_bc ${bc_device_compile_opts} --offload-new-driver + -foffload-lto=thin ${sanitizer_generic_compile_opts} -D__LIBDEVICE_DG2__) - set(sanitizer_pvc_compile_opts_obj-new-offload -fsycl -c --offload-new-driver - -foffload-lto=thin + set(sanitizer_pvc_compile_opts_obj-old-offload -fsycl -c --no-offload-new-driver ${sanitizer_generic_compile_opts} ${sycl_pvc_target_opt} -D__LIBDEVICE_PVC__) - set(sanitizer_cpu_compile_opts_obj-new-offload -fsycl -c --offload-new-driver - -foffload-lto=thin + set(sanitizer_cpu_compile_opts_obj-old-offload -fsycl -c --no-offload-new-driver ${sanitizer_generic_compile_opts} ${sycl_cpu_target_opt} -D__LIBDEVICE_CPU__) - set(sanitizer_dg2_compile_opts_obj-new-offload -fsycl -c --offload-new-driver - -foffload-lto=thin + set(sanitizer_dg2_compile_opts_obj-old-offload -fsycl -c --no-offload-new-driver ${sanitizer_generic_compile_opts} ${sycl_dg2_target_opt} -D__LIBDEVICE_DG2__) @@ -704,8 +707,7 @@ if (NOT WIN32) add_imf_host_cxx_flags_compile_flags_if_supported("-fcf-protection=full") endif() -set(obj-new-offload_host_compile_opts ${imf_host_cxx_flags} --offload-new-driver - -foffload-lto=thin) +set(obj-old-offload_host_compile_opts ${imf_host_cxx_flags} --no-offload-new-driver) set(obj_host_compile_opts ${imf_host_cxx_flags}) foreach(datatype IN ITEMS fp32 fp64 bf16) @@ -834,9 +836,9 @@ foreach(arch IN LISTS full_build_archs) COMPONENT libsycldevice) endforeach() -# Add host device imf libraries for obj and new offload objects. +# Add host device imf libraries for obj and old offload objects. foreach(dtype IN ITEMS bf16 fp32 fp64) - foreach(ftype IN ITEMS obj obj-new-offload) + foreach(ftype IN ITEMS obj obj-old-offload) set(tgt_name imf_fallback_${dtype}_host_${ftype}) add_lib_imf(fallback-imf-${dtype}-host @@ -864,7 +866,7 @@ foreach(dtype IN ITEMS bf16 fp32 fp64) endforeach() endforeach() -foreach(ftype IN ITEMS obj obj-new-offload) +foreach(ftype IN ITEMS obj obj-old-offload) add_custom_target(imf_host_${ftype} DEPENDS ${${ftype}_binary_dir}/${devicelib_host_static_${ftype}}) add_custom_command( diff --git a/libdevice/test/sycl_noinline.txt b/libdevice/test/sycl_noinline.txt index a0261ef5f8d1a..99bf91e0996f8 100644 --- a/libdevice/test/sycl_noinline.txt +++ b/libdevice/test/sycl_noinline.txt @@ -21,52 +21,52 @@ RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-cassert.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-cassert.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-cmath.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-cmath.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-cmath-fp64.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-cmath-fp64.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-complex.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-complex.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-complex-fp64.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-fallback-complex-fp64.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-crt.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-crt.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-cmath.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-cmath.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-cmath-fp64.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-cmath-fp64.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-complex.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-complex.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s RUN: clang-offload-bundler -type=o -unbundle \ RUN: -targets=sycl-spir64-unknown-unknown \ -RUN: -input=%libsycldevice_obj_dir/libsycl-complex-fp64.o -output=%t.bc +RUN: -input=%libsycldevice_obj_dir/libsycl-complex-fp64.old.o -output=%t.bc RUN: llvm-dis %t.bc -o - | FileCheck %s CHECK: target triple ={{.*}}spir64 diff --git a/sycl/test-e2e/Config/kernel_from_file.cpp b/sycl/test-e2e/Config/kernel_from_file.cpp index c5ae870000ce9..e59d7a0d5162d 100644 --- a/sycl/test-e2e/Config/kernel_from_file.cpp +++ b/sycl/test-e2e/Config/kernel_from_file.cpp @@ -6,16 +6,28 @@ // As we are doing a separate device compilation here, we need to explicitly // add the device lib instrumentation (itt_compiler_wrapper) // RUN: %clangxx -Wno-error=ignored-attributes -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 -fsycl-device-only -fno-sycl-dead-args-optimization -Xclang -fsycl-int-header=%t.h %s -o %t.bc -Xclang -verify-ignore-unexpected=note,warning -Wno-sycl-strict -// >> ---- unbundle compiler wrapper and asan device objects -// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers%obj_ext -output=%t_compiler_wrappers.bc -unbundle -// RUN: %if linux %{ clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-asan%obj_ext -output=%t_asan.bc -unbundle %} + // >> ---- link device code -// RUN: %if linux %{ llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers.bc %t_asan.bc %} %else %{ llvm-link -o=%t_app.bc %t.bc %t_compiler_wrappers.bc %} +// RUN: %if linux %{ llvm-link -o=%t_app.bc %t.bc %sycl_static_libs_dir/libsycl-itt-compiler-wrappers.bc %sycl_static_libs_dir/libsycl-asan.bc %} %else %{ llvm-link -o=%t_app.bc %t.bc %sycl_static_libs_dir/libsycl-itt-compiler-wrappers.bc %} + // >> ---- translate to SPIR-V // RUN: llvm-spirv -o %t.spv %t_app.bc // RUN: %clangxx -Wno-error=ignored-attributes %sycl_include -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 %include_option %t.h %s -o %t.out %sycl_options -Xclang -verify-ignore-unexpected=note,warning %if preview-mode %{-Wno-unused-command-line-argument%} // RUN: env SYCL_USE_KERNEL_SPV=%t.spv %{run} %t.out +// Check backward compatibility: verify that SYCL object files can be unbundled +// to extract device code as in old-offloading-model workflows. +// >> ---- unbundle compiler wrapper and asan device objects +// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers.old%obj_ext -output=%t_compiler_wrappers.old.bc -unbundle +// RUN: %if linux %{ clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-asan.old%obj_ext -output=%t_asan.old.bc -unbundle %} + +// >> ---- link device code +// RUN: %if linux %{ llvm-link -o=%t_app.old.bc %t.bc %t_compiler_wrappers.old.bc %t_asan.old.bc %} %else %{ llvm-link -o=%t_app.old.bc %t.bc %t_compiler_wrappers.old.bc %} + +// >> ---- translate to SPIR-V +// RUN: llvm-spirv -o %t.old.spv %t_app.old.bc +// RUN: env SYCL_USE_KERNEL_SPV=%t.old.spv %{run} %t.out + #include #include diff --git a/sycl/test-e2e/SeparateCompile/test.cpp b/sycl/test-e2e/SeparateCompile/test.cpp index 920714e72e0f0..0c1ddc9414d7c 100644 --- a/sycl/test-e2e/SeparateCompile/test.cpp +++ b/sycl/test-e2e/SeparateCompile/test.cpp @@ -15,43 +15,67 @@ // >> host compilation... // RUN: %clangxx -Wno-error=ignored-attributes %sycl_include -Wno-error=unused-command-line-argument -DSYCL_DISABLE_FALLBACK_ASSERT -DB_CPP=1 %cxx_std_optionc++17 %include_option sycl_ihdr_b.h %debug_option -c %s -o b.o %sycl_options -fno-sycl-dead-args-optimization -Wno-sycl-strict // +// >> ---- link device code +// RUN: llvm-link -o=app.bc a_kernel.bc b_kernel.bc %sycl_static_libs_dir/libsycl-itt-compiler-wrappers.bc %sycl_static_libs_dir/libsycl-itt-stubs.bc %sycl_static_libs_dir/libsycl-itt-user-wrappers.bc + +// >> ---- produce entries data +// RUN: sycl-post-link -split=auto -emit-param-info -symbols -emit-exported-symbols -o test.table app.bc +// +// >> ---- do table transformations from bc to spv entries +// RUN: file-table-tform -extract=Code -drop_titles -o test_spv_in.table test.table +// RUN: llvm-foreach --in-file-list=test_spv_in.table --in-replace=test_spv_in.table --out-ext=spv --out-file-list=test_spv_out.table --out-replace=test_spv_out.table -- llvm-spirv -o test_spv_out.table -spirv-allow-extra-diexpressions -spirv-allow-unknown-intrinsics=llvm.genx. -spirv-ext=-all test_spv_in.table +// RUN: file-table-tform -replace=Code,Code -o test_spv.table test.table test_spv_out.table +// +// >> ---- wrap device binary +// >> produce .bc +// RUN: clang-offload-wrapper -o wrapper.bc -host=x86_64 -kind=sycl -target=spir64 -batch test_spv.table +// +// >> compile .bc to .o +// RUN: %clangxx -Wno-error=override-module -c wrapper.bc -o wrapper.o %if preview-mode %{-Wno-unused-command-line-argument%} +// +// >> ---- link the full hetero app +// RUN: %clangxx wrapper.o a.o b.o -Wno-unused-command-line-argument -o app.exe %sycl_options +// RUN: %{run} ./app.exe + +// Check backward compatibility: verify that SYCL object files can be unbundled +// to extract device code as in old-offloading-model workflows. // >> ---- bundle .o with .spv // >> run bundler -// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=a.o -input=a_kernel.bc -output=a_fat.o -// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=b.o -input=b_kernel.bc -output=b_fat.o +// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=a.o -input=a_kernel.bc -output=a_fat.old.o +// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=b.o -input=b_kernel.bc -output=b_fat.old.o // // >> ---- unbundle fat objects -// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=a.o -output=a_kernel.bc -input=a_fat.o -unbundle -// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=b.o -output=b_kernel.bc -input=b_fat.o -unbundle +// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=a.old.o -output=a_kernel.old.bc -input=a_fat.old.o -unbundle +// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -output=b.old.o -output=b_kernel.old.bc -input=b_fat.old.o -unbundle // // As we are doing a separate device compilation here, we need to explicitly // add the device lib instrumentation (itt_compiler_wrapper) // >> ---- unbundle compiler wrapper device object -// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers%obj_ext -output=compiler_wrappers.bc -unbundle -// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-stubs%obj_ext -output=itt_stubs.bc -unbundle -// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-user-wrappers%obj_ext -output=user_wrappers.bc -unbundle +// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers.old%obj_ext -output=compiler_wrappers.old.bc -unbundle +// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-stubs.old%obj_ext -output=itt_stubs.old.bc -unbundle +// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-user-wrappers.old%obj_ext -output=user_wrappers.old.bc -unbundle // // >> ---- link device code -// RUN: llvm-link -o=app.bc a_kernel.bc b_kernel.bc compiler_wrappers.bc itt_stubs.bc user_wrappers.bc +// RUN: llvm-link -o=app.old.bc a_kernel.old.bc b_kernel.old.bc compiler_wrappers.old.bc itt_stubs.old.bc user_wrappers.old.bc // // >> ---- produce entries data -// RUN: sycl-post-link -split=auto -emit-param-info -symbols -emit-exported-symbols -o test.table app.bc +// RUN: sycl-post-link -split=auto -emit-param-info -symbols -emit-exported-symbols -o test.old.table app.old.bc // // >> ---- do table transformations from bc to spv entries -// RUN: file-table-tform -extract=Code -drop_titles -o test_spv_in.table test.table -// RUN: llvm-foreach --in-file-list=test_spv_in.table --in-replace=test_spv_in.table --out-ext=spv --out-file-list=test_spv_out.table --out-replace=test_spv_out.table -- llvm-spirv -o test_spv_out.table -spirv-allow-extra-diexpressions -spirv-allow-unknown-intrinsics=llvm.genx. -spirv-ext=-all test_spv_in.table -// RUN: file-table-tform -replace=Code,Code -o test_spv.table test.table test_spv_out.table +// RUN: file-table-tform -extract=Code -drop_titles -o test_spv_in.old.table test.old.table +// RUN: llvm-foreach --in-file-list=test_spv_in.old.table --in-replace=test_spv_in.old.table --out-ext=spv --out-file-list=test_spv_out.old.table --out-replace=test_spv_out.old.table -- llvm-spirv -o test_spv_out.old.table -spirv-allow-extra-diexpressions -spirv-allow-unknown-intrinsics=llvm.genx. -spirv-ext=-all test_spv_in.old.table +// RUN: file-table-tform -replace=Code,Code -o test_spv.old.table test.old.table test_spv_out.old.table // // >> ---- wrap device binary // >> produce .bc -// RUN: clang-offload-wrapper -o wrapper.bc -host=x86_64 -kind=sycl -target=spir64 -batch test_spv.table +// RUN: clang-offload-wrapper -o wrapper.old.bc -host=x86_64 -kind=sycl -target=spir64 -batch test_spv.old.table // // >> compile .bc to .o -// RUN: %clangxx -Wno-error=override-module -c wrapper.bc -o wrapper.o %if preview-mode %{-Wno-unused-command-line-argument%} +// RUN: %clangxx -Wno-error=override-module -c wrapper.old.bc -o wrapper.old.o %if preview-mode %{-Wno-unused-command-line-argument%} // // >> ---- link the full hetero app -// RUN: %clangxx wrapper.o a.o b.o -Wno-unused-command-line-argument -o app.exe %sycl_options -// RUN: %{run} ./app.exe +// RUN: %clangxx wrapper.old.o a.old.o b.old.o -Wno-unused-command-line-argument -o app.old.exe %sycl_options +// RUN: %{run} ./app.old.exe //==----------- test.cpp - Tests SYCL separate compilation -----------------==// //