From d7f088fa3084b20d262b77411bcf22ff214d63ed Mon Sep 17 00:00:00 2001 From: Michael D Toguchi Date: Tue, 13 Apr 2021 18:48:34 -0700 Subject: [PATCH] [Driver][NFC] Cleanup some option setting for SYCL offload The area in which we setup options for the device and host compilations is a bit disorganized. Clean up some of this to be a little easier to find where additional options should go. Also clean up the convoluted usage of UseSYCLTriple which was used largely in part when doing the old method of static device lib compilations. --- clang/lib/Driver/ToolChains/Clang.cpp | 147 ++++++++----------- clang/test/Driver/sycl-MD-default.cpp | 4 +- clang/test/Driver/sycl-offload-intelfpga.cpp | 6 +- clang/test/Driver/sycl-offload-nvptx.cpp | 2 +- clang/test/Driver/sycl-offload.c | 2 +- clang/test/Driver/sycl-offload.cpp | 5 +- clang/test/Driver/sycl.c | 8 +- 7 files changed, 73 insertions(+), 101 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 60bb22d5e4c5d..099b096781d3e 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -4267,15 +4267,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, (IsSYCL || IsCuda || IsHIP) ? TC.getAuxTriple() : nullptr; bool IsWindowsMSVC = RawTriple.isWindowsMSVCEnvironment(); bool IsIAMCU = RawTriple.isOSIAMCU(); - bool IsSYCLDevice = (RawTriple.getEnvironment() == llvm::Triple::SYCLDevice || - Triple.getEnvironment() == llvm::Triple::SYCLDevice); - // Using just the sycldevice environment is not enough to determine usage - // of the device triple when considering fat static archives. The - // compilation path requires the host object to be fed into the partial link - // step, and being part of the SYCL tool chain causes the incorrect target. - // FIXME - Is it possible to retain host environment when on a target - // device toolchain. - bool UseSYCLTriple = IsSYCLDevice && (!IsSYCL || IsSYCLOffloadDevice); // Adjust IsWindowsXYZ for CUDA/HIP/SYCL compilations. Even when compiling in // device mode (i.e., getToolchain().getTriple() is NVPTX/AMDGCN, not @@ -4294,16 +4285,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Add the "effective" target triple. CmdArgs.push_back("-triple"); - if (!UseSYCLTriple && IsSYCLDevice) { - // Do not use device triple when we know the device is not SYCL - // FIXME: We override the toolchain triple in this instance to address a - // disconnect with fat static archives. We should have a cleaner way of - // using the Host environment when on a device toolchain. - std::string NormalizedTriple = - llvm::Triple(llvm::sys::getProcessTriple()).normalize(); - CmdArgs.push_back(Args.MakeArgString(NormalizedTriple)); - } else - CmdArgs.push_back(Args.MakeArgString(TripleStr)); + CmdArgs.push_back(Args.MakeArgString(TripleStr)); if (const Arg *MJ = Args.getLastArg(options::OPT_MJ)) { DumpCompilationDatabase(C, MJ->getValue(), TripleStr, Output, Input, Args); @@ -4349,7 +4331,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Arg *SYCLStdArg = Args.getLastArg(options::OPT_sycl_std_EQ); - if (UseSYCLTriple) { + if (IsSYCLOffloadDevice) { + // Pass the triple of host when doing SYCL + llvm::Triple AuxT = C.getDefaultToolChain().getTriple(); + std::string NormalizedTriple = AuxT.normalize(); + CmdArgs.push_back("-aux-triple"); + CmdArgs.push_back(Args.MakeArgString(NormalizedTriple)); + // We want to compile sycl kernels. CmdArgs.push_back("-fsycl-is-device"); CmdArgs.push_back("-fdeclare-spirv-builtins"); @@ -4364,18 +4352,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-mllvm"); CmdArgs.push_back("-sycl-opt"); } + // Turn on Dead Parameter Elimination Optimization with early optimizations if (!RawTriple.isNVPTX() && Args.hasFlag(options::OPT_fsycl_dead_args_optimization, options::OPT_fno_sycl_dead_args_optimization, false)) CmdArgs.push_back("-fenable-sycl-dae"); - - // Pass the triple of host when doing SYCL - llvm::Triple AuxT = C.getDefaultToolChain().getTriple(); - std::string NormalizedTriple = AuxT.normalize(); - CmdArgs.push_back("-aux-triple"); - CmdArgs.push_back(Args.MakeArgString(NormalizedTriple)); - bool IsMSVC = AuxT.isWindowsMSVCEnvironment(); if (IsMSVC) { CmdArgs.push_back("-fms-extensions"); @@ -4404,15 +4386,22 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // along with marking the same function with explicit SYCL_EXTERNAL CmdArgs.push_back("-Wno-sycl-strict"); } + + // Add the integration header option to generate the header. + StringRef Header(D.getIntegrationHeader(Input.getBaseInput())); + if (!Header.empty()) { + SmallString<128> HeaderOpt("-fsycl-int-header="); + HeaderOpt.append(Header); + CmdArgs.push_back(Args.MakeArgString(HeaderOpt)); + } } - if (IsSYCL || UseSYCLTriple) { + + if (IsSYCL) { // Set options for both host and device if (Arg *A = Args.getLastArg(options::OPT_fsycl_id_queries_fit_in_int, options::OPT_fno_sycl_id_queries_fit_in_int)) A->render(Args, CmdArgs); - } - if (IsSYCL) { if (SYCLStdArg) { SYCLStdArg->render(Args, CmdArgs); CmdArgs.push_back("-fsycl-std-layout-kernel-params"); @@ -4420,6 +4409,44 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Ensure the default version in SYCL mode is 2020 CmdArgs.push_back("-sycl-std=2020"); } + if (Args.hasArg(options::OPT_fsycl_unnamed_lambda)) + CmdArgs.push_back("-fsycl-unnamed-lambda"); + + // Enable generation of USM address spaces for FPGA. + // __ENABLE_USM_ADDR_SPACE__ will be used during compilation of SYCL headers + if (getToolChain().getTriple().getSubArch() == + llvm::Triple::SPIRSubArch_fpga) + CmdArgs.push_back("-D__ENABLE_USM_ADDR_SPACE__"); + + // Add any options that are needed specific to SYCL offload while + // performing the host side compilation. + if (!IsSYCLOffloadDevice) { + // Add the -include option to add the integration header + StringRef Header = D.getIntegrationHeader(Input.getBaseInput()); + if (types::getPreprocessedType(Input.getType()) != types::TY_INVALID && + !Header.empty()) { + CmdArgs.push_back("-include"); + CmdArgs.push_back(Args.MakeArgString(Header)); + // When creating dependency information, filter out the generated + // header file. + CmdArgs.push_back("-dependency-filter"); + CmdArgs.push_back(Args.MakeArgString(Header)); + } + // Let the FE know we are doing a SYCL offload compilation, but we are + // doing the host pass. + CmdArgs.push_back("-fsycl-is-host"); + + if (!D.IsCLMode()) { + // SYCL library is guaranteed to work correctly only with dynamic + // MSVC runtime. + llvm::Triple AuxT = C.getDefaultToolChain().getTriple(); + if (AuxT.isWindowsMSVCEnvironment()) { + CmdArgs.push_back("-D_MT"); + CmdArgs.push_back("-D_DLL"); + CmdArgs.push_back("--dependent-lib=msvcrt"); + } + } + } } if (IsOpenMPDevice) { @@ -4500,7 +4527,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-P"); } } else if (isa(JA)) { - if (IsSYCLOffloadDevice && IsSYCLDevice) { + if (IsSYCLOffloadDevice) { CmdArgs.push_back("-emit-llvm-bc"); } else { CmdArgs.push_back("-emit-obj"); @@ -5958,10 +5985,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Forward -cl options to -cc1 RenderOpenCLOptions(Args, CmdArgs, InputType); - // Forward -sycl-std option to -cc1 only if -fsycl is enabled. - if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false)) - Args.AddLastArg(CmdArgs, options::OPT_sycl_std_EQ); - // Forward -fsycl-instrument-device-code option to cc1. This option can only // be used with spir triple. if (Arg *A = Args.getLastArg(options::OPT_fsycl_instrument_device_code)) { @@ -6425,7 +6448,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // selected. For optimization levels that want vectorization we use the alias // option to simplify the hasFlag logic. bool EnableVec = shouldEnableVectorizerAtOLevel(Args, false); - if (UseSYCLTriple && RawTriple.isSPIR() && EnableSYCLEarlyOptimizations) + if (RawTriple.isSPIR() && EnableSYCLEarlyOptimizations) EnableVec = false; // But disable vectorization for SYCL device code OptSpecifier VectorizeAliasOption = EnableVec ? options::OPT_O_Group : options::OPT_fvectorize; @@ -6435,7 +6458,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // -fslp-vectorize is enabled based on the optimization level selected. bool EnableSLPVec = shouldEnableVectorizerAtOLevel(Args, true); - if (UseSYCLTriple && RawTriple.isSPIR() && EnableSYCLEarlyOptimizations) + if (RawTriple.isSPIR() && EnableSYCLEarlyOptimizations) EnableSLPVec = false; // But disable vectorization for SYCL device code OptSpecifier SLPVectAliasOption = EnableSLPVec ? options::OPT_O_Group : options::OPT_fslp_vectorize; @@ -6640,56 +6663,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-fcuda-short-ptr"); } - if (IsSYCL) { - // Add any options that are needed specific to SYCL offload while - // performing the host side compilation. - if (!IsSYCLOffloadDevice) { - // Add the integration header option to generate the header. - StringRef Header = D.getIntegrationHeader(Input.getBaseInput()); - if (types::getPreprocessedType(InputType) != types::TY_INVALID && - !Header.empty()) { - CmdArgs.push_back("-include"); - CmdArgs.push_back(Args.MakeArgString(Header)); - // When creating dependency information, filter out the generated - // header file. - CmdArgs.push_back("-dependency-filter"); - CmdArgs.push_back(Args.MakeArgString(Header)); - } - // Let the FE know we are doing a SYCL offload compilation, but we are - // doing the host pass. - CmdArgs.push_back("-fsycl-is-host"); - - if (!D.IsCLMode()) { - // SYCL library is guaranteed to work correctly only with dynamic - // MSVC runtime. - llvm::Triple AuxT = C.getDefaultToolChain().getTriple(); - if (AuxT.isWindowsMSVCEnvironment()) { - CmdArgs.push_back("-D_MT"); - CmdArgs.push_back("-D_DLL"); - CmdArgs.push_back("--dependent-lib=msvcrt"); - } - } - } - if (IsSYCLOffloadDevice) { - // Add the integration header option to generate the header. - StringRef Header(D.getIntegrationHeader(Input.getBaseInput())); - if (!Header.empty()) { - SmallString<128> HeaderOpt("-fsycl-int-header="); - HeaderOpt.append(Header); - CmdArgs.push_back(Args.MakeArgString(HeaderOpt)); - } - } - - if (Args.hasArg(options::OPT_fsycl_unnamed_lambda)) - CmdArgs.push_back("-fsycl-unnamed-lambda"); - - // Enable generation of USM address spaces for FPGA. - // __ENABLE_USM_ADDR_SPACE__ will be used during compilation of SYCL headers - if (getToolChain().getTriple().getSubArch() == - llvm::Triple::SPIRSubArch_fpga) - CmdArgs.push_back("-D__ENABLE_USM_ADDR_SPACE__"); - } - if (IsCuda || IsHIP) { // Determine the original source input. const Action *SourceAction = &JA; diff --git a/clang/test/Driver/sycl-MD-default.cpp b/clang/test/Driver/sycl-MD-default.cpp index 491745289c13c..944f921c3b8d9 100644 --- a/clang/test/Driver/sycl-MD-default.cpp +++ b/clang/test/Driver/sycl-MD-default.cpp @@ -5,7 +5,7 @@ // RUN: %clangxx -### -fsycl -c -target x86_64-unknown-windows-msvc %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-DEFAULT %s // CHK-DEFAULT-NOT: "-fsycl-is-device" {{.*}} "-D_MT" "-D_DLL" -// CHK-DEFAULT: "-fsycl-is-host" "-D_MT" "-D_DLL" "--dependent-lib=msvcrt{{d*}}" {{.*}} +// CHK-DEFAULT: "-fsycl-is-host"{{.*}} "-D_MT" "-D_DLL" "--dependent-lib=msvcrt{{d*}}" {{.*}} // RUN: %clang_cl -### -fsycl -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-DEFAULT-CL %s @@ -14,7 +14,7 @@ // RUN: %clang_cl -### -MDd -fsycl -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-DEFAULT-CL %s // CHK-DEFAULT-CL-NOT: "-fsycl-is-device" {{.*}} "-D_MT" "-D_DLL" -// CHK-DEFAULT-CL: "-D_MT" "-D_DLL" "--dependent-lib=msvcrt{{d*}}" {{.*}} "-fsycl-is-host" +// CHK-DEFAULT-CL: "-fsycl-is-host"{{.*}} "-D_MT" "-D_DLL" "--dependent-lib=msvcrt{{d*}}" // RUN: %clang_cl -### -MT -fsycl -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-ERROR %s diff --git a/clang/test/Driver/sycl-offload-intelfpga.cpp b/clang/test/Driver/sycl-offload-intelfpga.cpp index 146089d3afac1..0a0ff074fd85c 100644 --- a/clang/test/Driver/sycl-offload-intelfpga.cpp +++ b/clang/test/Driver/sycl-offload-intelfpga.cpp @@ -266,7 +266,7 @@ // CHK-FPGA-DEP-FILES: clang{{.*}} "-dependency-file" "[[INPUT1:.+\.d]]" "-MT" "{{.*}}.o" // CHK-FPGA-DEP-FILES: clang{{.*}} "-dependency-file" "[[INPUT2:.+\.d]]" "-MT" "{{.*}}.o" // CHK-FPGA-DEP-FILES: aoc{{.*}} "-dep-files={{.*}}[[INPUT1]],{{.*}}[[INPUT2]]" -// CHK-FPGA-DEP-FILES-NOT: clang{{.*}} "-dependency-file" {{.*}} "-fsycl-is-host" +// CHK-FPGA-DEP-FILES-NOT: clang{{.*}} "-fsycl-is-host"{{.*}} "-dependency-file" /// -fintelfpga dependency file check with host .d enabled // RUN: %clangxx -### -MMD -fsycl -fintelfpga %t-1.cpp %t-2.cpp 2>&1 \ @@ -274,8 +274,8 @@ // CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-dependency-file" "[[INPUT1:.+\.d]]" "-MT" "{{.*}}.o" // CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-dependency-file" "[[INPUT2:.+\.d]]" "-MT" "{{.*}}.o" // CHK-FPGA-DEP-FILES-HOST: aoc{{.*}} "-dep-files={{.*}}[[INPUT1]],{{.*}}[[INPUT2]]" -// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-dependency-file" {{.*}} "-fsycl-is-host" -// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-dependency-file" {{.*}} "-fsycl-is-host" +// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-fsycl-is-host"{{.*}} "-dependency-file" +// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-fsycl-is-host"{{.*}} "-dependency-file" /// -fintelfpga dependency file generation test to object // RUN: %clangxx -### -fsycl -fintelfpga -target x86_64-unknown-linux-gnu %t-1.cpp %t-2.cpp -c 2>&1 \ diff --git a/clang/test/Driver/sycl-offload-nvptx.cpp b/clang/test/Driver/sycl-offload-nvptx.cpp index 8b4f9dc09eaf4..a28454c1b9ab8 100644 --- a/clang/test/Driver/sycl-offload-nvptx.cpp +++ b/clang/test/Driver/sycl-offload-nvptx.cpp @@ -8,7 +8,7 @@ // RUN: -fsycl-targets=nvptx64-nvidia-nvcl-sycldevice --cuda-path=%S/Inputs/CUDA/usr/local/cuda \ // RUN: -fsycl-libspirv-path=%S/Inputs/SYCL/libspirv.bc %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-ACTIONS %s -// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-nvcl-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-Wno-sycl-strict" "-sycl-std=2020" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-feature" "+ptx42"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-std=c++11"{{.*}} +// CHK-ACTIONS: "-cc1" "-triple" "nvptx64-nvidia-nvcl-sycldevice" "-aux-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-device"{{.*}} "-Wno-sycl-strict"{{.*}} "-sycl-std=2020" {{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libspirv.bc"{{.*}} "-mlink-builtin-bitcode" "{{.*}}libdevice{{.*}}.10.bc"{{.*}} "-target-feature" "+ptx42"{{.*}} "-target-sdk-version=[[CUDA_VERSION:[0-9.]+]]"{{.*}} "-target-cpu" "sm_50"{{.*}} "-std=c++11"{{.*}} // CHK-ACTIONS-NOT: "-mllvm -sycl-opt" // CHK-ACTIONS: clang-offload-wrapper"{{.*}} "-host=x86_64-unknown-linux-gnu" "-target=nvptx64" "-kind=sycl"{{.*}} diff --git a/clang/test/Driver/sycl-offload.c b/clang/test/Driver/sycl-offload.c index 30ef0cdeca54f..9184df7e56717 100644 --- a/clang/test/Driver/sycl-offload.c +++ b/clang/test/Driver/sycl-offload.c @@ -926,4 +926,4 @@ // RUN: %clang -### -fsycl %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR // RUN: %clang_cl -### -fsycl %s 2>&1 | FileCheck %s -check-prefixes=CHECK-HEADER-DIR // CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include" -// CHECK-HEADER-DIR: clang{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"{{.*}} "-fsycl-is-host" +// CHECK-HEADER-DIR: clang{{.*}} "-fsycl-is-host"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"{{.*}} diff --git a/clang/test/Driver/sycl-offload.cpp b/clang/test/Driver/sycl-offload.cpp index 38b6f1a6d998b..19a36a6a69d6c 100644 --- a/clang/test/Driver/sycl-offload.cpp +++ b/clang/test/Driver/sycl-offload.cpp @@ -28,7 +28,6 @@ /// Check that -fcoverage-mapping is disabled for device // RUN: %clang -### -fsycl -fprofile-instr-generate -fcoverage-mapping -target x86_64-unknown-linux-gnu -c %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK_COVERAGE_MAPPING %s -// CHECK_COVERAGE_MAPPING: clang{{.*}} "-cc1" "-triple" "spir64-unknown-unknown-sycldevice" "-fsycl-is-device"{{.*}} "-fprofile-instrument=clang" +// CHECK_COVERAGE_MAPPING: clang{{.*}} "-cc1" "-triple" "spir64-unknown-unknown-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-fprofile-instrument=clang" // CHECK_COVERAGE_MAPPING-NOT: "-fcoverage-mapping" -// CHECK_COVERAGE_MAPPING: clang{{.*}} "-cc1" "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-fprofile-instrument=clang" -// CHECK_COVERAGE_MAPPING: "-fcoverage-mapping"{{.*}} "-fsycl-is-host" +// CHECK_COVERAGE_MAPPING: clang{{.*}} "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fsycl-is-host"{{.*}} "-fprofile-instrument=clang"{{.*}} "-fcoverage-mapping"{{.*}} diff --git a/clang/test/Driver/sycl.c b/clang/test/Driver/sycl.c index ed4e9b96bab07..15467c0c354a8 100644 --- a/clang/test/Driver/sycl.c +++ b/clang/test/Driver/sycl.c @@ -39,7 +39,7 @@ // RUN: %clangxx -### -fsycl-device-only -fsycl-unnamed-lambda %s 2>&1 | FileCheck %s --check-prefix=CHECK-LAMBDA // RUN: %clang_cl -### -fsycl-device-only -fsycl-unnamed-lambda %s 2>&1 | FileCheck %s --check-prefix=CHECK-LAMBDA -// DEFAULT: "-triple" "spir64-unknown-{{.*}}-sycldevice{{.*}}" "-fsycl-is-device"{{.*}} "-sycl-std=2020"{{.*}} "-emit-llvm-bc" +// DEFAULT: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-sycl-std=2020"{{.*}} "-emit-llvm-bc" // DEFAULT: "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}sycl" // DEFAULT: "-internal-isystem" "{{.*lib.*clang.*include}}" // DEFAULT: "-std=c++17" @@ -48,7 +48,7 @@ // DEFAULT-NOT: "-std=c++14" // NO-BITCODE: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc" // NO-BITCODE: "{{.*}}llvm-spirv"{{.*}} "-spirv-max-version=1.3"{{.*}} "-spirv-ext=+all,-SPV_INTEL_usm_storage_classes,-SPV_INTEL_optnone,-SPV_KHR_linkonce_odr" -// TARGET: "-triple" "spir64-unknown-linux-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc" +// TARGET: "-triple" "spir64-unknown-linux-sycldevice"{{.*}} "-emit-llvm-bc" // COMBINED: "-triple" "spir64-unknown-{{.*}}-sycldevice"{{.*}} "-fsycl-is-device"{{.*}} "-emit-llvm-bc" // TEXTUAL: "-triple" "spir64-unknown-{{.*}}-sycldevice{{.*}}" "-fsycl-is-device"{{.*}} "-emit-llvm" // CHECK-LAMBDA: "-fsycl-unnamed-lambda" @@ -58,13 +58,13 @@ // RUN: | FileCheck --check-prefix=DEVICE-64 %s // RUN: %clang_cl -fsycl-device-only --target=x86_64-unknown-linux-gnu -### %s 2>&1 \ // RUN: | FileCheck --check-prefix=DEVICE-64 %s -// DEVICE-64: clang{{.*}} "-triple" "spir64-unknown-unknown-sycldevice" {{.*}} "-aux-triple" "x86_64-unknown-linux-gnu" +// DEVICE-64: clang{{.*}} "-triple" "spir64-unknown-unknown-sycldevice" "-aux-triple" "x86_64-unknown-linux-gnu" // RUN: %clang -fsycl-device-only -target i386-unknown-linux-gnu -### %s 2>&1 \ // RUN: | FileCheck --check-prefix=DEVICE-32 %s // RUN: %clang_cl -fsycl-device-only --target=i386-unknown-linux-gnu -### %s 2>&1 \ // RUN: | FileCheck --check-prefix=DEVICE-32 %s -// DEVICE-32: clang{{.*}} "-triple" "spir-unknown-unknown-sycldevice" {{.*}} "-aux-triple" "i386-unknown-linux-gnu" +// DEVICE-32: clang{{.*}} "-triple" "spir-unknown-unknown-sycldevice" "-aux-triple" "i386-unknown-linux-gnu" /// Verify that the sycl header directory is before /usr/include // RUN: %clangxx -### -fsycl-device-only %s 2>&1 | FileCheck %s --check-prefix=HEADER_ORDER