Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl-fsyclbin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@
/// case, so the driver emits an error and redirects users to
/// -fsyclbin=executable.
// RUN: not %clangxx -fsyclbin=object -fno-sycl-allow-device-image-dependencies \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: --offload-new-driver %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_DEPS_CONFLICT
// RUN: not %clangxx -fsyclbin=input -fno-sycl-allow-device-image-dependencies \
// RUN: --offload-new-driver --sysroot=%S/Inputs/SYCL %s -### 2>&1 \
// RUN: --offload-new-driver %s -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK_DEPS_CONFLICT
// CHECK_DEPS_CONFLICT: error: invalid argument '-fno-sycl-allow-device-image-dependencies' not allowed with '-fsyclbin={{input|object}}'

Expand Down
6 changes: 3 additions & 3 deletions clang/test/Driver/sycl-ftarget-register-alloc-mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@
// RUN: -ftarget-register-alloc-mode=pvc:small,pvc:large %s 2>&1 \
// RUN: | FileCheck -check-prefix=MULTIPLE_ARGS_JIT %s

// RUN: not %clang -### -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL \
// RUN: not %clang -### -fsycl --offload-new-driver \
// RUN: -fsycl-targets=spir64_gen -ftarget-register-alloc-mode=dg2:auto %s 2>&1 \
// RUN: | FileCheck -check-prefix=BAD_DEVICE %s

// RUN: not %clang -### -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL \
// RUN: not %clang -### -fsycl --offload-new-driver \
// RUN: -fsycl-targets=spir64_gen -ftarget-register-alloc-mode=pvc:superlarge %s 2>&1 \
// RUN: | FileCheck -check-prefix=BAD_MODE %s

// RUN: not %clang -### -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL \
// RUN: not %clang -### -fsycl --offload-new-driver \
// RUN: -fsycl-targets=spir64_gen -ftarget-register-alloc-mode=dg2:superlarge %s 2>&1 \
// RUN: | FileCheck -check-prefix=BAD_BOTH %s

Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl-host-compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
// HOST_OBJECT_CL: clang-offload-bundler{{.*}} "-input={{.*}}.bc" "-input=[[OBJOUT]]"

/// Missing argument error -fsycl-host-compiler=.
// RUN: not %clangxx -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-host-compiler= -c -### %s 2>&1 \
// RUN: not %clangxx -fsycl --offload-new-driver -fsycl-host-compiler= -c -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=HOST_COMPILER_NOARG %s
// HOST_COMPILER_NOARG: missing argument to '-fsycl-host-compiler='

/// Error for -fsycl-host-compiler and -fsycl-unnamed-lambda combination.
// RUN: not %clangxx -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-host-compiler=g++ -fsycl-unnamed-lambda -c -### %s 2>&1 \
// RUN: not %clangxx -fsycl --offload-new-driver -fsycl-host-compiler=g++ -fsycl-unnamed-lambda -c -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=HOST_COMPILER_AND_UNNAMED_LAMBDA %s
// HOST_COMPILER_AND_UNNAMED_LAMBDA: error: cannot specify '-fsycl-unnamed-lambda' along with '-fsycl-host-compiler'

Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-lto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// CHECK-ERROR: unsupported option '-foffload-lto=thin' for target 'spir64-unknown-unknown'

// Verify we error when using the new offload driver but with device code split set to off.
// RUN: not %clangxx -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -foffload-lto=thin -fsycl-device-code-split=off %s -### 2>&1 | FileCheck -check-prefix=CHECK-SPLIT-ERROR %s
// RUN: not %clangxx -fsycl --offload-new-driver -foffload-lto=thin -fsycl-device-code-split=off %s -### 2>&1 | FileCheck -check-prefix=CHECK-SPLIT-ERROR %s
// CHECK-SPLIT-ERROR: '-fsycl-device-code-split=off' is not supported when '-foffload-lto=thin' is set with '-fsycl'

// Verify there's no error and we see the expected cc1 flags and tool invocations with the new offload driver.
Expand Down
4 changes: 2 additions & 2 deletions clang/test/Driver/sycl-offload-arch-intel-cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@

// Tests for handling a incorrect architecture.
//
// RUN: not %clangxx --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl --offload-arch=badArch %s -### 2>&1 \
// RUN: not %clangxx --offload-new-driver -fsycl --offload-arch=badArch %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=BAD-ARCH %s
// RUN: not %clang_cl --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL -fsycl --offload-arch=badArch %s -### 2>&1 \
// RUN: not %clang_cl --offload-new-driver -fsycl --offload-arch=badArch %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=BAD-ARCH %s

// BAD-ARCH: error: unsupported offload gpu architecture: badArch
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-offload-jit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
// CHK-NO-SPLIT-NOT: --module-split-mode=

/// Check an invalid -fsycl-device-image-split= value is diagnosed.
// RUN: not %clang --offload-new-driver --sysroot=%S/Inputs/SYCL -### --target=x86_64-unknown-linux-gnu -fsycl -fsycl-device-image-split=bogus %s 2>&1 \
// RUN: not %clang --offload-new-driver -### --target=x86_64-unknown-linux-gnu -fsycl -fsycl-device-image-split=bogus %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-SPLIT-INVALID %s
// CHK-SPLIT-INVALID: error: invalid value 'bogus' in '-fsycl-device-image-split='

Expand Down
24 changes: 12 additions & 12 deletions clang/test/Driver/sycl-offload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
/// ###########################################################################

/// Check whether an invalid SYCL target is specified:
// RUN: not %clang -### -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=aaa-bbb-ccc-ddd %s 2>&1 \
// RUN: not %clang -### -fsycl --offload-new-driver -fsycl-targets=aaa-bbb-ccc-ddd %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-INVALID-TARGET %s
// RUN: not %clang_cl -### -fsycl --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL -fsycl-targets=aaa-bbb-ccc-ddd %s 2>&1 \
// RUN: not %clang_cl -### -fsycl --offload-new-driver -fsycl-targets=aaa-bbb-ccc-ddd %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-INVALID-TARGET %s
// CHK-INVALID-TARGET: error: invalid or unsupported offload target: 'aaa-bbb-ccc-ddd'

/// ###########################################################################

/// Check whether an invalid SYCL target is specified:
// RUN: not %clang -### -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=x86_64 %s 2>&1 \
// RUN: not %clang -### -fsycl --offload-new-driver -fsycl-targets=x86_64 %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-INVALID-REAL-TARGET %s
// RUN: not %clang_cl -### -fsycl --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL -fsycl-targets=x86_64 %s 2>&1 \
// RUN: not %clang_cl -### -fsycl --offload-new-driver -fsycl-targets=x86_64 %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-INVALID-REAL-TARGET %s
// CHK-INVALID-REAL-TARGET: error: invalid or unsupported offload target: 'x86_64'

Expand Down Expand Up @@ -46,9 +46,9 @@
/// ###########################################################################

/// Validate SYCL option values
// RUN: not %clang -### -fsycl-device-code-split=bad_value -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: not %clang -### -fsycl-device-code-split=bad_value -fsycl --offload-new-driver %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-SYCL-BAD-OPT-VALUE -Doption=-fsycl-device-code-split %s
// RUN: not %clang -### -fsycl-link=bad_value -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL %s 2>&1 \
// RUN: not %clang -### -fsycl-link=bad_value -fsycl --offload-new-driver %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-SYCL-BAD-OPT-VALUE -Doption=-fsycl-link %s
// CHK-SYCL-BAD-OPT-VALUE: error: invalid argument 'bad_value' to [[option]]=

Expand Down Expand Up @@ -96,18 +96,18 @@
/// ###########################################################################

/// Check -Xsycl-target-frontend triggers error when multiple triples are used.
// RUN: not %clang -### -no-canonical-prefixes -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64-unknown-unknown,spir-unknown-linux -Xsycl-target-frontend -DFOO %s 2>&1 \
// RUN: not %clang -### -no-canonical-prefixes -fsycl --offload-new-driver -fsycl-targets=spir64-unknown-unknown,spir-unknown-linux -Xsycl-target-frontend -DFOO %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-FSYCL-COMPILER-AMBIGUOUS-ERROR %s
// RUN: not %clang_cl -### -no-canonical-prefixes -fsycl --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL -fsycl-targets=spir64-unknown-unknown,spir-unknown-linux -Xsycl-target-frontend -DFOO %s 2>&1 \
// RUN: not %clang_cl -### -no-canonical-prefixes -fsycl --offload-new-driver -fsycl-targets=spir64-unknown-unknown,spir-unknown-linux -Xsycl-target-frontend -DFOO %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-FSYCL-COMPILER-AMBIGUOUS-ERROR %s
// CHK-FSYCL-COMPILER-AMBIGUOUS-ERROR: clang{{.*}} error: cannot deduce implicit triple value for '-Xsycl-target-frontend', specify triple using '-Xsycl-target-frontend=<triple>'

/// ###########################################################################

/// Check -Xsycl-target-frontend triggers error when an option requiring arguments is passed to it.
// RUN: not %clang -### -no-canonical-prefixes -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64-unknown-unknown -Xsycl-target-frontend -Xsycl-target-frontend -mcpu=none %s 2>&1 \
// RUN: not %clang -### -no-canonical-prefixes -fsycl --offload-new-driver -fsycl-targets=spir64-unknown-unknown -Xsycl-target-frontend -Xsycl-target-frontend -mcpu=none %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-FSYCL-COMPILER-NESTED-ERROR %s
// RUN: not %clang_cl -### -no-canonical-prefixes -fsycl --offload-new-driver /clang:--sysroot=%S/Inputs/SYCL -fsycl-targets=spir64-unknown-unknown -Xsycl-target-frontend -Xsycl-target-frontend -mcpu=none %s 2>&1 \
// RUN: not %clang_cl -### -no-canonical-prefixes -fsycl --offload-new-driver -fsycl-targets=spir64-unknown-unknown -Xsycl-target-frontend -Xsycl-target-frontend -mcpu=none %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-FSYCL-COMPILER-NESTED-ERROR %s
// CHK-FSYCL-COMPILER-NESTED-ERROR: clang{{.*}} error: invalid -Xsycl-target-frontend argument: '-Xsycl-target-frontend -Xsycl-target-frontend', options requiring arguments are unsupported

Expand Down Expand Up @@ -548,9 +548,9 @@
// CHECK-HEADER-DIR-SAME: "-internal-isystem" "[[ROOT]]bin{{[/\\]+}}..{{[/\\]+}}include"

/// Check for option incompatibility with -fsycl
// RUN: not %clang -### -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -ffreestanding %s 2>&1 \
// RUN: not %clang -### -fsycl --offload-new-driver -ffreestanding %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-INCOMPATIBILITY %s -DINCOMPATOPT=-ffreestanding
// RUN: not %clang -### -fsycl --offload-new-driver --sysroot=%S/Inputs/SYCL -static-libstdc++ %s 2>&1 \
// RUN: not %clang -### -fsycl --offload-new-driver -static-libstdc++ %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHK-INCOMPATIBILITY %s -DINCOMPATOPT=-static-libstdc++
// CHK-INCOMPATIBILITY: error: invalid argument '[[INCOMPATOPT]]' not allowed with '-fsycl'

Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/sycl-option-ownership.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

// Compilation does validate the setting, exactly once. This also keeps the
// exact diagnostic text above in sync with the driver.
// RUN: not %clangxx --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/SYCL \
// RUN: not %clangxx --target=x86_64-unknown-linux-gnu \
// RUN: --offload-new-driver -fsycl -fsycl-targets=spir64 \
// RUN: -ftarget-register-alloc-mode=pvc:invalid \
// RUN: -### %s 2>&1 | FileCheck %s --check-prefix=INVALID_GRF
Expand Down
Loading