Skip to content

Commit e207813

Browse files
committed
Merge remote-tracking branch 'intel/sycl' into invoke_simd_post_link
2 parents d067250 + f6420c7 commit e207813

File tree

63 files changed

+1642
-1224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1642
-1224
lines changed

buildbot/configure.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ def do_configure(args):
7575
sycl_build_pi_hip_platform = args.hip_platform
7676
sycl_enabled_plugins.append("hip")
7777

78+
# all llvm compiler targets don't require 3rd party dependencies, so can be
79+
# built/tested even if specific runtimes are not available
80+
if args.enable_all_llvm_targets:
81+
llvm_targets_to_build += ';NVPTX;AMDGPU'
82+
7883
if args.werror or args.ci_defaults:
7984
sycl_werror = 'ON'
8085
xpti_enable_werror = 'ON'
@@ -210,6 +215,7 @@ def main():
210215
parser.add_argument("--hip-platform", type=str, choices=['AMD', 'NVIDIA'], default='AMD', help="choose hardware platform for HIP backend")
211216
parser.add_argument("--arm", action='store_true', help="build ARM support rather than x86")
212217
parser.add_argument("--enable-esimd-emulator", action='store_true', help="build with ESIMD emulation support")
218+
parser.add_argument("--enable-all-llvm-targets", action='store_true', help="build compiler with all supported targets, it doesn't change runtime build")
213219
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
214220
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
215221
parser.add_argument("--werror", action='store_true', help="Treat warnings as errors")

buildbot/dependency.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ ocl_cpu_rt_ver=2022.13.3.0.16
44
# https://github.com/intel/llvm/releases/download/2022-WW13/win-oclcpuexp-2022.13.3.0.16_rel.zip
55
ocl_cpu_rt_ver_win=2022.13.3.0.16
66
# Same GPU driver supports Level Zero and OpenCL
7-
# https://github.com/intel/compute-runtime/releases/tag/22.19.23136
8-
ocl_gpu_rt_ver=22.19.23136
7+
# https://github.com/intel/compute-runtime/releases/tag/22.20.23198
8+
ocl_gpu_rt_ver=22.20.23198
99
# Same GPU driver supports Level Zero and OpenCL
1010
# https://downloadmirror.intel.com/723911/igfx_win_101.1404.zip
1111
ocl_gpu_rt_ver_win=101.1404
@@ -31,7 +31,7 @@ ocloc_ver_win=101.1404
3131
[DRIVER VERSIONS]
3232
cpu_driver_lin=2022.13.3.0.16
3333
cpu_driver_win=2022.13.3.0.16
34-
gpu_driver_lin=22.19.23136
34+
gpu_driver_lin=22.20.23198
3535
gpu_driver_win=101.1404
3636
fpga_driver_lin=2022.13.3.0.16
3737
fpga_driver_win=2022.13.3.0.16

clang/include/clang/Driver/Options.td

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,10 +2770,10 @@ def fsycl_device_code_split_EQ : Joined<["-"], "fsycl-device-code-split=">,
27702770
def fsycl_device_code_split : Flag<["-"], "fsycl-device-code-split">, Alias<fsycl_device_code_split_EQ>,
27712771
AliasArgs<["auto"]>, Flags<[CC1Option, CoreOption]>,
27722772
HelpText<"Perform SYCL device code split in the 'auto' mode, i.e. use heuristic to distribute device code across modules">;
2773-
def fsycl_instrument_device_code : Flag<["-"], "fsycl-instrument-device-code">,
2774-
Group<sycl_Group>, Flags<[CC1Option, CoreOption]>,
2775-
HelpText<"Add ITT instrumentation intrinsics calls">,
2776-
MarshallingInfoFlag<CodeGenOpts<"SPIRITTAnnotations">>;
2773+
defm sycl_instrument_device_code : BoolFOption<"sycl-instrument-device-code",
2774+
CodeGenOpts<"SPIRITTAnnotations">, DefaultFalse,
2775+
PosFlag<SetTrue, [], "Add">, NegFlag<SetFalse, [], "Do not add">,
2776+
BothFlags<[CC1Option, CoreOption], " ITT instrumentation intrinsics calls">>;
27772777
defm sycl_id_queries_fit_in_int: BoolFOption<"sycl-id-queries-fit-in-int",
27782778
LangOpts<"SYCLValueFitInMaxInt">, DefaultTrue,
27792779
PosFlag<SetTrue, [], "Assume">, NegFlag<SetFalse, [], "Do not assume">,
@@ -4854,6 +4854,12 @@ def fno_sycl_device_lib_EQ : CommaJoined<["-"], "fno-sycl-device-lib=">, Group<s
48544854
Values<"libc, libm-fp32, libm-fp64, all">, HelpText<"Control exclusion of "
48554855
"device libraries from device binary linkage. Valid arguments "
48564856
"are libc, libm-fp32, libm-fp64, all">;
4857+
def fsycl_device_lib_online_link : Flag<["-"], "fsycl-device-lib-online-link">,
4858+
Group<sycl_Group>, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enables "
4859+
"sycl device library online link (experimental)">;
4860+
def fno_sycl_device_lib_online_link : Flag<["-"], "fno-sycl-device-lib-online-link">,
4861+
Group<sycl_Group>, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Disables "
4862+
"sycl device library online link (experimental)">;
48574863
def fsycl_fp32_prec_sqrt : Flag<["-"], "fsycl-fp32-prec-sqrt">, Group<sycl_Group>, Flags<[CC1Option]>,
48584864
HelpText<"SYCL only. Specify that single precision floating-point sqrt is correctly rounded.">,
48594865
MarshallingInfoFlag<CodeGenOpts<"SYCLFp32PrecSqrt">>;

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
934934
// Add SPIRITTAnnotations pass to the pass manager if
935935
// -fsycl-instrument-device-code option was passed. This option can be used
936936
// only with spir triple.
937-
if (CodeGenOpts.SPIRITTAnnotations) {
937+
if (LangOpts.SYCLIsDevice && CodeGenOpts.SPIRITTAnnotations) {
938938
assert(llvm::Triple(TheModule->getTargetTriple()).isSPIR() &&
939939
"ITT annotations can only be added to a module with spir target");
940940
MPM.addPass(SPIRITTAnnotationsPass());

clang/lib/Driver/Driver.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4811,7 +4811,8 @@ class OffloadingActionBuilder final {
48114811
addInputs(sycl_device_wrapper_libs);
48124812
if (isSpirvAOT)
48134813
addInputs(sycl_device_fallback_libs);
4814-
if (Args.hasArg(options::OPT_fsycl_instrument_device_code))
4814+
if (Args.hasFlag(options::OPT_fsycl_instrument_device_code,
4815+
options::OPT_fno_sycl_instrument_device_code, true))
48154816
addInputs(sycl_device_annotation_libs);
48164817
return NumOfDeviceLibLinked != 0;
48174818
}
@@ -4963,8 +4964,12 @@ class OffloadingActionBuilder final {
49634964
// device libraries are only needed when current toolchain is using
49644965
// AOT compilation.
49654966
if (isSPIR) {
4967+
bool UseOnlineLink =
4968+
Args.hasFlag(options::OPT_fsycl_device_lib_online_link,
4969+
options::OPT_fno_sycl_device_lib_online_link, false);
4970+
bool UseOfflineLink = isSpirvAOT || !UseOnlineLink;
49664971
SYCLDeviceLibLinked = addSYCLDeviceLibs(
4967-
TC, FullLinkObjects, isSpirvAOT,
4972+
TC, FullLinkObjects, UseOfflineLink,
49684973
C.getDefaultToolChain().getTriple().isWindowsMSVCEnvironment());
49694974
}
49704975

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4898,12 +4898,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
48984898

48994899
// Forward -fsycl-instrument-device-code option to cc1. This option will
49004900
// only be used for SPIR-V-based targets.
4901-
if (Arg *A =
4902-
Args.getLastArgNoClaim(options::OPT_fsycl_instrument_device_code))
4903-
if (Triple.isSPIR()) {
4904-
A->claim();
4901+
if (Triple.isSPIR())
4902+
if (Args.hasFlag(options::OPT_fsycl_instrument_device_code,
4903+
options::OPT_fno_sycl_instrument_device_code, true))
49054904
CmdArgs.push_back("-fsycl-instrument-device-code");
4906-
}
49074905

49084906
if (!SYCLStdArg) {
49094907
// The user had not pass SYCL version, thus we'll employ no-sycl-strict

clang/lib/Sema/SemaDeclAttr.cpp

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7623,14 +7623,17 @@ SYCLIntelFPGAMaxConcurrencyAttr *Sema::MergeSYCLIntelFPGAMaxConcurrencyAttr(
76237623
// Check to see if there's a duplicate attribute with different values
76247624
// already applied to the declaration.
76257625
if (const auto *DeclAttr = D->getAttr<SYCLIntelFPGAMaxConcurrencyAttr>()) {
7626-
const auto *DeclExpr = dyn_cast<ConstantExpr>(DeclAttr->getNThreadsExpr());
7627-
const auto *MergeExpr = dyn_cast<ConstantExpr>(A.getNThreadsExpr());
7628-
if (DeclExpr && MergeExpr &&
7629-
DeclExpr->getResultAsAPSInt() != MergeExpr->getResultAsAPSInt()) {
7630-
Diag(DeclAttr->getLoc(), diag::warn_duplicate_attribute) << &A;
7631-
Diag(A.getLoc(), diag::note_previous_attribute);
7626+
if (const auto *DeclExpr =
7627+
dyn_cast<ConstantExpr>(DeclAttr->getNThreadsExpr())) {
7628+
if (const auto *MergeExpr = dyn_cast<ConstantExpr>(A.getNThreadsExpr())) {
7629+
if (DeclExpr->getResultAsAPSInt() != MergeExpr->getResultAsAPSInt()) {
7630+
Diag(DeclAttr->getLoc(), diag::warn_duplicate_attribute) << &A;
7631+
Diag(A.getLoc(), diag::note_previous_attribute);
7632+
}
7633+
// Do not add a duplicate attribute.
7634+
return nullptr;
7635+
}
76327636
}
7633-
return nullptr;
76347637
}
76357638

76367639
return ::new (Context)
@@ -7654,14 +7657,21 @@ void Sema::AddSYCLIntelFPGAMaxConcurrencyAttr(Decl *D,
76547657
return;
76557658
}
76567659

7660+
// Check to see if there's a duplicate attribute with different values
7661+
// already applied to the declaration.
76577662
if (const auto *DeclAttr = D->getAttr<SYCLIntelFPGAMaxConcurrencyAttr>()) {
7658-
const auto *DeclExpr =
7659-
dyn_cast<ConstantExpr>(DeclAttr->getNThreadsExpr());
7660-
if (DeclExpr && ArgVal != DeclExpr->getResultAsAPSInt()) {
7661-
Diag(CI.getLoc(), diag::warn_duplicate_attribute) << CI;
7662-
Diag(DeclAttr->getLoc(), diag::note_previous_attribute);
7663+
// If the other attribute argument is instantiation dependent, we won't
7664+
// have converted it to a constant expression yet and thus we test
7665+
// whether this is a null pointer.
7666+
if (const auto *DeclExpr =
7667+
dyn_cast<ConstantExpr>(DeclAttr->getNThreadsExpr())) {
7668+
if (ArgVal != DeclExpr->getResultAsAPSInt()) {
7669+
Diag(CI.getLoc(), diag::warn_duplicate_attribute) << CI;
7670+
Diag(DeclAttr->getLoc(), diag::note_previous_attribute);
7671+
}
7672+
// Drop the duplicate attribute.
7673+
return;
76637674
}
7664-
return;
76657675
}
76667676
}
76677677

clang/test/Driver/sycl-device-lib-win.cpp

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66

77
/// ###########################################################################
88

9-
/// test behavior of device library default link
9+
/// test behavior of device library default link and fno-sycl-device-lib-online-link
1010
// RUN: %clangxx -fsycl %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
1111
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
12+
// RUN: %clangxx -fsycl -fno-sycl-device-lib-online-link %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
13+
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
1214
// RUN: %clangxx -fsycl %s -fsycl-device-lib=libc --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
1315
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
16+
// RUN: %clangxx -fsycl -fno-sycl-device-lib-online-link %s -fsycl-device-lib=libc --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
17+
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
1418
// RUN: %clangxx -fsycl %s -fsycl-device-lib=libm-fp32 --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
1519
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT
1620
// RUN: %clangxx -fsycl %s -fsycl-device-lib=libc,libm-fp32 --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
@@ -21,10 +25,15 @@
2125
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-cmath.obj" "-output={{.*}}libsycl-cmath-{{.*}}.o" "-unbundle"
2226
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-cmath-fp64.obj" "-output={{.*}}libsycl-cmath-fp64-{{.*}}.o" "-unbundle"
2327
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-msvc-math.obj" "-output={{.*}}libsycl-msvc-math-{{.*}}.o" "-unbundle"
28+
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cassert.obj" "-output={{.*}}libsycl-fallback-cassert-{{.*}}.o" "-unbundle"
29+
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cstring.obj" "-output={{.*}}libsycl-fallback-cstring-{{.*}}.o" "-unbundle"
30+
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-complex-fp64.obj" "-output={{.*}}libsycl-fallback-complex-{{.*}}.o" "-unbundle"
31+
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath.obj" "-output={{.*}}libsycl-fallback-cmath-{{.*}}.o" "-unbundle"
32+
// SYCL_DEVICE_LIB_UNBUNDLE_DEFAULT-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath-fp64.obj" "-output={{.*}}libsycl-fallback-cmath-fp64-{{.*}}.o" "-unbundle"
2433

2534
/// ###########################################################################
26-
/// test sycl fallback device libraries are not linked by default
27-
// RUN: %clangxx -fsycl %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
35+
/// test sycl fallback device libraries are not linked when using online link.
36+
// RUN: %clangxx -fsycl -fsycl-device-lib-online-link %s --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
2837
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_NO_FALLBACK
2938
// SYCL_DEVICE_LIB_NO_FALLBACK: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-crt.obj" "-output={{.*}}libsycl-crt-{{.*}}.o" "-unbundle"
3039
// SYCL_DEVICE_LIB_NO_FALLBACK-NOT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-{{.*}}.obj"
@@ -48,6 +57,12 @@
4857
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-cmath.obj" "-output={{.*}}libsycl-cmath-{{.*}}.o" "-unbundle"
4958
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-cmath-fp64.obj" "-output={{.*}}libsycl-cmath-fp64-{{.*}}.o" "-unbundle"
5059
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-msvc-math.obj" "-output={{.*}}libsycl-msvc-math-{{.*}}.o" "-unbundle"
60+
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cassert.obj" "-output={{.*}}libsycl-fallback-cassert-{{.*}}.o" "-unbundle"
61+
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cstring.obj" "-output={{.*}}libsycl-fallback-cstring-{{.*}}.o" "-unbundle"
62+
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-complex.obj" "-output={{.*}}libsycl-fallback-complex-{{.*}}.o" "-unbundle"
63+
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-complex-fp64.obj" "-output={{.*}}libsycl-fallback-complex-fp64-{{.*}}.o" "-unbundle"
64+
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath.obj" "-output={{.*}}libsycl-fallback-cmath-{{.*}}.o" "-unbundle"
65+
// SYCL_DEVICE_LIB_UNBUNDLE_WITH_FP64-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath-fp64.obj" "-output={{.*}}libsycl-fallback-cmath-fp64-{{.*}}.o" "-unbundle"
5166

5267
/// ###########################################################################
5368

@@ -59,13 +74,20 @@
5974
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBC-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-cmath.obj" "-output={{.*}}libsycl-cmath-{{.*}}.o" "-unbundle"
6075
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBC-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-cmath-fp64.obj" "-output={{.*}}libsycl-cmath-fp64-{{.*}}.o" "-unbundle"
6176
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBC-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-msvc-math.obj" "-output={{.*}}libsycl-msvc-math-{{.*}}.o" "-unbundle"
77+
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBC-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-complex.obj" "-output={{.*}}libsycl-fallback-complex-{{.*}}.o" "-unbundle"
78+
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBC-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-complex-fp64.obj" "-output={{.*}}libsycl-fallback-complex-fp64-{{.*}}.o" "-unbundle"
79+
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBC-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath.obj" "-output={{.*}}libsycl-fallback-cmath-{{.*}}.o" "-unbundle"
80+
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBC-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath-fp64.obj" "-output={{.*}}libsycl-fallback-cmath-fp64-{{.*}}.o" "-unbundle"
6281

6382
/// ###########################################################################
6483

6584
/// test behavior of -fno-sycl-device-lib=libm-fp32,libm-fp64
6685
// RUN: %clangxx -fsycl %s -fno-sycl-device-lib=libm-fp32,libm-fp64 --sysroot=%S/Inputs/SYCL-windows -### 2>&1 \
6786
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBM
6887
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBM: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-crt.obj" "-output={{.*}}libsycl-crt-{{.*}}.o" "-unbundle"
88+
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBM: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cassert.obj" "-output={{.*}}libsycl-fallback-cassert-{{.*}}.o" "-unbundle"
89+
// SYCL_DEVICE_LIB_UNBUNDLE_NO_LIBM: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cstring.obj" "-output={{.*}}libsycl-fallback-cstring-{{.*}}.o" "-unbundle"
90+
6991
/// ###########################################################################
7092

7193
/// test behavior of disabling all device libraries
@@ -112,6 +134,12 @@
112134
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-cmath.obj" "-output={{.*}}libsycl-cmath-{{.*}}.o" "-unbundle"
113135
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-cmath-fp64.obj" "-output={{.*}}libsycl-cmath-fp64-{{.*}}.o" "-unbundle"
114136
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-msvc-math.obj" "-output={{.*}}libsycl-msvc-math-{{.*}}.o" "-unbundle"
137+
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cassert.obj" "-output={{.*}}libsycl-fallback-cassert-{{.*}}.o" "-unbundle"
138+
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cstring.obj" "-output={{.*}}libsycl-fallback-cstring-{{.*}}.o" "-unbundle"
139+
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-complex.obj" "-output={{.*}}libsycl-fallback-complex-{{.*}}.o" "-unbundle"
140+
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-complex-fp64.obj" "-output={{.*}}libsycl-fallback-complex-fp64-{{.*}}.o" "-unbundle"
141+
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath.obj" "-output={{.*}}libsycl-fallback-cmath-{{.*}}.o" "-unbundle"
142+
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown" "-input={{.*}}libsycl-fallback-cmath-fp64.obj" "-output={{.*}}libsycl-fallback-cmath-fp64-{{.*}}.o" "-unbundle"
115143
// SYCL_LLVM_LINK_DEVICE_LIB-NEXT: llvm-link{{.*}} "-only-needed" "{{.*}}" "-o" "{{.*}}.bc" "--suppress-warnings"
116144

117145
/// ###########################################################################

0 commit comments

Comments
 (0)