diff --git a/clang/include/clang/Basic/LangOptions.def b/clang/include/clang/Basic/LangOptions.def index 9829630b7cb28..33942bbecf6ef 100644 --- a/clang/include/clang/Basic/LangOptions.def +++ b/clang/include/clang/Basic/LangOptions.def @@ -246,7 +246,6 @@ LANGOPT(GPUMaxThreadsPerBlock, 32, 1024, "default max threads per block for kern LANGOPT(GPUDeferDiag, 1, 0, "defer host/device related diagnostic messages for CUDA/HIP") LANGOPT(GPUExcludeWrongSideOverloads, 1, 0, "always exclude wrong side overloads in overloading resolution for CUDA/HIP") -LANGOPT(SYCL , 1, 0, "SYCL") LANGOPT(SYCLIsDevice , 1, 0, "Generate code for SYCL device") LANGOPT(SYCLIsHost , 1, 0, "SYCL host compilation") LANGOPT(SYCLAllowFuncPtr , 1, 0, "Allow function pointers in SYCL device code") diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 809f8ed9b60b7..33d292b429fd8 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -4287,19 +4287,18 @@ defm whole_file : BooleanFFlag<"whole-file">, Group; def reuse_exe_EQ : Joined<["-"], "reuse-exe=">, Flags<[CoreOption]>, HelpText<"Speed up FPGA aoc compile if the device code in is unchanged.">, MetaVarName<"">; -defm sycl : BoolOption<"f", "sycl", - LangOpts<"SYCL">, DefaultFalse, - PosFlag, NegFlag, - BothFlags<[CoreOption], " SYCL kernels compilation for device">>, - Group; +def fsycl : Flag<["-"], "fsycl">, Flags<[NoXarchOption, CoreOption]>, Group, + HelpText<"Enables SYCL kernels compilation for device">; +def fno_sycl : Flag<["-"], "fno-sycl">, Flags<[NoXarchOption, CoreOption]>, Group, + HelpText<"Disables SYCL kernels compilation for device">; def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group, Flags<[CC1Option, NoArgumentUnused, CoreOption]>, HelpText<"SYCL language standard to compile for.">, Values<"2020,2017,121,1.2.1,sycl-1.2.1">, NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>, NormalizedValuesScope<"LangOptions">, - MarshallingInfoString, "SYCL_None">, ShouldParseIf, AutoNormalizeEnum; + MarshallingInfoString, "SYCL_None">, AutoNormalizeEnum; defm sycl_esimd: BoolFOption<"sycl-explicit-simd", LangOpts<"SYCLExplicitSIMD">, DefaultFalse, PosFlag, NegFlag, - BothFlags<[NoArgumentUnused, CoreOption], " SYCL explicit SIMD extension.">>; + BothFlags<[NoArgumentUnused, CoreOption], "SYCL explicit SIMD extension.">>; defm sycl_early_optimizations : OptOutFFlag<"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler", [CoreOption]>; def fsycl_dead_args_optimization : Flag<["-"], "fsycl-dead-args-optimization">, Group, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enables " @@ -5513,8 +5512,7 @@ def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">, def fsycl_is_device : Flag<["-"], "fsycl-is-device">, HelpText<"Generate code for SYCL device.">, - MarshallingInfoFlag>, - ShouldParseIf; + MarshallingInfoFlag>; def fsycl_is_host : Flag<["-"], "fsycl-is-host">, HelpText<"SYCL host compilation">, MarshallingInfoFlag>; diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index f7c359dbd89e4..6d0cd586ae4b0 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -2098,7 +2098,7 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { Align = Target->getDoubleAlign(); break; case BuiltinType::LongDouble: - if (((getLangOpts().SYCL && getLangOpts().SYCLIsDevice) || + if ((getLangOpts().SYCLIsDevice || (getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice)) && AuxTarget != nullptr && (Target->getLongDoubleWidth() != AuxTarget->getLongDoubleWidth() || diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 8c48b6270492a..4c88006d0ce0f 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -9999,7 +9999,7 @@ LangAS SPIRTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM, LangAS AddrSpace = D->getType().getAddressSpace(); assert(AddrSpace == LangAS::Default || isTargetAddressSpace(AddrSpace) || // allow applying clang AST address spaces in SYCL mode - (CGM.getLangOpts().SYCL && CGM.getLangOpts().SYCLIsDevice)); + CGM.getLangOpts().SYCLIsDevice); if (AddrSpace != LangAS::Default) return AddrSpace; diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 9b4c3409682bb..9dd4bd06e685c 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -812,9 +812,9 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C, // If -fsycl is supplied without any of these we will assume SPIR-V. // Use of -fsycl-device-only overrides -fsycl. bool HasValidSYCLRuntime = - (C.getInputArgs().hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, - false) || - C.getInputArgs().hasArg(options::OPT_fsycl_device_only)); + C.getInputArgs().hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, + false) || + C.getInputArgs().hasArg(options::OPT_fsycl_device_only); // A mechanism for retrieving SYCL-specific options, erroring out // if SYCL offloading wasn't enabled prior to that diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 5b71aacabe0e8..e879101651add 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -4289,7 +4289,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (UseSYCLTriple) { // We want to compile sycl kernels. - CmdArgs.push_back("-fsycl"); CmdArgs.push_back("-fsycl-is-device"); CmdArgs.push_back("-fdeclare-spirv-builtins"); @@ -5880,8 +5879,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // Forward -cl options to -cc1 RenderOpenCLOptions(Args, CmdArgs); - // Forward -sycl-std option to -cc1 - Args.AddLastArg(CmdArgs, options::OPT_sycl_std_EQ); + // 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); if (IsHIP) { if (Args.hasFlag(options::OPT_fhip_new_launch_api, @@ -6563,7 +6563,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, } // Let the FE know we are doing a SYCL offload compilation, but we are // doing the host pass. - CmdArgs.push_back("-fsycl"); CmdArgs.push_back("-fsycl-is-host"); if (Args.hasFlag(options::OPT_fsycl_esimd, options::OPT_fno_sycl_esimd, diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 6279be71e5d7c..ec6287a127365 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -464,6 +464,11 @@ static void FixupInvocation(CompilerInvocation &Invocation, LangOpts.NewAlignOverride = 0; } + // Prevent the user from specifying both -fsycl-is-device and -fsycl-is-host. + if (LangOpts.SYCLIsDevice && LangOpts.SYCLIsHost) + Diags.Report(diag::err_drv_argument_not_allowed_with) << "-fsycl-is-device" + << "-fsycl-is-host"; + if (Args.hasArg(OPT_fgnu89_inline) && LangOpts.CPlusPlus) Diags.Report(diag::err_drv_argument_not_allowed_with) << "-fgnu89-inline" << GetInputKindName(IK); @@ -3706,7 +3711,7 @@ bool CompilerInvocation::ParseLangArgsImpl(LangOptions &Opts, ArgList &Args, LangStd = OpenCLLangStd; } - if (Opts.SYCL) { + if (Args.hasArg(OPT_fsycl_is_device) || Args.hasArg(OPT_fsycl_is_host)) { // -sycl-std applies to any SYCL source, not only those containing kernels, // but also those using the SYCL API if (const Arg *A = Args.getLastArg(OPT_sycl_std_EQ)) { diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index 20edcd624a180..ad745f9f65ffd 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -474,7 +474,7 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI, Builder.defineMacro("__FAST_RELAXED_MATH__"); } - if (LangOpts.SYCL) { + if (LangOpts.SYCLIsDevice || LangOpts.SYCLIsHost) { // SYCL Version is set to a value when building SYCL applications if (LangOpts.getSYCLVersion() == LangOptions::SYCL_2017) { Builder.defineMacro("CL_SYCL_LANGUAGE_VERSION", "121"); diff --git a/clang/test/CodeGenSYCL/accessor_inheritance.cpp b/clang/test/CodeGenSYCL/accessor_inheritance.cpp index 2a421b1389ab3..4946d1583036b 100644 --- a/clang/test/CodeGenSYCL/accessor_inheritance.cpp +++ b/clang/test/CodeGenSYCL/accessor_inheritance.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s #include "Inputs/sycl.hpp" struct Base { diff --git a/clang/test/CodeGenSYCL/address-space-cond-op.cpp b/clang/test/CodeGenSYCL/address-space-cond-op.cpp index dd65183485d4c..05e31626d14a7 100644 --- a/clang/test/CodeGenSYCL/address-space-cond-op.cpp +++ b/clang/test/CodeGenSYCL/address-space-cond-op.cpp @@ -1,5 +1,5 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py -// RUN: %clang_cc1 -x c++ -triple spir64-unknown-linux-sycldevice -disable-llvm-passes -fsycl -fsycl-is-device -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -x c++ -triple spir64-unknown-linux-sycldevice -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s struct S { unsigned short x; diff --git a/clang/test/CodeGenSYCL/address-space-initializer.cpp b/clang/test/CodeGenSYCL/address-space-initializer.cpp index c6946f9e9d9f4..e9d88854f23be 100644 --- a/clang/test/CodeGenSYCL/address-space-initializer.cpp +++ b/clang/test/CodeGenSYCL/address-space-initializer.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice \ +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice \ // RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s // This test checks that data for big constant initializer lists is placed diff --git a/clang/test/CodeGenSYCL/address-space-new.cpp b/clang/test/CodeGenSYCL/address-space-new.cpp index 0be436d6d5e4c..649b4a2904fa7 100644 --- a/clang/test/CodeGenSYCL/address-space-new.cpp +++ b/clang/test/CodeGenSYCL/address-space-new.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s struct SpaceWaster { int i, j; diff --git a/clang/test/CodeGenSYCL/address-space-of-returns.cpp b/clang/test/CodeGenSYCL/address-space-of-returns.cpp index 4602160feb784..07fcb6cd7946b 100644 --- a/clang/test/CodeGenSYCL/address-space-of-returns.cpp +++ b/clang/test/CodeGenSYCL/address-space-of-returns.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -fsycl -fsycl-is-device -disable-llvm-passes -emit-llvm -x c++ %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -fsycl-is-device -disable-llvm-passes -emit-llvm -x c++ %s -o - | FileCheck %s struct A { int B[42]; diff --git a/clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp b/clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp index c1b9d6f430b06..c953e5d0ab7fb 100644 --- a/clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp +++ b/clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s void bar(int & Data) {} // CHECK-DAG: define {{.*}}spir_func void @[[RAW_REF:[a-zA-Z0-9_]+]](i32 addrspace(4)* align 4 dereferenceable(4) % void bar2(int & Data) {} diff --git a/clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp b/clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp index 2d9748e3b138d..c5cfc1cd1c14b 100644 --- a/clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp +++ b/clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // This test checks that compiler generates correct kernel wrapper for basic // case. diff --git a/clang/test/CodeGenSYCL/buffer_location.cpp b/clang/test/CodeGenSYCL/buffer_location.cpp index 35448a9ff589b..930822b88922c 100644 --- a/clang/test/CodeGenSYCL/buffer_location.cpp +++ b/clang/test/CodeGenSYCL/buffer_location.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s // CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE15kernel_function{{.*}} !kernel_arg_buffer_location ![[MDBL:[0-9]+]] // CHECK: ![[MDBL]] = !{i32 3, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 2, i32 -1, i32 -1, i32 -1, i32 2, i32 -1, i32 -1, i32 -1, i32 -1} diff --git a/clang/test/CodeGenSYCL/const-wg-init.cpp b/clang/test/CodeGenSYCL/const-wg-init.cpp index c0c328db189e7..b227fec1e8f24 100644 --- a/clang/test/CodeGenSYCL/const-wg-init.cpp +++ b/clang/test/CodeGenSYCL/const-wg-init.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s #include "Inputs/sycl.hpp" diff --git a/clang/test/CodeGenSYCL/convergent.cpp b/clang/test/CodeGenSYCL/convergent.cpp index 784fb8976c271..58be1b153c937 100644 --- a/clang/test/CodeGenSYCL/convergent.cpp +++ b/clang/test/CodeGenSYCL/convergent.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -emit-llvm -disable-llvm-passes \ +// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -disable-llvm-passes \ // RUN: -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | \ // RUN: FileCheck %s diff --git a/clang/test/CodeGenSYCL/device-functions.cpp b/clang/test/CodeGenSYCL/device-functions.cpp index ff5db052a233f..07da10edd5ba1 100644 --- a/clang/test/CodeGenSYCL/device-functions.cpp +++ b/clang/test/CodeGenSYCL/device-functions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s template T bar(T arg); diff --git a/clang/test/CodeGenSYCL/device-indirectly-callable-attr.cpp b/clang/test/CodeGenSYCL/device-indirectly-callable-attr.cpp index d70ebb277c4e3..69e25d31f320f 100644 --- a/clang/test/CodeGenSYCL/device-indirectly-callable-attr.cpp +++ b/clang/test/CodeGenSYCL/device-indirectly-callable-attr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s void helper() {} diff --git a/clang/test/CodeGenSYCL/device-variables.cpp b/clang/test/CodeGenSYCL/device-variables.cpp index 79820a7ac5213..b0964bf6b4f28 100644 --- a/clang/test/CodeGenSYCL/device-variables.cpp +++ b/clang/test/CodeGenSYCL/device-variables.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s enum class test_type { value1, value2, value3 }; diff --git a/clang/test/CodeGenSYCL/emit-all-decls-crash.cpp b/clang/test/CodeGenSYCL/emit-all-decls-crash.cpp index dd86de09886ac..8f67d1f3cd4b4 100644 --- a/clang/test/CodeGenSYCL/emit-all-decls-crash.cpp +++ b/clang/test/CodeGenSYCL/emit-all-decls-crash.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -femit-all-decls -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -femit-all-decls -o - | FileCheck %s // This should not crash and we should not emit this declaration, even though // we have 'emit-all-decls'. diff --git a/clang/test/CodeGenSYCL/emit-kernel-in-virtual-func.cpp b/clang/test/CodeGenSYCL/emit-kernel-in-virtual-func.cpp index 53e88969a3efe..3643576ce3475 100644 --- a/clang/test/CodeGenSYCL/emit-kernel-in-virtual-func.cpp +++ b/clang/test/CodeGenSYCL/emit-kernel-in-virtual-func.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/emit-kernel-in-virtual-func2.cpp b/clang/test/CodeGenSYCL/emit-kernel-in-virtual-func2.cpp index 22cbde55c5839..579a2f7735f9e 100644 --- a/clang/test/CodeGenSYCL/emit-kernel-in-virtual-func2.cpp +++ b/clang/test/CodeGenSYCL/emit-kernel-in-virtual-func2.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/esimd-accessor-ptr-md.cpp b/clang/test/CodeGenSYCL/esimd-accessor-ptr-md.cpp index 30c93db551580..f88a6e0d895f8 100644 --- a/clang/test/CodeGenSYCL/esimd-accessor-ptr-md.cpp +++ b/clang/test/CodeGenSYCL/esimd-accessor-ptr-md.cpp @@ -3,7 +3,7 @@ // separate. So, we can split this test into 2, where one // will be testing code generation and the second ESIMD lowering. // -// RUN: %clang_cc1 -fsycl -fsycl-explicit-simd -fsycl-is-device \ +// RUN: %clang_cc1 -fsycl-explicit-simd -fsycl-is-device \ // RUN: -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice \ // RUN: -disable-llvm-passes -emit-llvm %s -o %t // RUN: sycl-post-link -split-esimd -lower-esimd -O0 -S %t -o %t.table diff --git a/clang/test/CodeGenSYCL/esimd-private-global.cpp b/clang/test/CodeGenSYCL/esimd-private-global.cpp index c60c1e1cf40d7..ca45e19505435 100644 --- a/clang/test/CodeGenSYCL/esimd-private-global.cpp +++ b/clang/test/CodeGenSYCL/esimd-private-global.cpp @@ -4,7 +4,7 @@ // will be testing code generation and the second ESIMD lowering. // // RUN: %clang_cc1 -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice \ -// RUN: -fsycl -fsycl-is-device -fsycl-explicit-simd -emit-llvm %s -o %t +// RUN: -fsycl-is-device -fsycl-explicit-simd -emit-llvm %s -o %t // RUN: sycl-post-link -split-esimd -lower-esimd -O0 -S %t -o %t.table // RUN: FileCheck %s -input-file=%t_esimd_0.ll diff --git a/clang/test/CodeGenSYCL/esimd_metadata1.cpp b/clang/test/CodeGenSYCL/esimd_metadata1.cpp index 265c324bccba3..d7ce7033cb2ac 100644 --- a/clang/test/CodeGenSYCL/esimd_metadata1.cpp +++ b/clang/test/CodeGenSYCL/esimd_metadata1.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice \ -// RUN: -fsycl -fsycl-is-device -fsycl-explicit-simd -S -emit-llvm %s -o - | \ +// RUN: -fsycl-is-device -fsycl-explicit-simd -S -emit-llvm %s -o - | \ // RUN: FileCheck %s // The test checks that: diff --git a/clang/test/CodeGenSYCL/esimd_metadata2.cpp b/clang/test/CodeGenSYCL/esimd_metadata2.cpp index 461149314cf43..32d1ff96ed85a 100644 --- a/clang/test/CodeGenSYCL/esimd_metadata2.cpp +++ b/clang/test/CodeGenSYCL/esimd_metadata2.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice -fsycl -fsycl-is-device -fsycl-explicit-simd -S -emit-llvm %s -o - | FileCheck %s --check-prefixes CHECK,CHECK-ESIMD +// RUN: %clang_cc1 -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice -fsycl-is-device -fsycl-explicit-simd -S -emit-llvm %s -o - | FileCheck %s --check-prefixes CHECK,CHECK-ESIMD // This test checks that attribute !intel_reqd_sub_group_size !1 // is added for kernels with !sycl_explicit_simd diff --git a/clang/test/CodeGenSYCL/filescope_asm.c b/clang/test/CodeGenSYCL/filescope_asm.c index 5f4f6709a0e18..3c1c12fd589a6 100644 --- a/clang/test/CodeGenSYCL/filescope_asm.c +++ b/clang/test/CodeGenSYCL/filescope_asm.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s // // Check that file-scope asm is ignored during device-side SYCL compilation. // diff --git a/clang/test/CodeGenSYCL/fpga_pipes.cpp b/clang/test/CodeGenSYCL/fpga_pipes.cpp index 237f9988f5893..a072f8d762292 100644 --- a/clang/test/CodeGenSYCL/fpga_pipes.cpp +++ b/clang/test/CodeGenSYCL/fpga_pipes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device %s -emit-llvm -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device %s -emit-llvm -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -o - | FileCheck %s // CHECK: %opencl.pipe_wo_t // CHECK: %opencl.pipe_ro_t diff --git a/clang/test/CodeGenSYCL/image_accessor.cpp b/clang/test/CodeGenSYCL/image_accessor.cpp index 817fb7eec7095..8b501c436138f 100644 --- a/clang/test/CodeGenSYCL/image_accessor.cpp +++ b/clang/test/CodeGenSYCL/image_accessor.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o %t.ll +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o %t.ll // RUN: FileCheck < %t.ll --enable-var-scope %s --check-prefix=CHECK-1DRO // RUN: FileCheck < %t.ll --enable-var-scope %s --check-prefix=CHECK-2DRO // RUN: FileCheck < %t.ll --enable-var-scope %s --check-prefix=CHECK-3DRO diff --git a/clang/test/CodeGenSYCL/inheritance.cpp b/clang/test/CodeGenSYCL/inheritance.cpp index 02453e1c61cf0..089f9448d13e8 100644 --- a/clang/test/CodeGenSYCL/inheritance.cpp +++ b/clang/test/CodeGenSYCL/inheritance.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s #include "Inputs/sycl.hpp" diff --git a/clang/test/CodeGenSYCL/inline_asm.cpp b/clang/test/CodeGenSYCL/inline_asm.cpp index f06d23f8bfcc6..61757c199a001 100644 --- a/clang/test/CodeGenSYCL/inline_asm.cpp +++ b/clang/test/CodeGenSYCL/inline_asm.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm -x c++ %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm -x c++ %s -o - | FileCheck %s class kernel; diff --git a/clang/test/CodeGenSYCL/inlining.cpp b/clang/test/CodeGenSYCL/inlining.cpp index a816d16f88a01..2881913df3939 100644 --- a/clang/test/CodeGenSYCL/inlining.cpp +++ b/clang/test/CodeGenSYCL/inlining.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice %s -S -emit-llvm -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/int_header1.cpp b/clang/test/CodeGenSYCL/int_header1.cpp index be932f13820c1..100a59da696ac 100644 --- a/clang/test/CodeGenSYCL/int_header1.cpp +++ b/clang/test/CodeGenSYCL/int_header1.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s // CHECK:template <> struct KernelInfo { diff --git a/clang/test/CodeGenSYCL/int_header_esimd.cpp b/clang/test/CodeGenSYCL/int_header_esimd.cpp index 9bb5a3e124106..70a1805c1ff42 100644 --- a/clang/test/CodeGenSYCL/int_header_esimd.cpp +++ b/clang/test/CodeGenSYCL/int_header_esimd.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-explicit-simd -fsycl-is-device -internal-isystem %S/Inputs -fsycl-int-header=%t.h %s +// RUN: %clang_cc1 -fsycl-explicit-simd -fsycl-is-device -internal-isystem %S/Inputs -fsycl-int-header=%t.h %s // RUN: FileCheck -input-file=%t.h %s // This test checks that diff --git a/clang/test/CodeGenSYCL/int_header_inline_ns.cpp b/clang/test/CodeGenSYCL/int_header_inline_ns.cpp index c7f0be55a1ad4..45784dc5ed92a 100644 --- a/clang/test/CodeGenSYCL/int_header_inline_ns.cpp +++ b/clang/test/CodeGenSYCL/int_header_inline_ns.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s // This test checks if the SYCL device compiler is able to generate correct diff --git a/clang/test/CodeGenSYCL/int_header_spec_const.cpp b/clang/test/CodeGenSYCL/int_header_spec_const.cpp index c9ca63bcecf64..d745e43d1b013 100644 --- a/clang/test/CodeGenSYCL/int_header_spec_const.cpp +++ b/clang/test/CodeGenSYCL/int_header_spec_const.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s #include "Inputs/sycl.hpp" diff --git a/clang/test/CodeGenSYCL/integration_header.cpp b/clang/test/CodeGenSYCL/integration_header.cpp index 5bc45080d4235..e8614b65c5488 100644 --- a/clang/test/CodeGenSYCL/integration_header.cpp +++ b/clang/test/CodeGenSYCL/integration_header.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -emit-llvm -o %t.ll +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -emit-llvm -o %t.ll // RUN: FileCheck -input-file=%t.h %s // // CHECK: #include diff --git a/clang/test/CodeGenSYCL/intel-fpga-ivdep-array.cpp b/clang/test/CodeGenSYCL/intel-fpga-ivdep-array.cpp index 47ef2d5addd3c..b46279909d7df 100644 --- a/clang/test/CodeGenSYCL/intel-fpga-ivdep-array.cpp +++ b/clang/test/CodeGenSYCL/intel-fpga-ivdep-array.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -fsycl -fsycl-is-device -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s // Array-specific ivdep - annotate the correspondent GEPs only // diff --git a/clang/test/CodeGenSYCL/intel-fpga-local.cpp b/clang/test/CodeGenSYCL/intel-fpga-local.cpp index 75d4b32a01307..07a8f7561c1a1 100644 --- a/clang/test/CodeGenSYCL/intel-fpga-local.cpp +++ b/clang/test/CodeGenSYCL/intel-fpga-local.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefixes CHECK-DEVICE,CHECK-BOTH +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefixes CHECK-DEVICE,CHECK-BOTH // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefixes CHECK-HOST,CHECK-BOTH // CHECK-BOTH: @_ZZ15attrs_on_staticvE15static_numbanks = internal{{.*}}constant i32 20, align 4 diff --git a/clang/test/CodeGenSYCL/intel-fpga-mem-builtin.cpp b/clang/test/CodeGenSYCL/intel-fpga-mem-builtin.cpp index 141462c4c2733..e4b67e960e496 100644 --- a/clang/test/CodeGenSYCL/intel-fpga-mem-builtin.cpp +++ b/clang/test/CodeGenSYCL/intel-fpga-mem-builtin.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-linux-sycldevice -std=c++11 -disable-llvm-passes -S -emit-llvm -x c++ %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-linux-sycldevice -std=c++11 -disable-llvm-passes -S -emit-llvm -x c++ %s -o - | FileCheck %s #define PARAM_1 1U << 7 #define PARAM_2 1U << 8 diff --git a/clang/test/CodeGenSYCL/intel-fpga-no-global-work-offset.cpp b/clang/test/CodeGenSYCL/intel-fpga-no-global-work-offset.cpp index a360337a26bfb..f8edf692f66e2 100644 --- a/clang/test/CodeGenSYCL/intel-fpga-no-global-work-offset.cpp +++ b/clang/test/CodeGenSYCL/intel-fpga-no-global-work-offset.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/intel-fpga-nofusion.cpp b/clang/test/CodeGenSYCL/intel-fpga-nofusion.cpp index 3fb268770b02a..899306aeb69f9 100644 --- a/clang/test/CodeGenSYCL/intel-fpga-nofusion.cpp +++ b/clang/test/CodeGenSYCL/intel-fpga-nofusion.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -fsycl -fsycl-is-device -internal-isystem %S/Inputs -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -fsycl-is-device -internal-isystem %S/Inputs -emit-llvm %s -o - | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/intel-fpga-reg.cpp b/clang/test/CodeGenSYCL/intel-fpga-reg.cpp index 380402592e1e1..a0f86ccbcb71f 100644 --- a/clang/test/CodeGenSYCL/intel-fpga-reg.cpp +++ b/clang/test/CodeGenSYCL/intel-fpga-reg.cpp @@ -1,5 +1,5 @@ // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --functions ["['foo']"] -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s struct st { int a; diff --git a/clang/test/CodeGenSYCL/intel-max-global-work-dim.cpp b/clang/test/CodeGenSYCL/intel-max-global-work-dim.cpp index e9e380455fe84..c127e98280114 100644 --- a/clang/test/CodeGenSYCL/intel-max-global-work-dim.cpp +++ b/clang/test/CodeGenSYCL/intel-max-global-work-dim.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/intel-max-work-group-size.cpp b/clang/test/CodeGenSYCL/intel-max-work-group-size.cpp index 5700ddfd16c1d..f59c8e91f9191 100644 --- a/clang/test/CodeGenSYCL/intel-max-work-group-size.cpp +++ b/clang/test/CodeGenSYCL/intel-max-work-group-size.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/intel-restrict.cpp b/clang/test/CodeGenSYCL/intel-restrict.cpp index 9e24c0e85903c..20aa089e35f26 100644 --- a/clang/test/CodeGenSYCL/intel-restrict.cpp +++ b/clang/test/CodeGenSYCL/intel-restrict.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device %s -emit-llvm -triple spir64-unknown-unknown-sycldevice -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device %s -emit-llvm -triple spir64-unknown-unknown-sycldevice -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/kernel-by-reference.cpp b/clang/test/CodeGenSYCL/kernel-by-reference.cpp index 23a09c43413a9..056eea081cadf 100644 --- a/clang/test/CodeGenSYCL/kernel-by-reference.cpp +++ b/clang/test/CodeGenSYCL/kernel-by-reference.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple spir64 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -verify -fsyntax-only -sycl-std=2017 -DSYCL2017 %s -// RUN: %clang_cc1 -triple spir64 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -verify -fsyntax-only -sycl-std=2020 -DSYCL2020 %s -// RUN: %clang_cc1 -triple spir64 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -verify -fsyntax-only -Wno-sycl-strict -DNODIAG %s -// RUN: %clang_cc1 -triple spir64 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -verify -fsyntax-only -sycl-std=2020 -Wno-sycl-strict -DNODIAG %s +// RUN: %clang_cc1 -triple spir64 -fsycl-is-device -internal-isystem %S/Inputs -verify -fsyntax-only -sycl-std=2017 -DSYCL2017 %s +// RUN: %clang_cc1 -triple spir64 -fsycl-is-device -internal-isystem %S/Inputs -verify -fsyntax-only -sycl-std=2020 -DSYCL2020 %s +// RUN: %clang_cc1 -triple spir64 -fsycl-is-device -internal-isystem %S/Inputs -verify -fsyntax-only -Wno-sycl-strict -DNODIAG %s +// RUN: %clang_cc1 -triple spir64 -fsycl-is-device -internal-isystem %S/Inputs -verify -fsyntax-only -sycl-std=2020 -Wno-sycl-strict -DNODIAG %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/kernel-device-space-arg.cpp b/clang/test/CodeGenSYCL/kernel-device-space-arg.cpp index 01f3c7a2c6c4a..68226d4ef17c2 100644 --- a/clang/test/CodeGenSYCL/kernel-device-space-arg.cpp +++ b/clang/test/CodeGenSYCL/kernel-device-space-arg.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -disable-llvm-passes -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -disable-llvm-passes -o - | FileCheck %s // CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE15kernel_function(i32 addrspace(5)* {{.*}} i32 addrspace(6)* {{.*}} diff --git a/clang/test/CodeGenSYCL/kernel-early-optimization-pipeline.cpp b/clang/test/CodeGenSYCL/kernel-early-optimization-pipeline.cpp index 5dd2c49fa7387..0bbc8b7b2b3a0 100644 --- a/clang/test/CodeGenSYCL/kernel-early-optimization-pipeline.cpp +++ b/clang/test/CodeGenSYCL/kernel-early-optimization-pipeline.cpp @@ -1,10 +1,10 @@ // Check LLVM optimization pipeline is run by default for SPIR-V compiled for // SYCL device target, and can be disabled with -fno-sycl-early-optimizations. // -// RUN: %clang_cc1 -O2 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-EARLYOPT +// RUN: %clang_cc1 -O2 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-EARLYOPT // CHECK-EARLYOPT: Lower Work Group Scope Code // CHECK-EARLYOPT: Combine redundant instructions // -// RUN: %clang_cc1 -O2 -fsycl -fsycl-is-device -fno-sycl-early-optimizations -triple spir64-unknown-unknown-sycldevice %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NOEARLYOPT +// RUN: %clang_cc1 -O2 -fsycl-is-device -fno-sycl-early-optimizations -triple spir64-unknown-unknown-sycldevice %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NOEARLYOPT // CHECK-NOEARLYOPT: Lower Work Group Scope Code // CHECK-NOEARLYOPT-NOT: Combine redundant instructions diff --git a/clang/test/CodeGenSYCL/kernel-metadata.cpp b/clang/test/CodeGenSYCL/kernel-metadata.cpp index 09fc87799eddd..65dad40e6b9c8 100644 --- a/clang/test/CodeGenSYCL/kernel-metadata.cpp +++ b/clang/test/CodeGenSYCL/kernel-metadata.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s // CHECK-NOT: define {{.*}}spir_kernel void @{{.*}}kernel_function{{.*}} !kernel_arg_addr_space {{.*}} !kernel_arg_access_qual {{.*}} !kernel_arg_type {{.*}} !kernel_arg_base_type {{.*}} !kernel_arg_type_qual {{.*}} diff --git a/clang/test/CodeGenSYCL/kernel-name.cpp b/clang/test/CodeGenSYCL/kernel-name.cpp index 08c47be78ac01..f308def1067d2 100644 --- a/clang/test/CodeGenSYCL/kernel-name.cpp +++ b/clang/test/CodeGenSYCL/kernel-name.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-linux-sycldevice -std=c++11 -S -emit-llvm -x c++ %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-linux-sycldevice -std=c++11 -S -emit-llvm -x c++ %s -o - | FileCheck %s inline namespace cl { namespace sycl { diff --git a/clang/test/CodeGenSYCL/kernel-param-acc-array-ih.cpp b/clang/test/CodeGenSYCL/kernel-param-acc-array-ih.cpp index 88a210ffa74d3..e2af14db2b738 100644 --- a/clang/test/CodeGenSYCL/kernel-param-acc-array-ih.cpp +++ b/clang/test/CodeGenSYCL/kernel-param-acc-array-ih.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only // RUN: FileCheck -input-file=%t.h %s // This test checks the integration header generated when diff --git a/clang/test/CodeGenSYCL/kernel-param-acc-array.cpp b/clang/test/CodeGenSYCL/kernel-param-acc-array.cpp index f116fff36e9b2..f4746b8024ceb 100644 --- a/clang/test/CodeGenSYCL/kernel-param-acc-array.cpp +++ b/clang/test/CodeGenSYCL/kernel-param-acc-array.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // This test checks a kernel argument that is an Accessor array diff --git a/clang/test/CodeGenSYCL/kernel-param-member-acc-array-ih.cpp b/clang/test/CodeGenSYCL/kernel-param-member-acc-array-ih.cpp index 43889ab88ff6e..a1acf12821ceb 100644 --- a/clang/test/CodeGenSYCL/kernel-param-member-acc-array-ih.cpp +++ b/clang/test/CodeGenSYCL/kernel-param-member-acc-array-ih.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only // RUN: FileCheck -input-file=%t.h %s // This test checks the integration header when kernel argument diff --git a/clang/test/CodeGenSYCL/kernel-param-member-acc-array.cpp b/clang/test/CodeGenSYCL/kernel-param-member-acc-array.cpp index 2ca0b0ec3609f..614259d7b7ed7 100644 --- a/clang/test/CodeGenSYCL/kernel-param-member-acc-array.cpp +++ b/clang/test/CodeGenSYCL/kernel-param-member-acc-array.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // This test checks a kernel with struct parameter that contains an Accessor array. diff --git a/clang/test/CodeGenSYCL/kernel-param-pod-array-ih.cpp b/clang/test/CodeGenSYCL/kernel-param-pod-array-ih.cpp index 79e241adab6d0..5dbc53ec0afaf 100644 --- a/clang/test/CodeGenSYCL/kernel-param-pod-array-ih.cpp +++ b/clang/test/CodeGenSYCL/kernel-param-pod-array-ih.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only // RUN: FileCheck -input-file=%t.h %s // This test checks the integration header generated for a kernel // with an argument that is a POD array. diff --git a/clang/test/CodeGenSYCL/kernel-param-pod-array.cpp b/clang/test/CodeGenSYCL/kernel-param-pod-array.cpp index a6c0a4f3f1cda..9e1ca7c028c9d 100644 --- a/clang/test/CodeGenSYCL/kernel-param-pod-array.cpp +++ b/clang/test/CodeGenSYCL/kernel-param-pod-array.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // This test checks a kernel with an argument that is a POD array. diff --git a/clang/test/CodeGenSYCL/kernel_functor.cpp b/clang/test/CodeGenSYCL/kernel_functor.cpp index 843db4ae59119..1152a9524bfd2 100644 --- a/clang/test/CodeGenSYCL/kernel_functor.cpp +++ b/clang/test/CodeGenSYCL/kernel_functor.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.spv +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.spv // RUN: FileCheck %s --input-file=%t.h // Checks that functors are supported as SYCL kernels. diff --git a/clang/test/CodeGenSYCL/kernel_name_with_typedefs.cpp b/clang/test/CodeGenSYCL/kernel_name_with_typedefs.cpp index 90980824c1682..5cb46384b54fa 100644 --- a/clang/test/CodeGenSYCL/kernel_name_with_typedefs.cpp +++ b/clang/test/CodeGenSYCL/kernel_name_with_typedefs.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s #include "Inputs/sycl.hpp" diff --git a/clang/test/CodeGenSYCL/kernelname-enum.cpp b/clang/test/CodeGenSYCL/kernelname-enum.cpp index 77024aed16614..dcedcbfd8b03b 100644 --- a/clang/test/CodeGenSYCL/kernelname-enum.cpp +++ b/clang/test/CodeGenSYCL/kernelname-enum.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only // RUN: FileCheck -input-file=%t.h %s #include "Inputs/sycl.hpp" diff --git a/clang/test/CodeGenSYCL/loop_fuse_device.cpp b/clang/test/CodeGenSYCL/loop_fuse_device.cpp index 41e281673e1b9..645bb908d24c1 100644 --- a/clang/test/CodeGenSYCL/loop_fuse_device.cpp +++ b/clang/test/CodeGenSYCL/loop_fuse_device.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/loop_fuse_ind_device.cpp b/clang/test/CodeGenSYCL/loop_fuse_ind_device.cpp index cab9c90177bc4..49cc7640e1de7 100644 --- a/clang/test/CodeGenSYCL/loop_fuse_ind_device.cpp +++ b/clang/test/CodeGenSYCL/loop_fuse_ind_device.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/loop_fusion_host.cpp b/clang/test/CodeGenSYCL/loop_fusion_host.cpp index 98237d61a6dba..0cddfd6d6ed1d 100644 --- a/clang/test/CodeGenSYCL/loop_fusion_host.cpp +++ b/clang/test/CodeGenSYCL/loop_fusion_host.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -triple -x86_64-unknown-linux-gnu -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-host -triple -x86_64-unknown-linux-gnu -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s template __attribute__((sycl_kernel)) void kernel(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/loop_unroll.cpp b/clang/test/CodeGenSYCL/loop_unroll.cpp index 18299f50d8d6f..e907348e437c5 100644 --- a/clang/test/CodeGenSYCL/loop_unroll.cpp +++ b/clang/test/CodeGenSYCL/loop_unroll.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s - void enable() { + // CHECK-LABEL: define dso_local spir_func void @_Z6enablev() int i = 1000; // CHECK: br i1 %{{.*}}, label %do.body, label %do.end, !llvm.loop ![[ENABLE:[0-9]+]] [[clang::loop_unroll]] @@ -10,6 +10,7 @@ void enable() { template void count() { + // CHECK-LABEL: define linkonce_odr spir_func void @_Z5countILi4EEvv() // CHECK: br label %for.cond, !llvm.loop ![[COUNT:[0-9]+]] [[clang::loop_unroll(8)]] for (int i = 0; i < 1000; ++i); @@ -20,6 +21,7 @@ void count() { template void disable() { + // CHECK-LABEL: define linkonce_odr spir_func void @_Z7disableILi1EEvv() int i = 1000, j = 100; // CHECK: br label %while.cond, !llvm.loop ![[DISABLE:[0-9]+]] [[clang::loop_unroll(1)]] @@ -36,9 +38,9 @@ __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { int main() { kernel_single_task([]() { + enable(); count<4>(); disable<1>(); - enable(); }); return 0; } @@ -52,4 +54,4 @@ int main() { // CHECK-NEXT: ![[COUNT_TEMPLATE_A]] = !{!"llvm.loop.unroll.count", i32 4} // CHECK: ![[DISABLE]] = distinct !{![[DISABLE]], ![[MP]], ![[DISABLE_A:[0-9]+]]} // CHECK-NEXT: ![[DISABLE_A]] = !{!"llvm.loop.unroll.disable"} -// CHECKL ![[DISABLE_TEMPLATE]] = distinct !{!![[DISABLE_TEMPLATE]], ![[MP]], ![[DISABLE_A]]} +// CHECK: ![[DISABLE_TEMPLATE]] = distinct !{![[DISABLE_TEMPLATE]], ![[MP]], ![[DISABLE_A]]} diff --git a/clang/test/CodeGenSYCL/module-id.cpp b/clang/test/CodeGenSYCL/module-id.cpp index 879d6acd0d86b..1f4365676468b 100644 --- a/clang/test/CodeGenSYCL/module-id.cpp +++ b/clang/test/CodeGenSYCL/module-id.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/noexcept.cpp b/clang/test/CodeGenSYCL/noexcept.cpp index f474da21affdc..0673e4b2d055d 100644 --- a/clang/test/CodeGenSYCL/noexcept.cpp +++ b/clang/test/CodeGenSYCL/noexcept.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -I%S \ +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -I%S \ // RUN: -fcxx-exceptions -fexceptions -disable-llvm-passes \ // RUN: -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-DEVICE // diff --git a/clang/test/CodeGenSYCL/non-standard-layout.cpp b/clang/test/CodeGenSYCL/non-standard-layout.cpp index f133f7fc94c9c..41bd8dff55398 100644 --- a/clang/test/CodeGenSYCL/non-standard-layout.cpp +++ b/clang/test/CodeGenSYCL/non-standard-layout.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-windows-unknown -disable-llvm-passes -S -emit-llvm %s -o - | FileCheck --check-prefix CHK-WIN %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-linux-unknown -disable-llvm-passes -S -emit-llvm %s -o - | FileCheck --check-prefix CHK-LIN %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-windows-unknown -disable-llvm-passes -S -emit-llvm %s -o - | FileCheck --check-prefix CHK-WIN %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-linux-unknown -disable-llvm-passes -S -emit-llvm %s -o - | FileCheck --check-prefix CHK-LIN %s #include "Inputs/sycl.hpp" // CHK-WIN: %struct{{.*}}F = type { i8, i8 } diff --git a/clang/test/CodeGenSYCL/num-simd-work-items.cpp b/clang/test/CodeGenSYCL/num-simd-work-items.cpp index 7a5f3892171fd..a5c28285f0ef0 100644 --- a/clang/test/CodeGenSYCL/num-simd-work-items.cpp +++ b/clang/test/CodeGenSYCL/num-simd-work-items.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/parallel_for_this_item.cpp b/clang/test/CodeGenSYCL/parallel_for_this_item.cpp index 7c9bee0c4a69d..25269187e9346 100755 --- a/clang/test/CodeGenSYCL/parallel_for_this_item.cpp +++ b/clang/test/CodeGenSYCL/parallel_for_this_item.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -fsyntax-only // RUN: FileCheck -input-file=%t.h %s // This test checks that compiler generates correct kernel description diff --git a/clang/test/CodeGenSYCL/pointers-in-structs.cpp b/clang/test/CodeGenSYCL/pointers-in-structs.cpp index 2f41ad9852cf3..49fc9e4ea7fb2 100644 --- a/clang/test/CodeGenSYCL/pointers-in-structs.cpp +++ b/clang/test/CodeGenSYCL/pointers-in-structs.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // This test checks that compiler generates correct address spaces for pointer // kernel arguments that are wrapped by struct. diff --git a/clang/test/CodeGenSYCL/pointers-int-header.cpp b/clang/test/CodeGenSYCL/pointers-int-header.cpp index d48b537fd818e..29149670788d4 100644 --- a/clang/test/CodeGenSYCL/pointers-int-header.cpp +++ b/clang/test/CodeGenSYCL/pointers-int-header.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s // This test checks the integration header generated when: diff --git a/clang/test/CodeGenSYCL/remove-ur-inst.cpp b/clang/test/CodeGenSYCL/remove-ur-inst.cpp index 4b799f0996ab1..88ad9dfa0a0bb 100644 --- a/clang/test/CodeGenSYCL/remove-ur-inst.cpp +++ b/clang/test/CodeGenSYCL/remove-ur-inst.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fno-sycl-early-optimizations -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fno-sycl-early-optimizations -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s SYCL_EXTERNAL void doesNotReturn() throw() __attribute__((__noreturn__)); diff --git a/clang/test/CodeGenSYCL/reqd-sub-group-size.cpp b/clang/test/CodeGenSYCL/reqd-sub-group-size.cpp index 8325beb99e8f3..aa9c104cfc61f 100644 --- a/clang/test/CodeGenSYCL/reqd-sub-group-size.cpp +++ b/clang/test/CodeGenSYCL/reqd-sub-group-size.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/reqd-work-group-size.cpp b/clang/test/CodeGenSYCL/reqd-work-group-size.cpp index 230494ee72e51..11047dbff3168 100644 --- a/clang/test/CodeGenSYCL/reqd-work-group-size.cpp +++ b/clang/test/CodeGenSYCL/reqd-work-group-size.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/sampler.cpp b/clang/test/CodeGenSYCL/sampler.cpp index dfe58a127592e..b771290db7929 100644 --- a/clang/test/CodeGenSYCL/sampler.cpp +++ b/clang/test/CodeGenSYCL/sampler.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck --enable-var-scope %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck --enable-var-scope %s // CHECK: define {{.*}}spir_kernel void @{{[a-zA-Z0-9_]+}}(%opencl.sampler_t addrspace(2)* [[SAMPLER_ARG:%[a-zA-Z0-9_]+]]) // CHECK-NEXT: entry: // CHECK-NEXT: [[SAMPLER_ARG]].addr = alloca %opencl.sampler_t addrspace(2)*, align 8 diff --git a/clang/test/CodeGenSYCL/scheduler-target-fmax-mhz.cpp b/clang/test/CodeGenSYCL/scheduler-target-fmax-mhz.cpp index 1fb7fd2513bd2..21c981220528e 100644 --- a/clang/test/CodeGenSYCL/scheduler-target-fmax-mhz.cpp +++ b/clang/test/CodeGenSYCL/scheduler-target-fmax-mhz.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice -emit-llvm -o - %s | FileCheck %s #include "Inputs/sycl.hpp" [[intel::scheduler_target_fmax_mhz(5)]] void diff --git a/clang/test/CodeGenSYCL/skip-host-classes.cpp b/clang/test/CodeGenSYCL/skip-host-classes.cpp index 829bb9bf828e4..3c5ef3b5ed6d0 100644 --- a/clang/test/CodeGenSYCL/skip-host-classes.cpp +++ b/clang/test/CodeGenSYCL/skip-host-classes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // CHECK-NOT: declare dso_local spir_func void {{.+}}test{{.+}}printer{{.+}} class test { diff --git a/clang/test/CodeGenSYCL/spir-calling-conv.cpp b/clang/test/CodeGenSYCL/spir-calling-conv.cpp index 7efdf06c09fe6..d810ba897f4e5 100644 --- a/clang/test/CodeGenSYCL/spir-calling-conv.cpp +++ b/clang/test/CodeGenSYCL/spir-calling-conv.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/spir-enum.cpp b/clang/test/CodeGenSYCL/spir-enum.cpp index ba519e539e7d9..09d12be1d190a 100644 --- a/clang/test/CodeGenSYCL/spir-enum.cpp +++ b/clang/test/CodeGenSYCL/spir-enum.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/spir-opencl-version.cpp b/clang/test/CodeGenSYCL/spir-opencl-version.cpp index 5729020883565..01cde0b56f16f 100644 --- a/clang/test/CodeGenSYCL/spir-opencl-version.cpp +++ b/clang/test/CodeGenSYCL/spir-opencl-version.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { diff --git a/clang/test/CodeGenSYCL/stall_enable.cpp b/clang/test/CodeGenSYCL/stall_enable.cpp index 31acb62f42273..1cf6036afb50d 100644 --- a/clang/test/CodeGenSYCL/stall_enable.cpp +++ b/clang/test/CodeGenSYCL/stall_enable.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/static-var-address-space.cpp b/clang/test/CodeGenSYCL/static-var-address-space.cpp index f5d6b7b270411..001d94d832257 100644 --- a/clang/test/CodeGenSYCL/static-var-address-space.cpp +++ b/clang/test/CodeGenSYCL/static-var-address-space.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s #include "Inputs/sycl.hpp" struct C { static int c; diff --git a/clang/test/CodeGenSYCL/stream.cpp b/clang/test/CodeGenSYCL/stream.cpp index 5f2c048438991..cfc354efa0686 100644 --- a/clang/test/CodeGenSYCL/stream.cpp +++ b/clang/test/CodeGenSYCL/stream.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o %t.ll +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o %t.ll // RUN: FileCheck < %t.ll --enable-var-scope %s // // CHECK: define {{.*}}spir_kernel void @"{{.*}}StreamTester"(%"{{.*}}cl::sycl::stream"* byval(%"{{.*}}cl::sycl::stream") {{.*}}){{.*}} diff --git a/clang/test/CodeGenSYCL/struct_kernel_param.cpp b/clang/test/CodeGenSYCL/struct_kernel_param.cpp index 11c1526f41040..31a9de56d2056 100644 --- a/clang/test/CodeGenSYCL/struct_kernel_param.cpp +++ b/clang/test/CodeGenSYCL/struct_kernel_param.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s // CHECK: const kernel_param_desc_t kernel_signatures[] = { diff --git a/clang/test/CodeGenSYCL/sycl-device-alias.cpp b/clang/test/CodeGenSYCL/sycl-device-alias.cpp index 9f8de327c390e..c4f4e65209e56 100644 --- a/clang/test/CodeGenSYCL/sycl-device-alias.cpp +++ b/clang/test/CodeGenSYCL/sycl-device-alias.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // Test that aliasing does not force an unused entity to be emitted // CHECK-NOT: define {{.*}}spir_func void @unused_func() diff --git a/clang/test/CodeGenSYCL/sycl-device-static-init.cpp b/clang/test/CodeGenSYCL/sycl-device-static-init.cpp index 6b037d632cc56..61bab3383c0bb 100644 --- a/clang/test/CodeGenSYCL/sycl-device-static-init.cpp +++ b/clang/test/CodeGenSYCL/sycl-device-static-init.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s // Test that static initializers do not force the emission of globals on sycl device // CHECK-NOT: $_ZN8BaseInitI12TestBaseTypeE15s_regbase_ncsdmE = comdat any diff --git a/clang/test/CodeGenSYCL/sycl-device-used-attr.cpp b/clang/test/CodeGenSYCL/sycl-device-used-attr.cpp index 0f35e1137995c..911019acc33f6 100644 --- a/clang/test/CodeGenSYCL/sycl-device-used-attr.cpp +++ b/clang/test/CodeGenSYCL/sycl-device-used-attr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s // Test that the 'used' attribute does not force the emission of globals on sycl device // CHECK-NOT: @_ZN1hI1aE1iE diff --git a/clang/test/CodeGenSYCL/sycl-device.cpp b/clang/test/CodeGenSYCL/sycl-device.cpp index 12a363476185b..6aa4e05b19c97 100644 --- a/clang/test/CodeGenSYCL/sycl-device.cpp +++ b/clang/test/CodeGenSYCL/sycl-device.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // Test code generation for sycl_device attribute. int bar(int b); diff --git a/clang/test/CodeGenSYCL/sycl-multi-kernel-attr.cpp b/clang/test/CodeGenSYCL/sycl-multi-kernel-attr.cpp index 6f712f38e188a..f2cecd45fcf8d 100644 --- a/clang/test/CodeGenSYCL/sycl-multi-kernel-attr.cpp +++ b/clang/test/CodeGenSYCL/sycl-multi-kernel-attr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/CodeGenSYCL/sycl_kernel-host.cpp b/clang/test/CodeGenSYCL/sycl_kernel-host.cpp index e18da6798db6a..5bd3cdde3345c 100644 --- a/clang/test/CodeGenSYCL/sycl_kernel-host.cpp +++ b/clang/test/CodeGenSYCL/sycl_kernel-host.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -triple spir64 -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-host -triple spir64 -disable-llvm-passes %s -emit-llvm -o - | FileCheck %s // Test that the kernel implementation routine marked with 'sycl_kernel' // has the attribute 'sycl_kernel' in the generated LLVM IR and that the // function object passed to the sycl kernel is marked 'alwaysinline' diff --git a/clang/test/CodeGenSYCL/template-template-parameter.cpp b/clang/test/CodeGenSYCL/template-template-parameter.cpp index 1a23e30a590b5..63f049976063f 100644 --- a/clang/test/CodeGenSYCL/template-template-parameter.cpp +++ b/clang/test/CodeGenSYCL/template-template-parameter.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h -sycl-std=2020 %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h -sycl-std=2020 %s // RUN: FileCheck -input-file=%t.h %s #include "Inputs/sycl.hpp" diff --git a/clang/test/CodeGenSYCL/union-kernel-param-ih.cpp b/clang/test/CodeGenSYCL/union-kernel-param-ih.cpp index 4dddedc1e5c52..b4a71f0a60e41 100644 --- a/clang/test/CodeGenSYCL/union-kernel-param-ih.cpp +++ b/clang/test/CodeGenSYCL/union-kernel-param-ih.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s // This test checks the integration header generated when diff --git a/clang/test/CodeGenSYCL/union-kernel-param.cpp b/clang/test/CodeGenSYCL/union-kernel-param.cpp index ee22e92a80347..c0a07ae26a79b 100644 --- a/clang/test/CodeGenSYCL/union-kernel-param.cpp +++ b/clang/test/CodeGenSYCL/union-kernel-param.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // This test checks a kernel argument that is union with both array and non-array fields. diff --git a/clang/test/CodeGenSYCL/unique-stable-name-placeholder-crash.cpp b/clang/test/CodeGenSYCL/unique-stable-name-placeholder-crash.cpp index ba28e35ae00af..b6da2c9a9d070 100644 --- a/clang/test/CodeGenSYCL/unique-stable-name-placeholder-crash.cpp +++ b/clang/test/CodeGenSYCL/unique-stable-name-placeholder-crash.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -internal-isystem %S/Inputs -std=c++17 -sycl-std=2020 -fsycl -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -internal-isystem %S/Inputs -std=c++17 -sycl-std=2020 -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s #include diff --git a/clang/test/CodeGenSYCL/unique-stable-name.cpp b/clang/test/CodeGenSYCL/unique-stable-name.cpp index f2c38737b95e5..2259548c1a29e 100644 --- a/clang/test/CodeGenSYCL/unique-stable-name.cpp +++ b/clang/test/CodeGenSYCL/unique-stable-name.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -fsycl -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s // CHECK: @[[INT:[^\w]+]] = private unnamed_addr addrspace(1) constant [[INT_SIZE:\[[0-9]+ x i8\]]] c"_ZTSi\00" // CHECK: @[[LAMBDA_X:[^\w]+]] = private unnamed_addr addrspace(1) constant [[LAMBDA_X_SIZE:\[[0-9]+ x i8\]]] c"_ZTSZZ4mainENKUlvE42_5clEvEUlvE46_16\00" // CHECK: @[[MACRO_X:[^\w]+]] = private unnamed_addr addrspace(1) constant [[MACRO_SIZE:\[[0-9]+ x i8\]]] c"_ZTSZZ4mainENKUlvE42_5clEvEUlvE52_7m28_18\00" diff --git a/clang/test/CodeGenSYCL/usm-int-header.cpp b/clang/test/CodeGenSYCL/usm-int-header.cpp index 35bb1e4012787..b7af7b4aa7321 100644 --- a/clang/test/CodeGenSYCL/usm-int-header.cpp +++ b/clang/test/CodeGenSYCL/usm-int-header.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s -// RUN: %clang_cc1 -fsycl -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s --check-prefix=INT-HEADER // INT-HEADER:{ kernel_param_kind_t::kind_pointer, 8, 0 }, diff --git a/clang/test/CodeGenSYCL/virtual-types.cpp b/clang/test/CodeGenSYCL/virtual-types.cpp index 48bb1b17456f5..78c287fb35fec 100644 --- a/clang/test/CodeGenSYCL/virtual-types.cpp +++ b/clang/test/CodeGenSYCL/virtual-types.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-linux-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-linux-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { kernelFunc(); diff --git a/clang/test/CodeGenSYCL/wrapped-accessor.cpp b/clang/test/CodeGenSYCL/wrapped-accessor.cpp index c67ae01ee1ba0..be2ed923e4e7e 100644 --- a/clang/test/CodeGenSYCL/wrapped-accessor.cpp +++ b/clang/test/CodeGenSYCL/wrapped-accessor.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -o %t.out // RUN: FileCheck -input-file=%t.h %s // // CHECK: #include diff --git a/clang/test/Driver/sycl-offload.cpp b/clang/test/Driver/sycl-offload.cpp index 5eadd409f127c..3729173ad5545 100644 --- a/clang/test/Driver/sycl-offload.cpp +++ b/clang/test/Driver/sycl-offload.cpp @@ -22,5 +22,5 @@ // RUN: %clang -### -fsycl -E %s 2>&1 | FileCheck -check-prefix=CHECK-OPTS %s // RUN: %clang -### -fsycl -S %s 2>&1 | FileCheck -check-prefix=CHECK-OPTS %s // RUN: %clang -### -fsycl %s 2>&1 | FileCheck -check-prefix=CHECK-OPTS %s -// CHECK-OPTS: clang{{.*}} "-cc1" {{.*}} "-fsycl" "-fsycl-is-device" -// CHECK-OPTS: clang{{.*}} "-cc1" {{.*}} "-fsycl" "-fsycl-is-host" +// CHECK-OPTS: clang{{.*}} "-cc1" {{.*}} "-fsycl-is-device" +// CHECK-OPTS: clang{{.*}} "-cc1" {{.*}} "-fsycl-is-host" diff --git a/clang/test/Frontend/sycl-aux-triple.cpp b/clang/test/Frontend/sycl-aux-triple.cpp index ae36b53c28b71..38b6a24fb3ce9 100644 --- a/clang/test/Frontend/sycl-aux-triple.cpp +++ b/clang/test/Frontend/sycl-aux-triple.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 %s -triple spir -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck %s -// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -triple spir -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck --check-prefix=CHECK-SYCL %s +// RUN: %clang_cc1 %s -fsycl-is-device -triple spir -aux-triple x86_64-unknown-linux-gnu -E -dM | FileCheck --check-prefix=CHECK-SYCL %s // CHECK-NOT:#define __x86_64__ 1 // CHECK-SYCL:#define __x86_64__ 1 diff --git a/clang/test/Frontend/sycl.cpp b/clang/test/Frontend/sycl.cpp new file mode 100644 index 0000000000000..728a0b336607e --- /dev/null +++ b/clang/test/Frontend/sycl.cpp @@ -0,0 +1,13 @@ +// Test that we disallow -cc1 -fsycl, even when specifying device or host mode. + +// RUN: not %clang_cc1 -fsycl %s 2>&1 | FileCheck --check-prefix=ERROR %s +// RUN: not %clang_cc1 -fsycl -fsycl-is-device %s 2>&1 | FileCheck --check-prefix=ERROR %s +// RUN: not %clang_cc1 -fsycl -fsycl-is-host %s 2>&1 | FileCheck --check-prefix=ERROR %s + +// ERROR: error: unknown argument: '-fsycl' + +// Test that you cannot specify -fscyl-is-device and -fsycl-is-host at the same time. +// RUN: not %clang_cc1 -fsycl-is-device -fsycl-is-host %s 2>&1 | FileCheck --check-prefix=ERROR-BOTH %s +// RUN: not %clang_cc1 -fsycl-is-host -fsycl-is-device %s 2>&1 | FileCheck --check-prefix=ERROR-BOTH %s + +// ERROR-BOTH: error: invalid argument '-fsycl-is-device' not allowed with '-fsycl-is-host' diff --git a/clang/test/Preprocessor/sycl-macro.cpp b/clang/test/Preprocessor/sycl-macro.cpp index 8a0be0841da47..2f92bb9e26c74 100644 --- a/clang/test/Preprocessor/sycl-macro.cpp +++ b/clang/test/Preprocessor/sycl-macro.cpp @@ -1,9 +1,9 @@ // RUN: %clang_cc1 %s -E -dM | FileCheck %s -// RUN: %clang_cc1 %s -fsycl -fsycl-id-queries-fit-in-int -fsycl-is-host -sycl-std=2017 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s -// RUN: %clang_cc1 %s -fsycl -fsycl-id-queries-fit-in-int -fsycl-is-device -sycl-std=2017 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s -// RUN: %clang_cc1 %s -fsycl -fsycl-id-queries-fit-in-int -fsycl-is-device -sycl-std=2020 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD-2020 %s -// RUN: %clang_cc1 %s -fsycl -fsycl-id-queries-fit-in-int -fsycl-is-device -sycl-std=1.2.1 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD-DEVICE %s -// RUNx: %clang_cc1 %s -fsycl -fsycl-id-queries-fit-in-int -fsycl-is-device -E -dM -fms-compatibility | FileCheck --check-prefix=CHECK-MSVC %s +// RUN: %clang_cc1 %s -fsycl-id-queries-fit-in-int -fsycl-is-host -sycl-std=2017 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s +// RUN: %clang_cc1 %s -fsycl-id-queries-fit-in-int -fsycl-is-device -sycl-std=2017 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD %s +// RUN: %clang_cc1 %s -fsycl-id-queries-fit-in-int -fsycl-is-device -sycl-std=2020 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD-2020 %s +// RUN: %clang_cc1 %s -fsycl-id-queries-fit-in-int -fsycl-is-device -sycl-std=1.2.1 -E -dM | FileCheck --check-prefix=CHECK-SYCL-STD-DEVICE %s +// RUNx: %clang_cc1 %s -fsycl-id-queries-fit-in-int -fsycl-is-device -E -dM -fms-compatibility | FileCheck --check-prefix=CHECK-MSVC %s // RUN: %clang_cc1 -fno-sycl-id-queries-fit-in-int %s -E -dM | FileCheck \ // RUN: --check-prefix=CHECK-NO-SYCL_FIT_IN_INT %s diff --git a/clang/test/SemaSYCL/accessor-type-diagnostics.cpp b/clang/test/SemaSYCL/accessor-type-diagnostics.cpp index 7c60798db814f..e400d5a114c02 100644 --- a/clang/test/SemaSYCL/accessor-type-diagnostics.cpp +++ b/clang/test/SemaSYCL/accessor-type-diagnostics.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -fsycl -triple spir64 -fsycl-is-device -verify \ +// RUN: %clang_cc1 -triple spir64 -fsycl-is-device -verify \ // RUN: -aux-triple x86_64-unknown-linux-gnu -fsyntax-only \ // RUN: -Wno-sycl-2017-compat %s -// RUN: %clang_cc1 -fsycl -triple spir64 -fsycl-is-device -verify \ +// RUN: %clang_cc1 -triple spir64 -fsycl-is-device -verify \ // RUN: -aux-triple x86_64-pc-windows-msvc -fsyntax-only \ // RUN: -Wno-sycl-2017-compat %s // diff --git a/clang/test/SemaSYCL/accessor_inheritance.cpp b/clang/test/SemaSYCL/accessor_inheritance.cpp index 4d445de173799..d73b734cade13 100644 --- a/clang/test/SemaSYCL/accessor_inheritance.cpp +++ b/clang/test/SemaSYCL/accessor_inheritance.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks inheritance support for struct types with accessors // passed as kernel arguments, which are decomposed to individual fields. diff --git a/clang/test/SemaSYCL/accessors-targets-image.cpp b/clang/test/SemaSYCL/accessors-targets-image.cpp index c6d5a19168a84..b643f3d72f27b 100644 --- a/clang/test/SemaSYCL/accessors-targets-image.cpp +++ b/clang/test/SemaSYCL/accessors-targets-image.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks if the compiler generates correct kernel wrapper arguments for // image accessors targets. diff --git a/clang/test/SemaSYCL/accessors-targets.cpp b/clang/test/SemaSYCL/accessors-targets.cpp index 9b05d2ce10298..901e148b0785a 100644 --- a/clang/test/SemaSYCL/accessors-targets.cpp +++ b/clang/test/SemaSYCL/accessors-targets.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks that the compiler generates correct kernel wrapper arguments for // different accessors targets. diff --git a/clang/test/SemaSYCL/address-space-parameter-conversions.cpp b/clang/test/SemaSYCL/address-space-parameter-conversions.cpp index 8dd54d3db23b8..af3815d3832cc 100644 --- a/clang/test/SemaSYCL/address-space-parameter-conversions.cpp +++ b/clang/test/SemaSYCL/address-space-parameter-conversions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -verify -fsyntax-only %s void bar(int & Data) {} void bar2(int & Data) {} diff --git a/clang/test/SemaSYCL/allow-constexpr-recursion.cpp b/clang/test/SemaSYCL/allow-constexpr-recursion.cpp index 6ab66376291b2..924182dd30b05 100644 --- a/clang/test/SemaSYCL/allow-constexpr-recursion.cpp +++ b/clang/test/SemaSYCL/allow-constexpr-recursion.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fcxx-exceptions -Wno-return-type -sycl-std=2020 -verify -fsyntax-only -std=c++20 -Werror=vla %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fcxx-exceptions -Wno-return-type -sycl-std=2020 -verify -fsyntax-only -std=c++20 -Werror=vla %s // This test verifies that a SYCL kernel executed on a device, cannot call a recursive function. diff --git a/clang/test/SemaSYCL/args-size-overflow.cpp b/clang/test/SemaSYCL/args-size-overflow.cpp index 3b442f583b415..409e7537761a2 100644 --- a/clang/test/SemaSYCL/args-size-overflow.cpp +++ b/clang/test/SemaSYCL/args-size-overflow.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64 -internal-isystem %S/Inputs -fsyntax-only -Wsycl-strict -sycl-std=2020 -verify %s -DSPIR64 -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir -internal-isystem %S/Inputs -fsyntax-only -Wsycl-strict -sycl-std=2020 -verify %s -DSPIR32 +// RUN: %clang_cc1 -fsycl-is-device -triple spir64 -internal-isystem %S/Inputs -fsyntax-only -Wsycl-strict -sycl-std=2020 -verify %s -DSPIR64 +// RUN: %clang_cc1 -fsycl-is-device -triple spir -internal-isystem %S/Inputs -fsyntax-only -Wsycl-strict -sycl-std=2020 -verify %s -DSPIR32 #include "sycl.hpp" class Foo; diff --git a/clang/test/SemaSYCL/array-kernel-param-neg.cpp b/clang/test/SemaSYCL/array-kernel-param-neg.cpp index b0a5bade19e84..5b7bdbc1a3e66 100755 --- a/clang/test/SemaSYCL/array-kernel-param-neg.cpp +++ b/clang/test/SemaSYCL/array-kernel-param-neg.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fcxx-exceptions -sycl-std=2020 -verify -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fcxx-exceptions -sycl-std=2020 -verify -fsyntax-only %s // This test checks if compiler reports compilation error on an attempt to pass // an array of non-trivially copyable structs as SYCL kernel parameter or diff --git a/clang/test/SemaSYCL/array-kernel-param.cpp b/clang/test/SemaSYCL/array-kernel-param.cpp index 9701e331ad236..f29d0a443126c 100644 --- a/clang/test/SemaSYCL/array-kernel-param.cpp +++ b/clang/test/SemaSYCL/array-kernel-param.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks that compiler generates correct kernel arguments for // arrays, Accessor arrays, and structs containing Accessors. diff --git a/clang/test/SemaSYCL/basic-kernel-wrapper.cpp b/clang/test/SemaSYCL/basic-kernel-wrapper.cpp index 6176fa3098322..0f4c0fa6c91a3 100644 --- a/clang/test/SemaSYCL/basic-kernel-wrapper.cpp +++ b/clang/test/SemaSYCL/basic-kernel-wrapper.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks that compiler generates correct kernel wrapper for basic // case. diff --git a/clang/test/SemaSYCL/buffer_location.cpp b/clang/test/SemaSYCL/buffer_location.cpp index ac3724d32ef0f..827cd6e567132 100644 --- a/clang/test/SemaSYCL/buffer_location.cpp +++ b/clang/test/SemaSYCL/buffer_location.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -Wno-sycl-2017-compat -verify -pedantic -DTRIGGER_ERROR %s +// RUN: %clang_cc1 -fsycl-is-device -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -Wno-sycl-2017-compat -verify -pedantic -DTRIGGER_ERROR %s #include "Inputs/sycl.hpp" diff --git a/clang/test/SemaSYCL/built-in-type-kernel-arg.cpp b/clang/test/SemaSYCL/built-in-type-kernel-arg.cpp index f8504f12d4854..e5115c7edba86 100644 --- a/clang/test/SemaSYCL/built-in-type-kernel-arg.cpp +++ b/clang/test/SemaSYCL/built-in-type-kernel-arg.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -ast-dump %s | FileCheck %s // This test checks that compiler generates correct initialization for arguments // that have struct or built-in type inside the OpenCL kernel diff --git a/clang/test/SemaSYCL/call-to-undefined-function.cpp b/clang/test/SemaSYCL/call-to-undefined-function.cpp index 210ccaa8aa121..9ab0034c45cfa 100644 --- a/clang/test/SemaSYCL/call-to-undefined-function.cpp +++ b/clang/test/SemaSYCL/call-to-undefined-function.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -verify -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -verify -fsyntax-only %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/check-long-double-size.cpp b/clang/test/SemaSYCL/check-long-double-size.cpp index 62ec21b36fcad..e93a18f63948e 100644 --- a/clang/test/SemaSYCL/check-long-double-size.cpp +++ b/clang/test/SemaSYCL/check-long-double-size.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-linux-gnu -fsyntax-only -DLONG_DOUBLE_SIZE=16 -verify %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir-unknown-unknown-sycldevice -aux-triple i386-pc-linux-gnu -fsyntax-only -DLONG_DOUBLE_SIZE=12 -verify %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-windows-sycldevice -aux-triple x86_64-pc-windows-msvc -fsyntax-only -DLONG_DOUBLE_SIZE=8 -verify %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir-unknown-windows-sycldevice -aux-triple i686-pc-windows-msvc -fsyntax-only -DLONG_DOUBLE_SIZE=8 -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-linux-gnu -fsyntax-only -DLONG_DOUBLE_SIZE=16 -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir-unknown-unknown-sycldevice -aux-triple i386-pc-linux-gnu -fsyntax-only -DLONG_DOUBLE_SIZE=12 -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-windows-sycldevice -aux-triple x86_64-pc-windows-msvc -fsyntax-only -DLONG_DOUBLE_SIZE=8 -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir-unknown-windows-sycldevice -aux-triple i686-pc-windows-msvc -fsyntax-only -DLONG_DOUBLE_SIZE=8 -verify %s // expected-no-diagnostics static_assert(sizeof(long double) == LONG_DOUBLE_SIZE, "wrong sizeof long double"); diff --git a/clang/test/SemaSYCL/check-notdirect-attribute-propagation.cpp b/clang/test/SemaSYCL/check-notdirect-attribute-propagation.cpp index d2ade080f86cc..03de6a3dbbafa 100644 --- a/clang/test/SemaSYCL/check-notdirect-attribute-propagation.cpp +++ b/clang/test/SemaSYCL/check-notdirect-attribute-propagation.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -triple spir64 -verify -// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -triple spir64 -DTRIGGER_ERROR -verify -// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -triple spir64 | FileCheck %s +// RUN: %clang_cc1 %s -fsyntax-only -fsycl-is-device -triple spir64 -verify +// RUN: %clang_cc1 %s -fsyntax-only -fsycl-is-device -triple spir64 -DTRIGGER_ERROR -verify +// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl-is-device -triple spir64 | FileCheck %s #ifndef TRIGGER_ERROR [[intel::no_global_work_offset]] void not_direct_one() {} // expected-no-diagnostics diff --git a/clang/test/SemaSYCL/decomposition.cpp b/clang/test/SemaSYCL/decomposition.cpp index 83ac5a6cdc653..a5e3bebca0c27 100644 --- a/clang/test/SemaSYCL/decomposition.cpp +++ b/clang/test/SemaSYCL/decomposition.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks that the compiler decomposes structs containing special types only // (i.e. accessor/stream/sampler etc) and all others are passed without decomposition diff --git a/clang/test/SemaSYCL/deferred-diagnostics-aux-builtin.cpp b/clang/test/SemaSYCL/deferred-diagnostics-aux-builtin.cpp index 904b28bda7c87..d7cd4c1bc8907 100644 --- a/clang/test/SemaSYCL/deferred-diagnostics-aux-builtin.cpp +++ b/clang/test/SemaSYCL/deferred-diagnostics-aux-builtin.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-linux-gnu -Wno-sycl-2017-compat -verify -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-linux-gnu -Wno-sycl-2017-compat -verify -fsyntax-only %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/deferred-diagnostics-emit.cpp b/clang/test/SemaSYCL/deferred-diagnostics-emit.cpp index f634e7bc6933c..e0427d3451911 100644 --- a/clang/test/SemaSYCL/deferred-diagnostics-emit.cpp +++ b/clang/test/SemaSYCL/deferred-diagnostics-emit.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -fsycl -internal-isystem %S/Inputs -sycl-std=2020 -triple spir64 -fsycl-is-device \ +// RUN: %clang_cc1 -internal-isystem %S/Inputs -sycl-std=2020 -triple spir64 -fsycl-is-device \ // RUN: -aux-triple x86_64-unknown-linux-gnu \ // RUN: -verify -fsyntax-only %s -// RUN: %clang_cc1 -fsycl -internal-isystem %S/Inputs -sycl-std=2020 -triple spir64 -fsycl-is-device \ +// RUN: %clang_cc1 -internal-isystem %S/Inputs -sycl-std=2020 -triple spir64 -fsycl-is-device \ // RUN: -aux-triple x86_64-pc-windows-msvc \ // RUN: -verify -fsyntax-only %s // diff --git a/clang/test/SemaSYCL/device-indirectly-callable-attr.cpp b/clang/test/SemaSYCL/device-indirectly-callable-attr.cpp index d0ae74e5981dd..b55ec20db3753 100644 --- a/clang/test/SemaSYCL/device-indirectly-callable-attr.cpp +++ b/clang/test/SemaSYCL/device-indirectly-callable-attr.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -verify %s -// RUN: not %clang_cc1 -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s +// RUN: not %clang_cc1 -fsycl-is-device -ast-dump %s | FileCheck %s // RUN: %clang_cc1 -verify -DNO_SYCL %s #ifndef NO_SYCL diff --git a/clang/test/SemaSYCL/esimd-private-glob.cpp b/clang/test/SemaSYCL/esimd-private-glob.cpp index c3c2439ba24ee..89b16ac9412d4 100644 --- a/clang/test/SemaSYCL/esimd-private-glob.cpp +++ b/clang/test/SemaSYCL/esimd-private-glob.cpp @@ -1,3 +1,3 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-explicit-simd -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-explicit-simd -fsyntax-only -verify %s // expected-no-diagnostics int x = 0; diff --git a/clang/test/SemaSYCL/esimd-private-global.cpp b/clang/test/SemaSYCL/esimd-private-global.cpp index 3023385e48e8d..2da6c5eb58bdc 100644 --- a/clang/test/SemaSYCL/esimd-private-global.cpp +++ b/clang/test/SemaSYCL/esimd-private-global.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-explicit-simd -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-explicit-simd -fsyntax-only -verify -pedantic %s // no error expected __attribute__((opencl_private)) __attribute__((register_num(17))) int privGlob; diff --git a/clang/test/SemaSYCL/fake-accessors.cpp b/clang/test/SemaSYCL/fake-accessors.cpp index 374eb320b71ff..d8919d0c4e307 100644 --- a/clang/test/SemaSYCL/fake-accessors.cpp +++ b/clang/test/SemaSYCL/fake-accessors.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -Wno-int-to-void-pointer-cast -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -Wno-int-to-void-pointer-cast -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/float128.cpp b/clang/test/SemaSYCL/float128.cpp index 0f9d6180d5652..697ed5dcd31c4 100644 --- a/clang/test/SemaSYCL/float128.cpp +++ b/clang/test/SemaSYCL/float128.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple spir64 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -verify -fsyntax-only %s -// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsycl -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -fsyntax-only %s +// RUN: %clang_cc1 -triple spir64 -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -fsyntax-only %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/forward-decl.cpp b/clang/test/SemaSYCL/forward-decl.cpp index b0187a4821ab6..d4466d483d25b 100644 --- a/clang/test/SemaSYCL/forward-decl.cpp +++ b/clang/test/SemaSYCL/forward-decl.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -fsyntax-only -verify -pedantic %s // expected-no-diagnostics diff --git a/clang/test/SemaSYCL/fpga_pipes.cpp b/clang/test/SemaSYCL/fpga_pipes.cpp index 0e37af3adf60f..6f6133b1aae15 100644 --- a/clang/test/SemaSYCL/fpga_pipes.cpp +++ b/clang/test/SemaSYCL/fpga_pipes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify -pedantic %s // no error expected using type1 = __attribute__((pipe("read_only"))) const int; diff --git a/clang/test/SemaSYCL/half-kernel-arg.cpp b/clang/test/SemaSYCL/half-kernel-arg.cpp index 77bbafc3eb2bc..7cbad48e7820b 100644 --- a/clang/test/SemaSYCL/half-kernel-arg.cpp +++ b/clang/test/SemaSYCL/half-kernel-arg.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks that compiler generates correct initialization for arguments // that have sycl::half type inside the OpenCL kernel diff --git a/clang/test/SemaSYCL/implicit_kernel_type.cpp b/clang/test/SemaSYCL/implicit_kernel_type.cpp index 3f4239855055d..e571815dec0dc 100644 --- a/clang/test/SemaSYCL/implicit_kernel_type.cpp +++ b/clang/test/SemaSYCL/implicit_kernel_type.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -sycl-std=2020 -verify %s -Werror=sycl-strict -DERROR -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -sycl-std=2020 -verify %s -Wsycl-strict -DWARN -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsycl-unnamed-lambda -fsyntax-only -sycl-std=2020 -verify %s -Werror=sycl-strict +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -sycl-std=2020 -verify %s -Werror=sycl-strict -DERROR +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -sycl-std=2020 -verify %s -Wsycl-strict -DWARN +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsycl-unnamed-lambda -fsyntax-only -sycl-std=2020 -verify %s -Werror=sycl-strict #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/inheritance.cpp b/clang/test/SemaSYCL/inheritance.cpp index ab1f505619fee..684fa835e8599 100644 --- a/clang/test/SemaSYCL/inheritance.cpp +++ b/clang/test/SemaSYCL/inheritance.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -ast-dump %s | FileCheck %s #include "Inputs/sycl.hpp" diff --git a/clang/test/SemaSYCL/inline-asm.cpp b/clang/test/SemaSYCL/inline-asm.cpp index bb8a03b7a4090..b38f1e740b9b3 100644 --- a/clang/test/SemaSYCL/inline-asm.cpp +++ b/clang/test/SemaSYCL/inline-asm.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s -DLINUX_ASM -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s -DLINUX_ASM -DSPIR_CHECK -triple spir64-unknown-unknown-sycldevice -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify -triple x86_64-windows -fasm-blocks %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s -DLINUX_ASM +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s -DLINUX_ASM -DSPIR_CHECK -triple spir64-unknown-unknown-sycldevice +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify -triple x86_64-windows -fasm-blocks %s #ifndef SPIR_CHECK //expected-no-diagnostics diff --git a/clang/test/SemaSYCL/int128.cpp b/clang/test/SemaSYCL/int128.cpp index 2eea7b8734715..ae804cbd433dd 100644 --- a/clang/test/SemaSYCL/int128.cpp +++ b/clang/test/SemaSYCL/int128.cpp @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-unknown-linux-gnu \ -// RUN: -fsycl -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -verify -fsyntax-only %s +// RUN: -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -verify -fsyntax-only %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/intel-fpga-local.cpp b/clang/test/SemaSYCL/intel-fpga-local.cpp index 345711bdeaf58..1b2541bf597e7 100644 --- a/clang/test/SemaSYCL/intel-fpga-local.cpp +++ b/clang/test/SemaSYCL/intel-fpga-local.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -Wno-return-type -fcxx-exceptions -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -Wno-return-type -fcxx-exceptions -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/intel-fpga-loops.cpp b/clang/test/SemaSYCL/intel-fpga-loops.cpp index be182ef5158b8..2f3b580f14ab3 100644 --- a/clang/test/SemaSYCL/intel-fpga-loops.cpp +++ b/clang/test/SemaSYCL/intel-fpga-loops.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -sycl-std=2020 -fsyntax-only -verify -pedantic %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/intel-fpga-mem-builtin.cpp b/clang/test/SemaSYCL/intel-fpga-mem-builtin.cpp index 1ebb7f2e38dbc..77d7ad6920865 100644 --- a/clang/test/SemaSYCL/intel-fpga-mem-builtin.cpp +++ b/clang/test/SemaSYCL/intel-fpga-mem-builtin.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl-is-device -verify -pedantic -fsyntax-only -x c++ %s +// RUN: %clang_cc1 -fsycl-is-device -sycl-std=2020 -verify -pedantic -fsyntax-only -x c++ %s // RUN: %clang_cc1 -verify -pedantic -fsyntax-only -x c++ %s #define PARAM_1 1U << 7 diff --git a/clang/test/SemaSYCL/intel-fpga-no-global-work-offset.cpp b/clang/test/SemaSYCL/intel-fpga-no-global-work-offset.cpp index 7d9874bf0b58b..f6198408a85ed 100644 --- a/clang/test/SemaSYCL/intel-fpga-no-global-work-offset.cpp +++ b/clang/test/SemaSYCL/intel-fpga-no-global-work-offset.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-return-type -Wno-sycl-2017-compat -fcxx-exceptions -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -Wno-return-type -Wno-sycl-2017-compat -fcxx-exceptions -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/intel-fpga-nofusion.cpp b/clang/test/SemaSYCL/intel-fpga-nofusion.cpp index bea1362ba2835..77fc997a6484b 100644 --- a/clang/test/SemaSYCL/intel-fpga-nofusion.cpp +++ b/clang/test/SemaSYCL/intel-fpga-nofusion.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -ast-dump -Wno-sycl-2017-compat -verify %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -ast-dump -Wno-sycl-2017-compat -verify %s | FileCheck %s // expected-no-diagnostics #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/intel-fpga-reg.cpp b/clang/test/SemaSYCL/intel-fpga-reg.cpp index 76fc8c0e26c08..2fd4829491397 100644 --- a/clang/test/SemaSYCL/intel-fpga-reg.cpp +++ b/clang/test/SemaSYCL/intel-fpga-reg.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl-is-device -verify -pedantic -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -sycl-std=2020 -verify -pedantic -fsyntax-only %s // RUN: %clang_cc1 -verify -pedantic -fsyntax-only %s class A { diff --git a/clang/test/SemaSYCL/intel-max-global-work-dim-device.cpp b/clang/test/SemaSYCL/intel-max-global-work-dim-device.cpp index 48e9305d6ecbf..13d2c8b8b43b7 100644 --- a/clang/test/SemaSYCL/intel-max-global-work-dim-device.cpp +++ b/clang/test/SemaSYCL/intel-max-global-work-dim-device.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -triple spir64 -DTRIGGER_ERROR -verify -// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -triple spir64 | FileCheck %s +// RUN: %clang_cc1 %s -fsyntax-only -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -triple spir64 -DTRIGGER_ERROR -verify +// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -triple spir64 | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/intel-max-global-work-dim-host.cpp b/clang/test/SemaSYCL/intel-max-global-work-dim-host.cpp index 433e5afc436e9..2519c18672778 100644 --- a/clang/test/SemaSYCL/intel-max-global-work-dim-host.cpp +++ b/clang/test/SemaSYCL/intel-max-global-work-dim-host.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -Wno-sycl-2017-compat -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-host -Wno-sycl-2017-compat -fsyntax-only -verify %s // expected-no-diagnostics [[intel::max_global_work_dim(2)]] void func_do_not_ignore() {} diff --git a/clang/test/SemaSYCL/intel-max-work-group-size-device.cpp b/clang/test/SemaSYCL/intel-max-work-group-size-device.cpp index f724015ef1bc0..73902ff68f1af 100644 --- a/clang/test/SemaSYCL/intel-max-work-group-size-device.cpp +++ b/clang/test/SemaSYCL/intel-max-work-group-size-device.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -triple spir64 -DTRIGGER_ERROR -verify -// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -triple spir64 | FileCheck %s +// RUN: %clang_cc1 %s -fsyntax-only -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -triple spir64 -DTRIGGER_ERROR -verify +// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -triple spir64 | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/intel-max-work-group-size-host.cpp b/clang/test/SemaSYCL/intel-max-work-group-size-host.cpp index b8b9ceeafe352..cce684221dfcb 100644 --- a/clang/test/SemaSYCL/intel-max-work-group-size-host.cpp +++ b/clang/test/SemaSYCL/intel-max-work-group-size-host.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -Wno-sycl-2017-compat -verify %s // expected-no-diagnostics [[intel::max_work_group_size(2, 2, 2)]] void func_do_not_ignore() {} diff --git a/clang/test/SemaSYCL/intel-reqd-work-group-size-device.cpp b/clang/test/SemaSYCL/intel-reqd-work-group-size-device.cpp index 14c4c482d8e62..044fa83f7b9de 100644 --- a/clang/test/SemaSYCL/intel-reqd-work-group-size-device.cpp +++ b/clang/test/SemaSYCL/intel-reqd-work-group-size-device.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -fsyntax-only -verify -DTRIGGER_ERROR %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -fsyntax-only -verify -DTRIGGER_ERROR %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/intel-reqd-work-group-size-host.cpp b/clang/test/SemaSYCL/intel-reqd-work-group-size-host.cpp index d7518762102d4..cd3655dd60f7f 100644 --- a/clang/test/SemaSYCL/intel-reqd-work-group-size-host.cpp +++ b/clang/test/SemaSYCL/intel-reqd-work-group-size-host.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -Wno-sycl-2017-compat -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-host -Wno-sycl-2017-compat -fsyntax-only -verify %s // expected-no-diagnostics [[intel::reqd_work_group_size(4)]] void f4x1x1() {} diff --git a/clang/test/SemaSYCL/intel-restrict.cpp b/clang/test/SemaSYCL/intel-restrict.cpp index c878cec15be3b..bd51eb6b5c055 100644 --- a/clang/test/SemaSYCL/intel-restrict.cpp +++ b/clang/test/SemaSYCL/intel-restrict.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -Wno-sycl-2017-compat -triple spir64 -DCHECKDIAG -verify -// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -Wno-sycl-2017-compat -triple spir64 | FileCheck %s +// RUN: %clang_cc1 %s -fsyntax-only -fsycl-is-device -Wno-sycl-2017-compat -triple spir64 -DCHECKDIAG -verify +// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl-is-device -Wno-sycl-2017-compat -triple spir64 | FileCheck %s [[intel::kernel_args_restrict]] void func_do_not_ignore() {} diff --git a/clang/test/SemaSYCL/invalid-kernel-arguments.cpp b/clang/test/SemaSYCL/invalid-kernel-arguments.cpp index 878b2ee21de6a..dd0679ffef511 100644 --- a/clang/test/SemaSYCL/invalid-kernel-arguments.cpp +++ b/clang/test/SemaSYCL/invalid-kernel-arguments.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s // This test checks that compiler doesn't crash if type of kernel argument is // invalid. diff --git a/clang/test/SemaSYCL/kernel-attribute.cpp b/clang/test/SemaSYCL/kernel-attribute.cpp index 7249effec8ed7..39df8d864e67b 100644 --- a/clang/test/SemaSYCL/kernel-attribute.cpp +++ b/clang/test/SemaSYCL/kernel-attribute.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fsycl -fsycl-is-device -verify %s -// RUN: %clang_cc1 -fsycl -fsycl-is-host -DHOST -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fsycl-is-device -verify %s +// RUN: %clang_cc1 -fsycl-is-host -DHOST -fsyntax-only -verify %s // Only function templates [[clang::sycl_kernel]] int gv2 = 0; // expected-warning {{'sycl_kernel' attribute only applies to function templates}} diff --git a/clang/test/SemaSYCL/kernel-function-type.cpp b/clang/test/SemaSYCL/kernel-function-type.cpp index 86b0399d79ed9..9a2036d7d5eee 100644 --- a/clang/test/SemaSYCL/kernel-function-type.cpp +++ b/clang/test/SemaSYCL/kernel-function-type.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s // expected-no-diagnostics // The kernel_single_task call is emitted as an OpenCL kernel function. The call diff --git a/clang/test/SemaSYCL/kernel-not-functor.cpp b/clang/test/SemaSYCL/kernel-not-functor.cpp index f081ec2410033..5a1dbf00448a9 100644 --- a/clang/test/SemaSYCL/kernel-not-functor.cpp +++ b/clang/test/SemaSYCL/kernel-not-functor.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -verify %s -// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify %s template __attribute__((sycl_kernel)) void kernel(F kernelFunc) { diff --git a/clang/test/SemaSYCL/kernelname-enum.cpp b/clang/test/SemaSYCL/kernelname-enum.cpp index 6a7156c646bac..291de05a80edc 100644 --- a/clang/test/SemaSYCL/kernelname-enum.cpp +++ b/clang/test/SemaSYCL/kernelname-enum.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s #include "Inputs/sycl.hpp" diff --git a/clang/test/SemaSYCL/lambda_implicit_capture_this.cpp b/clang/test/SemaSYCL/lambda_implicit_capture_this.cpp index 13f1081b46ace..65350c76835a1 100644 --- a/clang/test/SemaSYCL/lambda_implicit_capture_this.cpp +++ b/clang/test/SemaSYCL/lambda_implicit_capture_this.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s template __attribute__((sycl_kernel)) void kernel(const Func &kernelFunc) { diff --git a/clang/test/SemaSYCL/long-double.cpp b/clang/test/SemaSYCL/long-double.cpp index d302106c1f4c7..2098c18c2e985 100644 --- a/clang/test/SemaSYCL/long-double.cpp +++ b/clang/test/SemaSYCL/long-double.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-linux-gnu -fsycl -fsycl-is-device -verify -fsyntax-only %s -// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsycl -fsycl-is-device -fsyntax-only %s -// RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-linux-gnu -fsycl -fsycl-is-device -fsyntax-only -mlong-double-64 %s +// RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-linux-gnu -fsycl-is-device -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsycl-is-device -fsyntax-only %s +// RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-linux-gnu -fsycl-is-device -fsyntax-only -mlong-double-64 %s template __attribute__((sycl_kernel)) void kernel(Func kernelFunc) { diff --git a/clang/test/SemaSYCL/loop_fusion.cpp b/clang/test/SemaSYCL/loop_fusion.cpp index caf2b9e742d3f..6305af9b989c4 100644 --- a/clang/test/SemaSYCL/loop_fusion.cpp +++ b/clang/test/SemaSYCL/loop_fusion.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify %s +// RUN: %clang_cc1 -fsycl-is-device -verify %s // Tests for incorrect argument values for Intel FPGA loop fusion function attributes [[intel::loop_fuse(5)]] int a; // expected-error{{'loop_fuse' attribute only applies to functions}} diff --git a/clang/test/SemaSYCL/loop_fusion_ast.cpp b/clang/test/SemaSYCL/loop_fusion_ast.cpp index 80f7e1a1c7073..5523d6a770de1 100644 --- a/clang/test/SemaSYCL/loop_fusion_ast.cpp +++ b/clang/test/SemaSYCL/loop_fusion_ast.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s // Tests for AST of Intel FPGA loop fusion function attributes #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/loop_unroll.cpp b/clang/test/SemaSYCL/loop_unroll.cpp index e92718f07c65a..7423c97bf6e71 100644 --- a/clang/test/SemaSYCL/loop_unroll.cpp +++ b/clang/test/SemaSYCL/loop_unroll.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify -pedantic %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify -pedantic %s template void bar() { diff --git a/clang/test/SemaSYCL/mangle-kernel.cpp b/clang/test/SemaSYCL/mangle-kernel.cpp index d74e09881aca6..62f769eb8e989 100644 --- a/clang/test/SemaSYCL/mangle-kernel.cpp +++ b/clang/test/SemaSYCL/mangle-kernel.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-pc-windows-msvc -I %S/../Headers/Inputs/include/ -ast-dump %s | FileCheck %s --check-prefix=CHECK-64-WIN -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-linux-gnu -I %S/../Headers/Inputs/include/ -ast-dump %s | FileCheck %s --check-prefix=CHECK-64-LIN -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir-unknown-linux-sycldevice -I %S/../Headers/Inputs/include/ -ast-dump %s | FileCheck %s --check-prefix=CHECK-32 +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-pc-windows-msvc -I %S/../Headers/Inputs/include/ -ast-dump %s | FileCheck %s --check-prefix=CHECK-64-WIN +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -aux-triple x86_64-unknown-linux-gnu -I %S/../Headers/Inputs/include/ -ast-dump %s | FileCheck %s --check-prefix=CHECK-64-LIN +// RUN: %clang_cc1 -fsycl-is-device -triple spir-unknown-linux-sycldevice -I %S/../Headers/Inputs/include/ -ast-dump %s | FileCheck %s --check-prefix=CHECK-32 #include "Inputs/sycl.hpp" #include diff --git a/clang/test/SemaSYCL/mangle-unnamed-kernel.cpp b/clang/test/SemaSYCL/mangle-unnamed-kernel.cpp index b2ddbb144fdbf..3d682754532fd 100644 --- a/clang/test/SemaSYCL/mangle-unnamed-kernel.cpp +++ b/clang/test/SemaSYCL/mangle-unnamed-kernel.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-unnamed-lambda -triple spir64-unknown-unknown-sycldevice -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-unnamed-lambda -triple spir64-unknown-unknown-sycldevice -ast-dump %s | FileCheck %s #include "Inputs/sycl.hpp" int main() { diff --git a/clang/test/SemaSYCL/markfunction-astconsumer.cpp b/clang/test/SemaSYCL/markfunction-astconsumer.cpp index 8315c890fc35e..207d2b9e5d47b 100644 --- a/clang/test/SemaSYCL/markfunction-astconsumer.cpp +++ b/clang/test/SemaSYCL/markfunction-astconsumer.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s +// RUN: %clang_cc1 -fsycl-is-device -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s void bar(); template diff --git a/clang/test/SemaSYCL/msvc-fixes.cpp b/clang/test/SemaSYCL/msvc-fixes.cpp index 016580afdbea6..09249c132306a 100644 --- a/clang/test/SemaSYCL/msvc-fixes.cpp +++ b/clang/test/SemaSYCL/msvc-fixes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-windows-sycldevice -aux-triple x86_64-pc-windows-msvc -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-windows-sycldevice -aux-triple x86_64-pc-windows-msvc -fsyntax-only -verify %s // expected-no-diagnostics void foo(__builtin_va_list bvl) { diff --git a/clang/test/SemaSYCL/no-prototype-func.c b/clang/test/SemaSYCL/no-prototype-func.c index f224cb6e4e457..d747aa805f0af 100644 --- a/clang/test/SemaSYCL/no-prototype-func.c +++ b/clang/test/SemaSYCL/no-prototype-func.c @@ -1,3 +1,3 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -verify -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -verify -fsyntax-only %s // expected-no-diagnostics int foo(); diff --git a/clang/test/SemaSYCL/no-vtables.cpp b/clang/test/SemaSYCL/no-vtables.cpp index 68f9953bf6784..0478de513656d 100644 --- a/clang/test/SemaSYCL/no-vtables.cpp +++ b/clang/test/SemaSYCL/no-vtables.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -verify -Wno-sycl-2017-compat -fsyntax-only -emit-llvm-only %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -verify -Wno-sycl-2017-compat -fsyntax-only -emit-llvm-only %s // expected-no-diagnostics // Should never fail, since the type is never used in kernel code. diff --git a/clang/test/SemaSYCL/no-vtables2.cpp b/clang/test/SemaSYCL/no-vtables2.cpp index 92bde4db57b33..721786c96c1e9 100644 --- a/clang/test/SemaSYCL/no-vtables2.cpp +++ b/clang/test/SemaSYCL/no-vtables2.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only %s struct Base { virtual void f() const {} diff --git a/clang/test/SemaSYCL/non-std-layout-param.cpp b/clang/test/SemaSYCL/non-std-layout-param.cpp index 0698b3b7573a3..934cbf44d51ca 100644 --- a/clang/test/SemaSYCL/non-std-layout-param.cpp +++ b/clang/test/SemaSYCL/non-std-layout-param.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-std-layout-kernel-params -verify -Wno-sycl-2017-compat -fsyntax-only %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-std-layout-kernel-params -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -Wno-sycl-2017-compat -fsyntax-only %s // This test checks if compiler reports compilation error on an attempt to pass // non-standard layout struct object as SYCL kernel parameter. diff --git a/clang/test/SemaSYCL/non-trivially-copyable-kernel-param.cpp b/clang/test/SemaSYCL/non-trivially-copyable-kernel-param.cpp index 00d1ec0bc0418..5705f2df03acc 100644 --- a/clang/test/SemaSYCL/non-trivially-copyable-kernel-param.cpp +++ b/clang/test/SemaSYCL/non-trivially-copyable-kernel-param.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s // This test checks if compiler reports compilation error on an attempt to pass // a struct with non-trivially copyable type as SYCL kernel parameter. diff --git a/clang/test/SemaSYCL/num_simd_work_items_device.cpp b/clang/test/SemaSYCL/num_simd_work_items_device.cpp index b7fc2a8c9475f..c26f731f4ac37 100644 --- a/clang/test/SemaSYCL/num_simd_work_items_device.cpp +++ b/clang/test/SemaSYCL/num_simd_work_items_device.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -fsyntax-only -Wno-sycl-2017-compat -DTRIGGER_ERROR -verify -// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -fsyntax-only -Wno-sycl-2017-compat -ast-dump | FileCheck %s +// RUN: %clang_cc1 %s -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -fsyntax-only -Wno-sycl-2017-compat -DTRIGGER_ERROR -verify +// RUN: %clang_cc1 %s -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -fsyntax-only -Wno-sycl-2017-compat -ast-dump | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/num_simd_work_items_host.cpp b/clang/test/SemaSYCL/num_simd_work_items_host.cpp index 07027c12a538b..8558a574572d9 100644 --- a/clang/test/SemaSYCL/num_simd_work_items_host.cpp +++ b/clang/test/SemaSYCL/num_simd_work_items_host.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -Wno-sycl-2017-compat -verify %s // expected-no-diagnostics [[intel::num_simd_work_items(2)]] void func_do_not_ignore() {} diff --git a/clang/test/SemaSYCL/pointer-to-vla.cpp b/clang/test/SemaSYCL/pointer-to-vla.cpp index c8a492b9b32e7..ca65857b46e18 100644 --- a/clang/test/SemaSYCL/pointer-to-vla.cpp +++ b/clang/test/SemaSYCL/pointer-to-vla.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64 -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64 -fsyntax-only -Wno-sycl-2017-compat -verify %s // // This test checks if compiler reports compilation error on an attempt to pass // a pointer to VLA as kernel argument diff --git a/clang/test/SemaSYCL/prohibit-thread-local.cpp b/clang/test/SemaSYCL/prohibit-thread-local.cpp index 1cdfb4c5ea3b6..c87c2439ad02b 100644 --- a/clang/test/SemaSYCL/prohibit-thread-local.cpp +++ b/clang/test/SemaSYCL/prohibit-thread-local.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64 -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64 -verify -Wno-sycl-2017-compat -fsyntax-only %s thread_local const int prohobit_ns_scope = 0; thread_local int prohobit_ns_scope2 = 0; diff --git a/clang/test/SemaSYCL/redeclaration-attribute-propagation.cpp b/clang/test/SemaSYCL/redeclaration-attribute-propagation.cpp index c1fa227b9f73a..8762f6814621b 100644 --- a/clang/test/SemaSYCL/redeclaration-attribute-propagation.cpp +++ b/clang/test/SemaSYCL/redeclaration-attribute-propagation.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -Wno-sycl-2017-compat -verify -// RUN: %clang_cc1 %s -fsyntax-only -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -DTRIGGER_ERROR -Wno-sycl-2017-compat -verify -// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -Wno-sycl-2017-compat | FileCheck %s +// RUN: %clang_cc1 %s -fsyntax-only -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -Wno-sycl-2017-compat -verify +// RUN: %clang_cc1 %s -fsyntax-only -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -DTRIGGER_ERROR -Wno-sycl-2017-compat -verify +// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -Wno-sycl-2017-compat | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/reference-kernel-param.cpp b/clang/test/SemaSYCL/reference-kernel-param.cpp index 06809a8fcd1c3..81350f48d552f 100644 --- a/clang/test/SemaSYCL/reference-kernel-param.cpp +++ b/clang/test/SemaSYCL/reference-kernel-param.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s // This test checks if compiler reports compilation error on an attempt to pass // a reference as SYCL kernel parameter. diff --git a/clang/test/SemaSYCL/reqd-sub-group-size-device.cpp b/clang/test/SemaSYCL/reqd-sub-group-size-device.cpp index 15193b328170c..a845061febdd9 100644 --- a/clang/test/SemaSYCL/reqd-sub-group-size-device.cpp +++ b/clang/test/SemaSYCL/reqd-sub-group-size-device.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -Wno-sycl-2017-compat -verify -DTRIGGER_ERROR %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -Wno-sycl-2017-compat -verify -DTRIGGER_ERROR %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/reqd-sub-group-size-host.cpp b/clang/test/SemaSYCL/reqd-sub-group-size-host.cpp index 193137abbcdc9..ab11ef9a19ce9 100644 --- a/clang/test/SemaSYCL/reqd-sub-group-size-host.cpp +++ b/clang/test/SemaSYCL/reqd-sub-group-size-host.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify %s // expected-no-diagnostics [[intel::reqd_sub_group_size(8)]] void fun() {} diff --git a/clang/test/SemaSYCL/reqd-work-group-size-device.cpp b/clang/test/SemaSYCL/reqd-work-group-size-device.cpp index 0072a4547c4cb..5f6ceb890bdf8 100644 --- a/clang/test/SemaSYCL/reqd-work-group-size-device.cpp +++ b/clang/test/SemaSYCL/reqd-work-group-size-device.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -Wno-sycl-2017-compat -verify -DTRIGGER_ERROR %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -Wno-sycl-2017-compat -verify -DTRIGGER_ERROR %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -Wno-sycl-2017-compat -ast-dump %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/reqd-work-group-size-host.cpp b/clang/test/SemaSYCL/reqd-work-group-size-host.cpp index 1dd5a77be6154..591bace13f656 100644 --- a/clang/test/SemaSYCL/reqd-work-group-size-host.cpp +++ b/clang/test/SemaSYCL/reqd-work-group-size-host.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-host -fsyntax-only -verify %s // expected-no-diagnostics class Functor { diff --git a/clang/test/SemaSYCL/restrict-recursion.cpp b/clang/test/SemaSYCL/restrict-recursion.cpp index 3e29271561fe2..fdfd4ba8fb4e8 100644 --- a/clang/test/SemaSYCL/restrict-recursion.cpp +++ b/clang/test/SemaSYCL/restrict-recursion.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s // This recursive function is not called from sycl kernel, // so it should not be diagnosed. diff --git a/clang/test/SemaSYCL/restrict-recursion2.cpp b/clang/test/SemaSYCL/restrict-recursion2.cpp index b9eaffa4149b1..a92705aa81bbd 100644 --- a/clang/test/SemaSYCL/restrict-recursion2.cpp +++ b/clang/test/SemaSYCL/restrict-recursion2.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s // This recursive function is not called from sycl kernel, // so it should not be diagnosed. diff --git a/clang/test/SemaSYCL/restrict-recursion3.cpp b/clang/test/SemaSYCL/restrict-recursion3.cpp index 49bd39e90ae28..9aebe88df63f2 100644 --- a/clang/test/SemaSYCL/restrict-recursion3.cpp +++ b/clang/test/SemaSYCL/restrict-recursion3.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -Wno-return-type -Wno-sycl-2017-compat -Wno-error=sycl-strict -verify -fsyntax-only -std=c++17 %s +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -Wno-return-type -Wno-sycl-2017-compat -Wno-error=sycl-strict -verify -fsyntax-only -std=c++17 %s // This recursive function is not called from sycl kernel, // so it should not be diagnosed. diff --git a/clang/test/SemaSYCL/restrict-recursion4.cpp b/clang/test/SemaSYCL/restrict-recursion4.cpp index 3d4d73e47a5bb..1fa5ec4ea0f61 100644 --- a/clang/test/SemaSYCL/restrict-recursion4.cpp +++ b/clang/test/SemaSYCL/restrict-recursion4.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -Wno-return-type -Wno-sycl-2017-compat -Wno-error=sycl-strict -verify -fsyntax-only -std=c++17 %s +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -Wno-return-type -Wno-sycl-2017-compat -Wno-error=sycl-strict -verify -fsyntax-only -std=c++17 %s // This recursive function is not called from sycl kernel, // so it should not be diagnosed. diff --git a/clang/test/SemaSYCL/sampler.cpp b/clang/test/SemaSYCL/sampler.cpp index 032eec95c2c20..40506f800bf99 100644 --- a/clang/test/SemaSYCL/sampler.cpp +++ b/clang/test/SemaSYCL/sampler.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -S -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -S -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks if the compiler correctly initializes the SYCL Sampler object when passed as a kernel argument. diff --git a/clang/test/SemaSYCL/sampler_t-member-init.cpp b/clang/test/SemaSYCL/sampler_t-member-init.cpp index 9fff3c5cf83c9..372ea8415b51d 100644 --- a/clang/test/SemaSYCL/sampler_t-member-init.cpp +++ b/clang/test/SemaSYCL/sampler_t-member-init.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -fsycl -fsycl-is-device -ast-dump 2>&1 | FileCheck %s +// RUN: %clang_cc1 %s -fsycl-is-device -ast-dump 2>&1 | FileCheck %s const __ocl_sampler_t Global = 0; diff --git a/clang/test/SemaSYCL/scheduler_target_fmax_mhz.cpp b/clang/test/SemaSYCL/scheduler_target_fmax_mhz.cpp index 8cc9a453d29dd..fc1444ee39437 100644 --- a/clang/test/SemaSYCL/scheduler_target_fmax_mhz.cpp +++ b/clang/test/SemaSYCL/scheduler_target_fmax_mhz.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl -fsycl-is-device -triple spir64 -Wno-sycl-2017-compat -verify | FileCheck %s +// RUN: %clang_cc1 %s -fsyntax-only -ast-dump -fsycl-is-device -triple spir64 -Wno-sycl-2017-compat -verify | FileCheck %s #include "Inputs/sycl.hpp" // expected-warning@+2 {{attribute 'intelfpga::scheduler_target_fmax_mhz' is deprecated}} diff --git a/clang/test/SemaSYCL/spec-const-kernel-arg.cpp b/clang/test/SemaSYCL/spec-const-kernel-arg.cpp index a2bf4caa96c68..34f370e6eb2b3 100644 --- a/clang/test/SemaSYCL/spec-const-kernel-arg.cpp +++ b/clang/test/SemaSYCL/spec-const-kernel-arg.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks that compiler generates correct initialization for spec // constants diff --git a/clang/test/SemaSYCL/spec_const_and_accesor_crash.cpp b/clang/test/SemaSYCL/spec_const_and_accesor_crash.cpp index 1ec6d5888fcaa..15a4ed6d7dfc6 100644 --- a/clang/test/SemaSYCL/spec_const_and_accesor_crash.cpp +++ b/clang/test/SemaSYCL/spec_const_and_accesor_crash.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump %s | FileCheck %s // The test checks that Clang doesn't crash if a specialization constant gets // into the kernel capture list before an accessor diff --git a/clang/test/SemaSYCL/spurious-host-warning.cpp b/clang/test/SemaSYCL/spurious-host-warning.cpp index fc5aacdf95917..ee9d959232492 100644 --- a/clang/test/SemaSYCL/spurious-host-warning.cpp +++ b/clang/test/SemaSYCL/spurious-host-warning.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-host -triple x86_64-pc-linux-gnu -fsyntax-only -verify %s -DSYCLHOST +// RUN: %clang_cc1 -fsycl-is-host -triple x86_64-pc-linux-gnu -fsyntax-only -verify %s -DSYCLHOST // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify %s #ifdef SYCLHOST diff --git a/clang/test/SemaSYCL/stall_enable.cpp b/clang/test/SemaSYCL/stall_enable.cpp index 45ba33a58a906..703d6436e3485 100644 --- a/clang/test/SemaSYCL/stall_enable.cpp +++ b/clang/test/SemaSYCL/stall_enable.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -fsyntax-only -fsycl -internal-isystem %S/Inputs -fsycl-is-device -Wno-sycl-2017-compat -DTRIGGER_ERROR -verify -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -ast-dump -Wno-sycl-2017-compat %s | FileCheck %s +// RUN: %clang_cc1 %s -fsyntax-only -internal-isystem %S/Inputs -fsycl-is-device -Wno-sycl-2017-compat -DTRIGGER_ERROR -verify +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsyntax-only -ast-dump -Wno-sycl-2017-compat %s | FileCheck %s #include "sycl.hpp" diff --git a/clang/test/SemaSYCL/stdtypes_kernel_type.cpp b/clang/test/SemaSYCL/stdtypes_kernel_type.cpp index 59d212f64ded7..88d2ad5776e0c 100644 --- a/clang/test/SemaSYCL/stdtypes_kernel_type.cpp +++ b/clang/test/SemaSYCL/stdtypes_kernel_type.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -sycl-std=2020 -DCHECK_ERROR -verify %s +// RUN: %clang_cc1 -fsycl-is-device -sycl-std=2020 -DCHECK_ERROR -verify %s #include "Inputs/sycl.hpp" diff --git a/clang/test/SemaSYCL/streams.cpp b/clang/test/SemaSYCL/streams.cpp index bae0671bf1358..933dabff649fb 100644 --- a/clang/test/SemaSYCL/streams.cpp +++ b/clang/test/SemaSYCL/streams.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -S -fsycl -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -S -fsycl-is-device -internal-isystem %S/Inputs -triple spir64 -ast-dump -sycl-std=2020 %s | FileCheck %s // This test demonstrates passing of SYCL stream instances as kernel arguments and checks if the compiler generates // the correct ast-dump diff --git a/clang/test/SemaSYCL/supported_math.cpp b/clang/test/SemaSYCL/supported_math.cpp index 86c4c792d5998..7529e54a8a31e 100644 --- a/clang/test/SemaSYCL/supported_math.cpp +++ b/clang/test/SemaSYCL/supported_math.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-strict -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-strict -verify %s // expected-no-diagnostics extern "C" float sinf(float); extern "C" float cosf(float); diff --git a/clang/test/SemaSYCL/sycl-callstack.cpp b/clang/test/SemaSYCL/sycl-callstack.cpp index 8c8a53753743d..e6eb7a34a3c3c 100644 --- a/clang/test/SemaSYCL/sycl-callstack.cpp +++ b/clang/test/SemaSYCL/sycl-callstack.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -verify -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -verify -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s template __attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) { diff --git a/clang/test/SemaSYCL/sycl-cconv.cpp b/clang/test/SemaSYCL/sycl-cconv.cpp index a42d4e7622aaa..f96d04e1955c3 100644 --- a/clang/test/SemaSYCL/sycl-cconv.cpp +++ b/clang/test/SemaSYCL/sycl-cconv.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-windows-sycldevice -aux-triple x86_64-pc-windows-msvc -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-windows-sycldevice -aux-triple x86_64-pc-windows-msvc -fsyntax-only -Wno-sycl-2017-compat -verify %s // expected-no-warning@+1 __inline __cdecl int printf(char const* const _Format, ...) { return 0; } diff --git a/clang/test/SemaSYCL/sycl-device-const-static.cpp b/clang/test/SemaSYCL/sycl-device-const-static.cpp index 02a97810b7e5e..f4d9bc6b3f298 100644 --- a/clang/test/SemaSYCL/sycl-device-const-static.cpp +++ b/clang/test/SemaSYCL/sycl-device-const-static.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s struct Base {}; struct S { diff --git a/clang/test/SemaSYCL/sycl-device-intel-fpga-no-global-work-offset.cpp b/clang/test/SemaSYCL/sycl-device-intel-fpga-no-global-work-offset.cpp index 1b28134c98275..799f274ac0cc5 100644 --- a/clang/test/SemaSYCL/sycl-device-intel-fpga-no-global-work-offset.cpp +++ b/clang/test/SemaSYCL/sycl-device-intel-fpga-no-global-work-offset.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s // Test that checks template parameter support for 'no_global_work_offset' attribute on sycl device. diff --git a/clang/test/SemaSYCL/sycl-device-intel-max-global-work-dim-template.cpp b/clang/test/SemaSYCL/sycl-device-intel-max-global-work-dim-template.cpp index 87e45364994f1..95e7a13797ab7 100644 --- a/clang/test/SemaSYCL/sycl-device-intel-max-global-work-dim-template.cpp +++ b/clang/test/SemaSYCL/sycl-device-intel-max-global-work-dim-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s // Test that checkes template parameter support for 'max_global_work_dim' attribute on sycl device. diff --git a/clang/test/SemaSYCL/sycl-device-intel-max-work-group-size-template.cpp b/clang/test/SemaSYCL/sycl-device-intel-max-work-group-size-template.cpp index 6f3f255eb33ee..09a1bf4f05a33 100644 --- a/clang/test/SemaSYCL/sycl-device-intel-max-work-group-size-template.cpp +++ b/clang/test/SemaSYCL/sycl-device-intel-max-work-group-size-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s // Test that checks template parameter support for 'max_work_group_size' attribute on sycl device. diff --git a/clang/test/SemaSYCL/sycl-device-intel-reqd-work-group-size-template.cpp b/clang/test/SemaSYCL/sycl-device-intel-reqd-work-group-size-template.cpp index 3c6ec9a96462e..8338899af5f1f 100644 --- a/clang/test/SemaSYCL/sycl-device-intel-reqd-work-group-size-template.cpp +++ b/clang/test/SemaSYCL/sycl-device-intel-reqd-work-group-size-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s // Test that checks template parameter support for 'intel::reqd_work_group_size' attribute on sycl device. diff --git a/clang/test/SemaSYCL/sycl-device-num_simd_work_items-template.cpp b/clang/test/SemaSYCL/sycl-device-num_simd_work_items-template.cpp index 2b46c7aeebad0..3ed44721314e4 100644 --- a/clang/test/SemaSYCL/sycl-device-num_simd_work_items-template.cpp +++ b/clang/test/SemaSYCL/sycl-device-num_simd_work_items-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s // Test that checkes template parameter support for 'num_simd_work_items' attribute on sycl device. diff --git a/clang/test/SemaSYCL/sycl-device-reqd-sub-group-size-template.cpp b/clang/test/SemaSYCL/sycl-device-reqd-sub-group-size-template.cpp index 63f431b2eb32b..29812d30608ce 100644 --- a/clang/test/SemaSYCL/sycl-device-reqd-sub-group-size-template.cpp +++ b/clang/test/SemaSYCL/sycl-device-reqd-sub-group-size-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s // Test that checkes template parameter support for 'reqd_sub_group_size' attribute on sycl device. diff --git a/clang/test/SemaSYCL/sycl-device-reqd-work-group-size-template.cpp b/clang/test/SemaSYCL/sycl-device-reqd-work-group-size-template.cpp index d223326aa6b12..1835ba7c6dbc5 100644 --- a/clang/test/SemaSYCL/sycl-device-reqd-work-group-size-template.cpp +++ b/clang/test/SemaSYCL/sycl-device-reqd-work-group-size-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s // Test that checks template parameter support for 'cl::reqd_work_group_size' attribute on sycl device. diff --git a/clang/test/SemaSYCL/sycl-device-scheduler_target_fmax_mhz-template.cpp b/clang/test/SemaSYCL/sycl-device-scheduler_target_fmax_mhz-template.cpp index 0ed3a6b23b053..ae3f1a5ff1302 100644 --- a/clang/test/SemaSYCL/sycl-device-scheduler_target_fmax_mhz-template.cpp +++ b/clang/test/SemaSYCL/sycl-device-scheduler_target_fmax_mhz-template.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -ast-dump -verify -pedantic %s | FileCheck %s // Test that checkes template parameter support for 'scheduler_target_fmax_mhz' attribute on sycl device. diff --git a/clang/test/SemaSYCL/sycl-device-static-restrict.cpp b/clang/test/SemaSYCL/sycl-device-static-restrict.cpp index b3517770e5290..6a9d5092689e2 100644 --- a/clang/test/SemaSYCL/sycl-device-static-restrict.cpp +++ b/clang/test/SemaSYCL/sycl-device-static-restrict.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s const int glob1 = 1; int glob2 = 2; template diff --git a/clang/test/SemaSYCL/sycl-device.cpp b/clang/test/SemaSYCL/sycl-device.cpp index 48681606ebb75..02e5ce8bebd67 100644 --- a/clang/test/SemaSYCL/sycl-device.cpp +++ b/clang/test/SemaSYCL/sycl-device.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s // RUN: %clang_cc1 -verify -DNO_SYCL %s #ifndef NO_SYCL diff --git a/clang/test/SemaSYCL/sycl-dllimport-dllexport.cpp b/clang/test/SemaSYCL/sycl-dllimport-dllexport.cpp index 7c9ed3230dbb3..c3a7923d674f1 100644 --- a/clang/test/SemaSYCL/sycl-dllimport-dllexport.cpp +++ b/clang/test/SemaSYCL/sycl-dllimport-dllexport.cpp @@ -1,6 +1,6 @@ // XFAIL: * // RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -fms-extensions \ -// RUN: -aux-triple x86_64-unknown-linux-gnu -fsycl -fsycl-is-device \ +// RUN: -aux-triple x86_64-unknown-linux-gnu -fsycl-is-device \ // RUN: -fsyntax-only -Wno-sycl-2017-compat -DWARNCHECK %s -o /dev/null 2>&1 | FileCheck %s // check random triple aux-triple with sycl-device @@ -8,14 +8,14 @@ // RUN: -fms-extensions -DWARNCHECK %s -o /dev/null 2>&1 | FileCheck %s // check without -aux-triple but sycl-device -// RUN: %clang_cc1 -triple spir64-unknown-windows-sycldevice -fsycl \ +// RUN: %clang_cc1 -triple spir64-unknown-windows-sycldevice \ // RUN: -fsycl-is-device -aux-triple x86_64-pc-windows-msvc -fms-extensions \ // RUN: -fsyntax-only -Wno-sycl-2017-compat -DWARNCHECK %s -o /dev/null 2>&1 | \ // RUN: FileCheck %s --check-prefixes CHECKALL // check -aux-tripe without sycl-device // RUN: %clang_cc1 -triple spir64-unknown-windows-sycldevice -Wno-sycl-2017-compat -fsyntax-only \ -// RUN: -aux-triple x86_64-pc-windows-msvc -fsycl -fsycl-is-device \ +// RUN: -aux-triple x86_64-pc-windows-msvc -fsycl-is-device \ // RUN: -fms-extensions -verify %s // check error message when dllimport function gets called in sycl-kernel code diff --git a/clang/test/SemaSYCL/sycl-empty-header.cpp b/clang/test/SemaSYCL/sycl-empty-header.cpp index ca960f97584d1..739727d3afd51 100644 --- a/clang/test/SemaSYCL/sycl-empty-header.cpp +++ b/clang/test/SemaSYCL/sycl-empty-header.cpp @@ -2,11 +2,11 @@ // compiling source files with no device sycl construct. // RUN: mkdir -p %t_dir -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h -save-temps=cwd %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h -save-temps=cwd %s // RUN: ls %t.h // RUN: rm -f %t.h // RUN: touch %t.fail.h // RUN: chmod 400 %t.fail.h -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.fail.h %s 2>&1 | FileCheck %s --check-prefix=SYCL-BADFILE +// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.fail.h %s 2>&1 | FileCheck %s --check-prefix=SYCL-BADFILE // RUN: rm -f %t.fail.h // SYCL-BADFILE: Error: {{[Pp]ermission}} denied when opening {{.*.fail.h}} diff --git a/clang/test/SemaSYCL/sycl-esimd.cpp b/clang/test/SemaSYCL/sycl-esimd.cpp index 73970ee013f27..9b90726f80c50 100644 --- a/clang/test/SemaSYCL/sycl-esimd.cpp +++ b/clang/test/SemaSYCL/sycl-esimd.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-explicit-simd -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-explicit-simd -fsyntax-only -Wno-sycl-2017-compat -verify %s // ----------- Negative tests diff --git a/clang/test/SemaSYCL/sycl-fptr-lambda.cpp b/clang/test/SemaSYCL/sycl-fptr-lambda.cpp index 5ec68265a2ee9..eac66a9106ab8 100644 --- a/clang/test/SemaSYCL/sycl-fptr-lambda.cpp +++ b/clang/test/SemaSYCL/sycl-fptr-lambda.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -std=c++14 -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -std=c++14 -verify -Wno-sycl-2017-compat -fsyntax-only %s // expected-no-diagnostics template diff --git a/clang/test/SemaSYCL/sycl-pseudo-dtor.cpp b/clang/test/SemaSYCL/sycl-pseudo-dtor.cpp index cc839a18446ed..3635e22ffac43 100644 --- a/clang/test/SemaSYCL/sycl-pseudo-dtor.cpp +++ b/clang/test/SemaSYCL/sycl-pseudo-dtor.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-2017-compat -fsyntax-only %s template struct functor_wrapper{ diff --git a/clang/test/SemaSYCL/sycl-restrict.cpp b/clang/test/SemaSYCL/sycl-restrict.cpp index 933fb6bd9f605..995f2acb5e416 100644 --- a/clang/test/SemaSYCL/sycl-restrict.cpp +++ b/clang/test/SemaSYCL/sycl-restrict.cpp @@ -1,11 +1,11 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -triple spir64 \ +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -triple spir64 \ // RUN: -aux-triple x86_64-unknown-linux-gnu -Wno-return-type -verify \ // RUN: -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -triple spir64 \ +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -triple spir64 \ // RUN: -aux-triple x86_64-unknown-linux-gnu -fno-sycl-allow-func-ptr \ // RUN: -Wno-return-type -verify -Wno-sycl-2017-compat -fsyntax-only \ // RUN: -std=c++17 %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -triple spir64 \ +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -triple spir64 \ // RUN: -aux-triple x86_64-unknown-linux-gnu -DALLOW_FP=1 \ // RUN: -fsycl-allow-func-ptr -Wno-return-type -verify \ // RUN: -Wno-sycl-2017-compat -fsyntax-only -std=c++17 %s diff --git a/clang/test/SemaSYCL/sycl-templ-addr-space.cpp b/clang/test/SemaSYCL/sycl-templ-addr-space.cpp index 64e1a3659d7de..a4613d445ab0b 100644 --- a/clang/test/SemaSYCL/sycl-templ-addr-space.cpp +++ b/clang/test/SemaSYCL/sycl-templ-addr-space.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64 -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64 -verify %s // Test that the compiler no longer asserts while processing this test case. diff --git a/clang/test/SemaSYCL/sycl-varargs-cconv.cpp b/clang/test/SemaSYCL/sycl-varargs-cconv.cpp index 8e0f8e0dd535a..4ea10b3a10c37 100644 --- a/clang/test/SemaSYCL/sycl-varargs-cconv.cpp +++ b/clang/test/SemaSYCL/sycl-varargs-cconv.cpp @@ -1,10 +1,10 @@ // The following runs use -Wno-sycl-strict to bypass SYCL_EXTERNAL applied to // funtion with raw pointer parameter -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -Wno-sycl-strict -fsyntax-only %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -Wno-sycl-strict -fsyntax-only -DPRINTF_INVALID_DEF %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -fsyntax-only -Wno-sycl-strict -DPRINTF_INVALID_DECL %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -fsyntax-only -Wno-sycl-strict -DPRINTF_VALID1 %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -fsyntax-only -Wno-sycl-strict -DPRINTF_VALID2 %s +// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-strict -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -verify -Wno-sycl-strict -fsyntax-only -DPRINTF_INVALID_DEF %s +// RUN: %clang_cc1 -fsycl-is-device -verify -fsyntax-only -Wno-sycl-strict -DPRINTF_INVALID_DECL %s +// RUN: %clang_cc1 -fsycl-is-device -verify -fsyntax-only -Wno-sycl-strict -DPRINTF_VALID1 %s +// RUN: %clang_cc1 -fsycl-is-device -verify -fsyntax-only -Wno-sycl-strict -DPRINTF_VALID2 %s #if defined(PRINTF_INVALID_DECL) extern "C" SYCL_EXTERNAL int __spirv_ocl_printf(const char *__format, ...); diff --git a/clang/test/SemaSYCL/tls_error.cpp b/clang/test/SemaSYCL/tls_error.cpp index bacecf7827803..a43a5ee9b6bbc 100644 --- a/clang/test/SemaSYCL/tls_error.cpp +++ b/clang/test/SemaSYCL/tls_error.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64 -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64 -verify -Wno-sycl-2017-compat -fsyntax-only %s extern __thread void* __once_callable; // expected-no-error extern __thread void (*__once_call)(); // expected-no-error diff --git a/clang/test/SemaSYCL/unevaluated-function.cpp b/clang/test/SemaSYCL/unevaluated-function.cpp index 49ffe954ab7a9..2d0059eaef06d 100644 --- a/clang/test/SemaSYCL/unevaluated-function.cpp +++ b/clang/test/SemaSYCL/unevaluated-function.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fcxx-exceptions -verify -Wno-sycl-2017-compat -fsyntax-only %s +// RUN: %clang_cc1 -fsycl-is-device -fcxx-exceptions -verify -Wno-sycl-2017-compat -fsyntax-only %s // Check that a function used in an unevaluated context is not subject // to delayed device diagnostics. diff --git a/clang/test/SemaSYCL/union-kernel-param-neg.cpp b/clang/test/SemaSYCL/union-kernel-param-neg.cpp index 092496d561e39..3ebb317d9394a 100644 --- a/clang/test/SemaSYCL/union-kernel-param-neg.cpp +++ b/clang/test/SemaSYCL/union-kernel-param-neg.cpp @@ -1,4 +1,4 @@ -//RUN: %clang_cc1 -fsycl -fsycl-is-device -verify -fsyntax-only %s +//RUN: %clang_cc1 -fsycl-is-device -verify -fsyntax-only %s // This test checks if compiler reports compilation error on an attempt to pass // accessor/sampler as SYCL kernel parameter inside union. diff --git a/clang/test/SemaSYCL/union-kernel-param.cpp b/clang/test/SemaSYCL/union-kernel-param.cpp index 8cf6e7a628d93..8b85acd92d3da 100644 --- a/clang/test/SemaSYCL/union-kernel-param.cpp +++ b/clang/test/SemaSYCL/union-kernel-param.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -ast-dump %s | FileCheck %s // This test checks that compiler generates correct kernel arguments for // union without array. diff --git a/clang/test/SemaSYCL/union-kernel-param1.cpp b/clang/test/SemaSYCL/union-kernel-param1.cpp index acc11f1fb8cfb..d605be26f1c89 100644 --- a/clang/test/SemaSYCL/union-kernel-param1.cpp +++ b/clang/test/SemaSYCL/union-kernel-param1.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -ast-dump %s | FileCheck %s // This test checks that compiler generates correct kernel arguments for // unions containing Arrays. diff --git a/clang/test/SemaSYCL/union-kernel-param2.cpp b/clang/test/SemaSYCL/union-kernel-param2.cpp index 0fd340b343b5e..eb1d1208f932e 100644 --- a/clang/test/SemaSYCL/union-kernel-param2.cpp +++ b/clang/test/SemaSYCL/union-kernel-param2.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -ast-dump %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -ast-dump %s | FileCheck %s // This test checks that compiler generates correct kernel arguments for // a struct-with-an-array-of-unions and a array-of-struct-with-a-union. diff --git a/clang/test/SemaSYCL/unnamed-kernel.cpp b/clang/test/SemaSYCL/unnamed-kernel.cpp index c4e3746f78679..5a4b31b8594ba 100644 --- a/clang/test/SemaSYCL/unnamed-kernel.cpp +++ b/clang/test/SemaSYCL/unnamed-kernel.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-unnamed-lambda -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsycl-unnamed-lambda -fsyntax-only -Wno-sycl-2017-compat -verify %s #include "Inputs/sycl.hpp" #ifdef __SYCL_UNNAMED_LAMBDA__ diff --git a/clang/test/SemaSYCL/unsupported_math.cpp b/clang/test/SemaSYCL/unsupported_math.cpp index e0663b708785a..c1ed10ccf496f 100644 --- a/clang/test/SemaSYCL/unsupported_math.cpp +++ b/clang/test/SemaSYCL/unsupported_math.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -Wno-sycl-2017-compat -verify %s template __attribute__((sycl_kernel)) void kernel(const Func &kernelFunc) { kernelFunc(); diff --git a/clang/test/SemaSYCL/variadic-func-call.cpp b/clang/test/SemaSYCL/variadic-func-call.cpp index bdb7ace1690b6..96b19f1d7d905 100644 --- a/clang/test/SemaSYCL/variadic-func-call.cpp +++ b/clang/test/SemaSYCL/variadic-func-call.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown -fsyntax-only -Wno-sycl-2017-compat -verify %s +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -fsyntax-only -Wno-sycl-2017-compat -verify %s void variadic(int, ...) {} namespace NS { diff --git a/clang/test/SemaSYCL/wrapped-accessor.cpp b/clang/test/SemaSYCL/wrapped-accessor.cpp index e5825fac768f8..b8d79501c1fda 100644 --- a/clang/test/SemaSYCL/wrapped-accessor.cpp +++ b/clang/test/SemaSYCL/wrapped-accessor.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsycl -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s +// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -ast-dump -sycl-std=2020 %s | FileCheck %s // This test checks that compiler generates correct kernel wrapper in case when // accessor is wrapped. diff --git a/clang/unittests/Frontend/CompilerInvocationTest.cpp b/clang/unittests/Frontend/CompilerInvocationTest.cpp index 268f0d0dca450..811e9414345fb 100644 --- a/clang/unittests/Frontend/CompilerInvocationTest.cpp +++ b/clang/unittests/Frontend/CompilerInvocationTest.cpp @@ -513,7 +513,8 @@ TEST_F(CommandLineTest, ConditionalParsingIfFalseFlagNotPresent) { CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); ASSERT_FALSE(Diags->hasErrorOccurred()); - ASSERT_FALSE(Invocation.getLangOpts()->SYCL); + ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsDevice); + ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_None); Invocation.generateCC1CommandLine(GeneratedArgs, *this); @@ -528,13 +529,21 @@ TEST_F(CommandLineTest, ConditionalParsingIfFalseFlagPresent) { CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); ASSERT_FALSE(Diags->hasErrorOccurred()); - ASSERT_FALSE(Invocation.getLangOpts()->SYCL); - ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_None); + ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsDevice); + ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); + ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_2017); Invocation.generateCC1CommandLine(GeneratedArgs, *this); - ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-fsycl")))); - ASSERT_THAT(GeneratedArgs, Not(Contains(HasSubstr("-sycl-std=")))); + ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-fsycl-is-device")))); + ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-fsycl-is-host")))); + + // FIXME: generateCC1CommandLine is only used by the unit test system and + // cannot handle this case. It passes along the -sycl-std because the option + // definition does not specify that it relies on -fsycl any longer (because + // there is no syntax I could find that would allow it). However, the option + // is handled properly on a real invocation. See: Clang::ConstructJob(). + ASSERT_THAT(GeneratedArgs, Contains(HasSubstr("-sycl-std="))); } TEST_F(CommandLineTest, ConditionalParsingIfTrueFlagNotPresent) { @@ -542,13 +551,12 @@ TEST_F(CommandLineTest, ConditionalParsingIfTrueFlagNotPresent) { CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); - ASSERT_FALSE(Diags->hasErrorOccurred()); - ASSERT_TRUE(Invocation.getLangOpts()->SYCL); + ASSERT_TRUE(Diags->hasErrorOccurred()); ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_None); Invocation.generateCC1CommandLine(GeneratedArgs, *this); - ASSERT_THAT(GeneratedArgs, Contains(StrEq("-fsycl"))); + ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-fsycl")))); ASSERT_THAT(GeneratedArgs, Not(Contains(HasSubstr("-sycl-std=")))); } @@ -557,13 +565,12 @@ TEST_F(CommandLineTest, ConditionalParsingIfTrueFlagPresent) { CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); - ASSERT_FALSE(Diags->hasErrorOccurred()); - ASSERT_TRUE(Invocation.getLangOpts()->SYCL); + ASSERT_TRUE(Diags->hasErrorOccurred()); ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_2017); Invocation.generateCC1CommandLine(GeneratedArgs, *this); - ASSERT_THAT(GeneratedArgs, Contains(StrEq("-fsycl"))); + ASSERT_THAT(GeneratedArgs, Not(Contains(StrEq("-fsycl")))); ASSERT_THAT(GeneratedArgs, Contains(StrEq("-sycl-std=2017"))); } diff --git a/sycl/test/check_device_code/id_queries_fit_int.cpp b/sycl/test/check_device_code/id_queries_fit_int.cpp index f848ba59afa0c..6736ff6c24c7d 100644 --- a/sycl/test/check_device_code/id_queries_fit_int.cpp +++ b/sycl/test/check_device_code/id_queries_fit_int.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx -fsycl -Xclang -fsycl-is-host -fsycl-id-queries-fit-in-int -O0 -c -S -emit-llvm -o %t.ll %s +// RUN: %clangxx -fsycl -fsycl-id-queries-fit-in-int -O0 -c -S -emit-llvm -o %t.ll %s // RUN: FileCheck %s --input-file %t.ll #include