Skip to content

Commit a539197

Browse files
authored
[SYCL] Rework the way we handle SYCL -cc1 arguments. (#3259)
-fsycl-is-device and -fsycl-is-host are mutually exclusive options that now imply -fsycl mode. So passing -fsycl-is-device will now set both the SYCL and SYCLIsDevice language options. This introduces driver errors if the user attempts to pass both host and device mode on the command line. Further, it disallows you from specifying the -sycl-std= option unless in device or host mode. There is some testing fallout from these changes because some tests were passing -fsycl-is-device and not passing -fsycl which meant that SYCL mode was never enabled for those tests.
1 parent b1e1de0 commit a539197

File tree

223 files changed

+324
-301
lines changed

Some content is hidden

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

223 files changed

+324
-301
lines changed

clang/include/clang/Basic/LangOptions.def

-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ LANGOPT(GPUMaxThreadsPerBlock, 32, 1024, "default max threads per block for kern
246246
LANGOPT(GPUDeferDiag, 1, 0, "defer host/device related diagnostic messages for CUDA/HIP")
247247
LANGOPT(GPUExcludeWrongSideOverloads, 1, 0, "always exclude wrong side overloads in overloading resolution for CUDA/HIP")
248248

249-
LANGOPT(SYCL , 1, 0, "SYCL")
250249
LANGOPT(SYCLIsDevice , 1, 0, "Generate code for SYCL device")
251250
LANGOPT(SYCLIsHost , 1, 0, "SYCL host compilation")
252251
LANGOPT(SYCLAllowFuncPtr , 1, 0, "Allow function pointers in SYCL device code")

clang/include/clang/Driver/Options.td

+7-9
Original file line numberDiff line numberDiff line change
@@ -4287,19 +4287,18 @@ defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>;
42874287
def reuse_exe_EQ : Joined<["-"], "reuse-exe=">, Flags<[CoreOption]>,
42884288
HelpText<"Speed up FPGA aoc compile if the device code in <exe> is unchanged.">,
42894289
MetaVarName<"<exe>">;
4290-
defm sycl : BoolOption<"f", "sycl",
4291-
LangOpts<"SYCL">, DefaultFalse,
4292-
PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
4293-
BothFlags<[CoreOption], " SYCL kernels compilation for device">>,
4294-
Group<sycl_Group>;
4290+
def fsycl : Flag<["-"], "fsycl">, Flags<[NoXarchOption, CoreOption]>, Group<sycl_Group>,
4291+
HelpText<"Enables SYCL kernels compilation for device">;
4292+
def fno_sycl : Flag<["-"], "fno-sycl">, Flags<[NoXarchOption, CoreOption]>, Group<sycl_Group>,
4293+
HelpText<"Disables SYCL kernels compilation for device">;
42954294
def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>, Flags<[CC1Option, NoArgumentUnused, CoreOption]>,
42964295
HelpText<"SYCL language standard to compile for.">, Values<"2020,2017,121,1.2.1,sycl-1.2.1">,
42974296
NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>, NormalizedValuesScope<"LangOptions">,
4298-
MarshallingInfoString<LangOpts<"SYCLVersion">, "SYCL_None">, ShouldParseIf<fsycl.KeyPath>, AutoNormalizeEnum;
4297+
MarshallingInfoString<LangOpts<"SYCLVersion">, "SYCL_None">, AutoNormalizeEnum;
42994298
defm sycl_esimd: BoolFOption<"sycl-explicit-simd",
43004299
LangOpts<"SYCLExplicitSIMD">, DefaultFalse,
43014300
PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
4302-
BothFlags<[NoArgumentUnused, CoreOption], " SYCL explicit SIMD extension.">>;
4301+
BothFlags<[NoArgumentUnused, CoreOption], "SYCL explicit SIMD extension.">>;
43034302
defm sycl_early_optimizations : OptOutFFlag<"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler", [CoreOption]>;
43044303
def fsycl_dead_args_optimization : Flag<["-"], "fsycl-dead-args-optimization">,
43054304
Group<sycl_Group>, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enables "
@@ -5513,8 +5512,7 @@ def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">,
55135512

55145513
def fsycl_is_device : Flag<["-"], "fsycl-is-device">,
55155514
HelpText<"Generate code for SYCL device.">,
5516-
MarshallingInfoFlag<LangOpts<"SYCLIsDevice">>,
5517-
ShouldParseIf<fsycl.KeyPath>;
5515+
MarshallingInfoFlag<LangOpts<"SYCLIsDevice">>;
55185516
def fsycl_is_host : Flag<["-"], "fsycl-is-host">,
55195517
HelpText<"SYCL host compilation">,
55205518
MarshallingInfoFlag<LangOpts<"SYCLIsHost">>;

clang/lib/AST/ASTContext.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2098,7 +2098,7 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const {
20982098
Align = Target->getDoubleAlign();
20992099
break;
21002100
case BuiltinType::LongDouble:
2101-
if (((getLangOpts().SYCL && getLangOpts().SYCLIsDevice) ||
2101+
if ((getLangOpts().SYCLIsDevice ||
21022102
(getLangOpts().OpenMP && getLangOpts().OpenMPIsDevice)) &&
21032103
AuxTarget != nullptr &&
21042104
(Target->getLongDoubleWidth() != AuxTarget->getLongDoubleWidth() ||

clang/lib/CodeGen/TargetInfo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9999,7 +9999,7 @@ LangAS SPIRTargetCodeGenInfo::getGlobalVarAddressSpace(CodeGenModule &CGM,
99999999
LangAS AddrSpace = D->getType().getAddressSpace();
1000010000
assert(AddrSpace == LangAS::Default || isTargetAddressSpace(AddrSpace) ||
1000110001
// allow applying clang AST address spaces in SYCL mode
10002-
(CGM.getLangOpts().SYCL && CGM.getLangOpts().SYCLIsDevice));
10002+
CGM.getLangOpts().SYCLIsDevice);
1000310003
if (AddrSpace != LangAS::Default)
1000410004
return AddrSpace;
1000510005

clang/lib/Driver/Driver.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -812,9 +812,9 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
812812
// If -fsycl is supplied without any of these we will assume SPIR-V.
813813
// Use of -fsycl-device-only overrides -fsycl.
814814
bool HasValidSYCLRuntime =
815-
(C.getInputArgs().hasFlag(options::OPT_fsycl, options::OPT_fno_sycl,
816-
false) ||
817-
C.getInputArgs().hasArg(options::OPT_fsycl_device_only));
815+
C.getInputArgs().hasFlag(options::OPT_fsycl, options::OPT_fno_sycl,
816+
false) ||
817+
C.getInputArgs().hasArg(options::OPT_fsycl_device_only);
818818

819819
// A mechanism for retrieving SYCL-specific options, erroring out
820820
// if SYCL offloading wasn't enabled prior to that

clang/lib/Driver/ToolChains/Clang.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -4289,7 +4289,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
42894289

42904290
if (UseSYCLTriple) {
42914291
// We want to compile sycl kernels.
4292-
CmdArgs.push_back("-fsycl");
42934292
CmdArgs.push_back("-fsycl-is-device");
42944293
CmdArgs.push_back("-fdeclare-spirv-builtins");
42954294

@@ -5880,8 +5879,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
58805879
// Forward -cl options to -cc1
58815880
RenderOpenCLOptions(Args, CmdArgs);
58825881

5883-
// Forward -sycl-std option to -cc1
5884-
Args.AddLastArg(CmdArgs, options::OPT_sycl_std_EQ);
5882+
// Forward -sycl-std option to -cc1 only if -fsycl is enabled.
5883+
if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false))
5884+
Args.AddLastArg(CmdArgs, options::OPT_sycl_std_EQ);
58855885

58865886
if (IsHIP) {
58875887
if (Args.hasFlag(options::OPT_fhip_new_launch_api,
@@ -6563,7 +6563,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
65636563
}
65646564
// Let the FE know we are doing a SYCL offload compilation, but we are
65656565
// doing the host pass.
6566-
CmdArgs.push_back("-fsycl");
65676566
CmdArgs.push_back("-fsycl-is-host");
65686567

65696568
if (Args.hasFlag(options::OPT_fsycl_esimd, options::OPT_fno_sycl_esimd,

clang/lib/Frontend/CompilerInvocation.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,11 @@ static void FixupInvocation(CompilerInvocation &Invocation,
464464
LangOpts.NewAlignOverride = 0;
465465
}
466466

467+
// Prevent the user from specifying both -fsycl-is-device and -fsycl-is-host.
468+
if (LangOpts.SYCLIsDevice && LangOpts.SYCLIsHost)
469+
Diags.Report(diag::err_drv_argument_not_allowed_with) << "-fsycl-is-device"
470+
<< "-fsycl-is-host";
471+
467472
if (Args.hasArg(OPT_fgnu89_inline) && LangOpts.CPlusPlus)
468473
Diags.Report(diag::err_drv_argument_not_allowed_with)
469474
<< "-fgnu89-inline" << GetInputKindName(IK);
@@ -3706,7 +3711,7 @@ bool CompilerInvocation::ParseLangArgsImpl(LangOptions &Opts, ArgList &Args,
37063711
LangStd = OpenCLLangStd;
37073712
}
37083713

3709-
if (Opts.SYCL) {
3714+
if (Args.hasArg(OPT_fsycl_is_device) || Args.hasArg(OPT_fsycl_is_host)) {
37103715
// -sycl-std applies to any SYCL source, not only those containing kernels,
37113716
// but also those using the SYCL API
37123717
if (const Arg *A = Args.getLastArg(OPT_sycl_std_EQ)) {

clang/lib/Frontend/InitPreprocessor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI,
474474
Builder.defineMacro("__FAST_RELAXED_MATH__");
475475
}
476476

477-
if (LangOpts.SYCL) {
477+
if (LangOpts.SYCLIsDevice || LangOpts.SYCLIsHost) {
478478
// SYCL Version is set to a value when building SYCL applications
479479
if (LangOpts.getSYCLVersion() == LangOptions::SYCL_2017) {
480480
Builder.defineMacro("CL_SYCL_LANGUAGE_VERSION", "121");

clang/test/CodeGenSYCL/accessor_inheritance.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22
#include "Inputs/sycl.hpp"
33

44
struct Base {

clang/test/CodeGenSYCL/address-space-cond-op.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2-
// RUN: %clang_cc1 -x c++ -triple spir64-unknown-linux-sycldevice -disable-llvm-passes -fsycl -fsycl-is-device -emit-llvm %s -o - | FileCheck %s
2+
// RUN: %clang_cc1 -x c++ -triple spir64-unknown-linux-sycldevice -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s
33

44
struct S {
55
unsigned short x;

clang/test/CodeGenSYCL/address-space-initializer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice \
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice \
22
// RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
33

44
// This test checks that data for big constant initializer lists is placed

clang/test/CodeGenSYCL/address-space-new.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22

33
struct SpaceWaster {
44
int i, j;

clang/test/CodeGenSYCL/address-space-of-returns.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -fsycl -fsycl-is-device -disable-llvm-passes -emit-llvm -x c++ %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -fsycl-is-device -disable-llvm-passes -emit-llvm -x c++ %s -o - | FileCheck %s
22

33
struct A {
44
int B[42];

clang/test/CodeGenSYCL/address-space-parameter-conversions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22
void bar(int & Data) {}
33
// CHECK-DAG: define {{.*}}spir_func void @[[RAW_REF:[a-zA-Z0-9_]+]](i32 addrspace(4)* align 4 dereferenceable(4) %
44
void bar2(int & Data) {}

clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22

33
// This test checks that compiler generates correct kernel wrapper for basic
44
// case.

clang/test/CodeGenSYCL/buffer_location.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
22

33
// CHECK: define {{.*}}spir_kernel void @_ZTSZ4mainE15kernel_function{{.*}} !kernel_arg_buffer_location ![[MDBL:[0-9]+]]
44
// 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}

clang/test/CodeGenSYCL/const-wg-init.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22

33
#include "Inputs/sycl.hpp"
44

clang/test/CodeGenSYCL/convergent.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -emit-llvm -disable-llvm-passes \
1+
// RUN: %clang_cc1 -fsycl-is-device -emit-llvm -disable-llvm-passes \
22
// RUN: -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | \
33
// RUN: FileCheck %s
44

clang/test/CodeGenSYCL/device-functions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22

33
template <typename T>
44
T bar(T arg);

clang/test/CodeGenSYCL/device-indirectly-callable-attr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22

33
void helper() {}
44

clang/test/CodeGenSYCL/device-variables.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22

33
enum class test_type { value1, value2, value3 };
44

clang/test/CodeGenSYCL/emit-all-decls-crash.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -femit-all-decls -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -femit-all-decls -o - | FileCheck %s
22

33
// This should not crash and we should not emit this declaration, even though
44
// we have 'emit-all-decls'.

clang/test/CodeGenSYCL/emit-kernel-in-virtual-func.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
22

33
template <typename name, typename Func>
44
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {

clang/test/CodeGenSYCL/emit-kernel-in-virtual-func2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
22

33
template <typename name, typename Func>
44
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {

clang/test/CodeGenSYCL/esimd-accessor-ptr-md.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// separate. So, we can split this test into 2, where one
44
// will be testing code generation and the second ESIMD lowering.
55
//
6-
// RUN: %clang_cc1 -fsycl -fsycl-explicit-simd -fsycl-is-device \
6+
// RUN: %clang_cc1 -fsycl-explicit-simd -fsycl-is-device \
77
// RUN: -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice \
88
// RUN: -disable-llvm-passes -emit-llvm %s -o %t
99
// RUN: sycl-post-link -split-esimd -lower-esimd -O0 -S %t -o %t.table

clang/test/CodeGenSYCL/esimd-private-global.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// will be testing code generation and the second ESIMD lowering.
55
//
66
// RUN: %clang_cc1 -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice \
7-
// RUN: -fsycl -fsycl-is-device -fsycl-explicit-simd -emit-llvm %s -o %t
7+
// RUN: -fsycl-is-device -fsycl-explicit-simd -emit-llvm %s -o %t
88
// RUN: sycl-post-link -split-esimd -lower-esimd -O0 -S %t -o %t.table
99
// RUN: FileCheck %s -input-file=%t_esimd_0.ll
1010

clang/test/CodeGenSYCL/esimd_metadata1.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -disable-llvm-passes -triple spir64-unknown-unknown-sycldevice \
2-
// RUN: -fsycl -fsycl-is-device -fsycl-explicit-simd -S -emit-llvm %s -o - | \
2+
// RUN: -fsycl-is-device -fsycl-explicit-simd -S -emit-llvm %s -o - | \
33
// RUN: FileCheck %s
44

55
// The test checks that:

clang/test/CodeGenSYCL/esimd_metadata2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 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
1+
// 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
22

33
// This test checks that attribute !intel_reqd_sub_group_size !1
44
// is added for kernels with !sycl_explicit_simd

clang/test/CodeGenSYCL/filescope_asm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
22
//
33
// Check that file-scope asm is ignored during device-side SYCL compilation.
44
//

clang/test/CodeGenSYCL/fpga_pipes.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device %s -emit-llvm -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device %s -emit-llvm -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -o - | FileCheck %s
22
// CHECK: %opencl.pipe_wo_t
33
// CHECK: %opencl.pipe_ro_t
44

clang/test/CodeGenSYCL/image_accessor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o %t.ll
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o %t.ll
22
// RUN: FileCheck < %t.ll --enable-var-scope %s --check-prefix=CHECK-1DRO
33
// RUN: FileCheck < %t.ll --enable-var-scope %s --check-prefix=CHECK-2DRO
44
// RUN: FileCheck < %t.ll --enable-var-scope %s --check-prefix=CHECK-3DRO

clang/test/CodeGenSYCL/inheritance.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
22

33
#include "Inputs/sycl.hpp"
44

clang/test/CodeGenSYCL/inline_asm.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm -x c++ %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm -x c++ %s -o - | FileCheck %s
22

33
class kernel;
44

clang/test/CodeGenSYCL/inlining.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice %s -S -emit-llvm -o - | FileCheck %s
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice %s -S -emit-llvm -o - | FileCheck %s
22

33
template <typename name, typename Func>
44
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {

clang/test/CodeGenSYCL/int_header1.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
1+
// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33

44
// CHECK:template <> struct KernelInfo<class KernelName> {

clang/test/CodeGenSYCL/int_header_esimd.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-explicit-simd -fsycl-is-device -internal-isystem %S/Inputs -fsycl-int-header=%t.h %s
1+
// RUN: %clang_cc1 -fsycl-explicit-simd -fsycl-is-device -internal-isystem %S/Inputs -fsycl-int-header=%t.h %s
22
// RUN: FileCheck -input-file=%t.h %s
33

44
// This test checks that

clang/test/CodeGenSYCL/int_header_inline_ns.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
1+
// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33

44
// This test checks if the SYCL device compiler is able to generate correct

clang/test/CodeGenSYCL/int_header_spec_const.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
1+
// RUN: %clang_cc1 -fsycl-is-device -fsycl-int-header=%t.h %s -o %t.out
22
// RUN: FileCheck -input-file=%t.h %s
33

44
#include "Inputs/sycl.hpp"

clang/test/CodeGenSYCL/integration_header.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -emit-llvm -o %t.ll
1+
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -fsycl-int-header=%t.h %s -emit-llvm -o %t.ll
22
// RUN: FileCheck -input-file=%t.h %s
33
//
44
// CHECK: #include <CL/sycl/detail/kernel_desc.hpp>

clang/test/CodeGenSYCL/intel-fpga-ivdep-array.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -fsycl -fsycl-is-device -emit-llvm %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s
22

33
// Array-specific ivdep - annotate the correspondent GEPs only
44
//

clang/test/CodeGenSYCL/intel-fpga-local.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 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
1+
// 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
22
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s -check-prefixes CHECK-HOST,CHECK-BOTH
33

44
// CHECK-BOTH: @_ZZ15attrs_on_staticvE15static_numbanks = internal{{.*}}constant i32 20, align 4

clang/test/CodeGenSYCL/intel-fpga-mem-builtin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 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
1+
// 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
22

33
#define PARAM_1 1U << 7
44
#define PARAM_2 1U << 8

clang/test/CodeGenSYCL/intel-fpga-no-global-work-offset.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// 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
1+
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s
22

33
#include "sycl.hpp"
44

0 commit comments

Comments
 (0)