Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Remove sycldevice target triple environment component #3929

Merged
merged 25 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e2f918c
[DAE] Remove unnecessary check for sycldevice environment
bader Jun 12, 2021
d8a5a67
Remove SYCL specific SPIR target data information.
bader Jun 12, 2021
4c57b23
[libdevice] Remove `sycldevice` environment component.
bader Jun 12, 2021
fecbe1d
Updated documentation
bader Jun 12, 2021
50b9ef5
Update test comments.
bader Jul 18, 2021
464dad8
[Driver] Replace `sycldevice` environment triple component with offlo…
bader Aug 5, 2021
0b0317a
Support bundles with deprecated triple
bader Aug 4, 2021
aa2b05b
[SYCL] Update sycl tests
bader Jun 12, 2021
83ef2de
Remove `sycldevice` environment component.
bader Jun 12, 2021
041c1bf
Remove `sycldevice` environment triple component from llvm-spirv tests.
bader Jun 12, 2021
14e0d63
Remove `sycldevice` environment triple component from llvm tests.
bader Jun 12, 2021
46a928f
Remove `sycldevice` environment triple component from clang tests.
bader Jun 12, 2021
fcde634
Improve deprecation diagnostics message.
bader Aug 6, 2021
6940546
Merge remote-tracking branch 'intel/sycl' into remove-sycldevice
bader Aug 10, 2021
21aabef
[NFC] Fix typo: uknown -> unknown.
bader Aug 10, 2021
5ec6aef
Apply code review comments.
bader Aug 10, 2021
8dcd760
Remove a work-around for SPIR target.
bader Aug 10, 2021
252bfc9
Apply suggestions from code review
bader Aug 11, 2021
82f52d4
Minor documentation update.
bader Aug 11, 2021
5e80314
Merge branch 'sycl' into remove-sycldevice
bader Aug 11, 2021
a519311
Revert "Remove `sycldevice` environment triple component from llvm-sp…
bader Aug 11, 2021
881c200
Apply code review comments.
bader Aug 12, 2021
3398497
Improve warning message for deprecated -fsycl-targets arguments.
bader Aug 12, 2021
176d9bf
Merge remote-tracking branch 'intel/sycl' into remove-sycldevice
bader Sep 1, 2021
f368708
Remove new usages of -sycldevice triple compoenent.
bader Sep 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 26 additions & 32 deletions clang/lib/Basic/Targets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,45 +595,39 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple,
}

case llvm::Triple::spir: {
if (Triple.getEnvironment() == llvm::Triple::SYCLDevice) {
llvm::Triple HT(Opts.HostTriple);
switch (HT.getOS()) {
case llvm::Triple::Win32:
switch (HT.getEnvironment()) {
default: // Assume MSVC for unknown environments
case llvm::Triple::MSVC:
assert(HT.getArch() == llvm::Triple::x86 &&
"Unsupported host architecture");
return new MicrosoftX86_32SPIRTargetInfo(Triple, Opts);
}
case llvm::Triple::Linux:
return new LinuxTargetInfo<SPIR32SYCLDeviceTargetInfo>(Triple, Opts);
default:
return new SPIR32SYCLDeviceTargetInfo(Triple, Opts);
llvm::Triple HT(Opts.HostTriple);
switch (HT.getOS()) {
case llvm::Triple::Win32:
switch (HT.getEnvironment()) {
default: // Assume MSVC for unknown environments
case llvm::Triple::MSVC:
assert(HT.getArch() == llvm::Triple::x86 &&
"Unsupported host architecture");
return new MicrosoftX86_32SPIRTargetInfo(Triple, Opts);
}
case llvm::Triple::Linux:
return new LinuxTargetInfo<SPIR32TargetInfo>(Triple, Opts);
default:
return new SPIR32TargetInfo(Triple, Opts);
}
return new SPIR32TargetInfo(Triple, Opts);
}

case llvm::Triple::spir64: {
if (Triple.getEnvironment() == llvm::Triple::SYCLDevice) {
llvm::Triple HT(Opts.HostTriple);
switch (HT.getOS()) {
case llvm::Triple::Win32:
switch (HT.getEnvironment()) {
default: // Assume MSVC for unknown environments
case llvm::Triple::MSVC:
assert(HT.getArch() == llvm::Triple::x86_64 &&
"Unsupported host architecture");
return new MicrosoftX86_64_SPIR64TargetInfo(Triple, Opts);
}
case llvm::Triple::Linux:
return new LinuxTargetInfo<SPIR64SYCLDeviceTargetInfo>(Triple, Opts);
default:
return new SPIR64SYCLDeviceTargetInfo(Triple, Opts);
llvm::Triple HT(Opts.HostTriple);
switch (HT.getOS()) {
case llvm::Triple::Win32:
switch (HT.getEnvironment()) {
default: // Assume MSVC for unknown environments
case llvm::Triple::MSVC:
assert(HT.getArch() == llvm::Triple::x86_64 &&
"Unsupported host architecture");
return new MicrosoftX86_64_SPIR64TargetInfo(Triple, Opts);
}
case llvm::Triple::Linux:
return new LinuxTargetInfo<SPIR64TargetInfo>(Triple, Opts);
default:
return new SPIR64TargetInfo(Triple, Opts);
}
return new SPIR64TargetInfo(Triple, Opts);
}

case llvm::Triple::wasm32:
Expand Down
42 changes: 8 additions & 34 deletions clang/lib/Basic/Targets/SPIR.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,40 +192,13 @@ class LLVM_LIBRARY_VISIBILITY SPIR64TargetInfo : public SPIRTargetInfo {
MacroBuilder &Builder) const override;
};

class LLVM_LIBRARY_VISIBILITY SPIR32SYCLDeviceTargetInfo
: public SPIR32TargetInfo {
public:
SPIR32SYCLDeviceTargetInfo(const llvm::Triple &Triple,
const TargetOptions &Opts)
: SPIR32TargetInfo(Triple, Opts) {
// This is workaround for exception_ptr class.
// Exceptions is not allowed in sycl device code but we should be able
// to parse host code. So we allow compilation of exception_ptr but
// if exceptions are used in device code we should emit a diagnostic.
MaxAtomicInlineWidth = 32;
}
};

class LLVM_LIBRARY_VISIBILITY SPIR64SYCLDeviceTargetInfo
: public SPIR64TargetInfo {
public:
SPIR64SYCLDeviceTargetInfo(const llvm::Triple &Triple,
const TargetOptions &Opts)
: SPIR64TargetInfo(Triple, Opts) {
// This is workaround for exception_ptr class.
// Exceptions is not allowed in sycl device code but we should be able
// to parse host code. So we allow compilation of exception_ptr but
// if exceptions are used in device code we should emit a diagnostic.
MaxAtomicInlineWidth = 64;
bader marked this conversation as resolved.
Show resolved Hide resolved
}
};

// x86-32 SPIR Windows target
class LLVM_LIBRARY_VISIBILITY WindowsX86_32SPIRTargetInfo
: public WindowsTargetInfo<SPIR32SYCLDeviceTargetInfo> {
: public WindowsTargetInfo<SPIR32TargetInfo> {
public:
WindowsX86_32SPIRTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
: WindowsTargetInfo<SPIR32SYCLDeviceTargetInfo>(Triple, Opts) {
WindowsX86_32SPIRTargetInfo(const llvm::Triple &Triple,
const TargetOptions &Opts)
: WindowsTargetInfo<SPIR32TargetInfo>(Triple, Opts) {
DoubleAlign = LongLongAlign = 64;
WCharType = UnsignedShort;
}
Expand Down Expand Up @@ -265,10 +238,11 @@ class LLVM_LIBRARY_VISIBILITY MicrosoftX86_32SPIRTargetInfo

// x86-64 SPIR64 Windows target
class LLVM_LIBRARY_VISIBILITY WindowsX86_64_SPIR64TargetInfo
: public WindowsTargetInfo<SPIR64SYCLDeviceTargetInfo> {
: public WindowsTargetInfo<SPIR64TargetInfo> {
public:
WindowsX86_64_SPIR64TargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
: WindowsTargetInfo<SPIR64SYCLDeviceTargetInfo>(Triple, Opts) {
WindowsX86_64_SPIR64TargetInfo(const llvm::Triple &Triple,
const TargetOptions &Opts)
: WindowsTargetInfo<SPIR64TargetInfo>(Triple, Opts) {
LongWidth = LongAlign = 32;
DoubleAlign = LongLongAlign = 64;
IntMaxType = SignedLongLong;
Expand Down
17 changes: 13 additions & 4 deletions clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,18 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
continue;
}

// Warn about deprecated `sycldevice` environment component.
if (TT.getEnvironmentName() == "sycldevice") {
Diag(clang::diag::warn_drv_deprecated_arg)
<< TT.str() << TT.getArchName();
// Drop environment component.
std::string EffectiveTriple =
Twine(TT.getArchName() + "-" + TT.getVendorName() + "-" +
TT.getOSName())
.str();
TT.setTriple(EffectiveTriple);
}

// Store the current triple so that we can check for duplicates in
// the following iterations.
FoundNormalizedTriples[NormalizedName] = Val;
Expand Down Expand Up @@ -985,7 +997,7 @@ void Driver::CreateOffloadingDeviceToolChains(Compilation &C,
else
SYCLTargetArch = "spir64";
else if (HasValidSYCLRuntime)
// Triple for -fintelfpga is spir64_fpga-unknown-unknown-sycldevice.
// Triple for -fintelfpga is spir64_fpga.
SYCLTargetArch = SYCLfpga ? "spir64_fpga" : "spir64";
if (!SYCLTargetArch.empty()) {
UniqueSYCLTriplesVec.push_back(MakeSYCLDeviceTriple(SYCLTargetArch));
Expand Down Expand Up @@ -1877,7 +1889,6 @@ llvm::Triple Driver::MakeSYCLDeviceTriple(StringRef TargetArch) const {
TT.setArchName(TargetArch);
TT.setVendor(llvm::Triple::UnknownVendor);
TT.setOS(llvm::Triple::UnknownOS);
TT.setEnvironment(llvm::Triple::SYCLDevice);
return TT;
}
return llvm::Triple(TargetArch);
Expand Down Expand Up @@ -2759,7 +2770,6 @@ bool hasFPGABinary(Compilation &C, std::string Object, types::ID Type) {
TT.setArchName(types::getTypeName(Type));
TT.setVendorName("intel");
TT.setOS(llvm::Triple::UnknownOS);
TT.setEnvironment(llvm::Triple::SYCLDevice);

// Checking uses -check-section option with the input file, no output
// file and the target triple being looked for.
Expand Down Expand Up @@ -7467,7 +7477,6 @@ const ToolChain &Driver::getToolChain(const ArgList &Args,
break;
case llvm::Triple::MSVC:
case llvm::Triple::UnknownEnvironment:
case llvm::Triple::SYCLDevice:
if (Args.getLastArgValue(options::OPT_fuse_ld_EQ)
.startswith_insensitive("bfd"))
TC = std::make_unique<toolchains::CrossWindowsToolChain>(
Expand Down
18 changes: 8 additions & 10 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7627,9 +7627,9 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
bool *EmitCodeView) const {
unsigned RTOptionID = options::OPT__SLASH_MT;
bool isNVPTX = getToolChain().getTriple().isNVPTX();
bool isSYCLDevice =
getToolChain().getTriple().getEnvironment() == llvm::Triple::SYCLDevice;
bool isSYCL = Args.hasArg(options::OPT_fsycl) || isSYCLDevice;
bool isSPIR = getToolChain().getTriple().isSPIR();
// FIXME: isSYCL should not be enabled by "isSPIR"
bool isSYCL = Args.hasArg(options::OPT_fsycl) || isSPIR;
// For SYCL Windows, /MD is the default.
if (isSYCL)
RTOptionID = options::OPT__SLASH_MD;
Expand All @@ -7641,7 +7641,7 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,

if (Arg *A = Args.getLastArg(options::OPT__SLASH_M_Group)) {
RTOptionID = A->getOption().getID();
if (isSYCL && !isSYCLDevice &&
if (isSYCL && !isSPIR &&
(RTOptionID == options::OPT__SLASH_MT ||
RTOptionID == options::OPT__SLASH_MTd))
// Use of /MT or /MTd is not supported for SYCL.
Expand All @@ -7653,9 +7653,9 @@ void Clang::AddClangCLArgs(const ArgList &Args, types::ID InputType,
auto addPreDefines = [&](unsigned Defines) {
if (Defines & addDEBUG)
CmdArgs.push_back("-D_DEBUG");
if (Defines & addMT && !isSYCLDevice)
if (Defines & addMT && !isSPIR)
CmdArgs.push_back("-D_MT");
if (Defines & addDLL && !isSYCLDevice)
if (Defines & addDLL && !isSPIR)
CmdArgs.push_back("-D_DLL");
};
StringRef FlagForCRT;
Expand Down Expand Up @@ -8346,7 +8346,6 @@ void OffloadBundler::ConstructJobMultipleOutputs(
TT.setArchName(types::getTypeName(InputType));
TT.setVendorName("intel");
TT.setOS(getToolChain().getTriple().getOS());
TT.setEnvironment(llvm::Triple::SYCLDevice);
Triples += "sycl-";
Triples += TT.normalize();
continue;
Expand Down Expand Up @@ -8462,7 +8461,7 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
llvm::Triple TT = getToolChain().getTriple();
SmallString<128> TargetTripleOpt = TT.getArchName();
// When wrapping an FPGA device binary, we need to be sure to apply the
// appropriate triple that corresponds (fpga_aoc[xr]-intel-<os>-sycldevice)
// appropriate triple that corresponds (fpga_aoc[xr]-intel-<os>)
// to the target triple setting.
if (TT.getSubArch() == llvm::Triple::SPIRSubArch_fpga &&
TCArgs.hasArg(options::OPT_fsycl_link_EQ)) {
Expand All @@ -8474,7 +8473,6 @@ void OffloadWrapper::ConstructJob(Compilation &C, const JobAction &JA,
FPGAArch += "_emu";
TT.setArchName(FPGAArch);
TT.setVendorName("intel");
TT.setEnvironment(llvm::Triple::SYCLDevice);
TargetTripleOpt = TT.str();
// When wrapping an FPGA aocx binary to archive, do not emit registration
// functions
Expand Down Expand Up @@ -8724,7 +8722,7 @@ void SPIRVTranslator::ConstructJob(Compilation &C, const JobAction &JA,

TranslatorArgs.push_back("-o");
TranslatorArgs.push_back(Output.getFilename());
if (getToolChain().getTriple().isSYCLDeviceEnvironment()) {
if (JA.isDeviceOffloading(Action::OFK_SYCL)) {
TranslatorArgs.push_back("-spirv-max-version=1.3");
// TODO: align debug info for FPGA H/W when its SPIR-V consumer is ready
if (C.getDriver().isFPGAEmulationMode())
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Driver/ToolChains/Linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ static StringRef getOSLibDir(const llvm::Triple &Triple, const ArgList &Args) {

Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
: Generic_ELF(D, Triple, Args) {
// for SYCL device targets, we rely on the host GCC for proper compilation
if (Triple.getEnvironment() == llvm::Triple::SYCLDevice) {
// For SPIR device target, we rely on the host GCC for proper compilation.
if (Triple.isSPIR()) {
GCCInstallation.init(llvm::Triple(llvm::sys::getProcessTriple()), Args);
} else {
GCCInstallation.init(Triple, Args);
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/accessor-readonly-invalid-lib.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -triple spir64-unknown-unknown -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
//
// Test which verifies that readonly attribute is generated for unexpected access mode value.

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/accessor-readonly.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple spir64-unknown-unknown-sycldevice -fsycl-is-device -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -triple spir64-unknown-unknown -fsycl-is-device -emit-llvm %s -o - | FileCheck %s

// Test to check that readonly attribute is applied to accessors with access mode read.

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/accessor_inheritance.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s
#include "Inputs/sycl.hpp"

struct Base {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/accessor_no_alias_property.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -emit-llvm %s -o - | FileCheck %s

// This test validates the behaviour of noalias parameter attribute.

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/address-space-cond-op.cpp
Original file line number Diff line number Diff line change
@@ -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-is-device -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -x c++ -triple spir64-unknown-linux -disable-llvm-passes -fsycl-is-device -emit-llvm %s -o - | FileCheck %s

struct S {
unsigned short x;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/address-space-initializer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice \
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown \
// RUN: -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s

// This test checks that data for big constant initializer lists is placed
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/address-space-new.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s

struct SpaceWaster {
int i, j;
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/address-space-of-returns.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -triple spir64-unknown-linux-sycldevice -fsycl-is-device -disable-llvm-passes -emit-llvm -x c++ %s -o - | FileCheck %s
// RUN: %clang_cc1 -triple spir64-unknown-linux -fsycl-is-device -disable-llvm-passes -emit-llvm -x c++ %s -o - | FileCheck %s

struct A {
int B[42];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -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) {}
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/anonymous_integration_footer.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -std=c++17 -triple spir64-unknown-unknown-sycldevice -fsycl-int-footer=%t.h %s -emit-llvm -o %t.ll
// RUN: %clang_cc1 -fsycl-is-device -std=c++17 -triple spir64-unknown-unknown -fsycl-int-footer=%t.h %s -emit-llvm -o %t.ll
// RUN: FileCheck -input-file=%t.h %s
// A test that validates the more complex cases of the specialization-constant
// integration footer details, basically any situation we can come up with that
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/anonymous_integration_footer2.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -std=c++17 -triple spir64-unknown-unknown-sycldevice -fsycl-int-footer=%t.h %s -emit-llvm -o %t.ll
// RUN: %clang_cc1 -fsycl-is-device -std=c++17 -triple spir64-unknown-unknown -fsycl-int-footer=%t.h %s -emit-llvm -o %t.ll
// RUN: FileCheck -input-file=%t.h %s
// A test that validates the more complex cases of the specialization-constant
// integration footer details, basically any situation we can come up with that
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/basic-kernel-wrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s

// This test checks that compiler generates correct kernel wrapper for basic
// case.
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/buffer_location.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -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}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -sycl-std=2020 -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown -disable-llvm-passes -sycl-std=2020 -emit-llvm -o - %s | FileCheck %s

// Tests for IR of [[intel::scheduler_target_fmax_mhz()]], [[intel::num_simd_work_items()]],
// [[intel::no_global_work_offset()]], [[intel::max_global_work_dim()]], [[sycl::reqd_sub_group_size()]],
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/const-wg-init.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s

#include "Inputs/sycl.hpp"

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/device-functions.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s

template <typename T>
T bar(T arg);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s

void helper() {}

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/device-variables.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s

enum class test_type { value1, value2, value3 };

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/disable_loop_pipelining.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -sycl-std=2020 -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -triple spir64-unknown-unknown -disable-llvm-passes -sycl-std=2020 -emit-llvm -o - %s | FileCheck %s

#include "sycl.hpp"

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/emit-all-decls-crash.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -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 -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'.
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/emit-kernel-in-virtual-func.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -emit-llvm %s -o - | FileCheck %s

template <typename name, typename Func>
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {
Expand Down
2 changes: 1 addition & 1 deletion clang/test/CodeGenSYCL/emit-kernel-in-virtual-func2.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown-sycldevice -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -emit-llvm %s -o - | FileCheck %s

template <typename name, typename Func>
__attribute__((sycl_kernel)) void kernel_single_task(const Func &kernelFunc) {
Expand Down
Loading