Skip to content

Commit dbe5e32

Browse files
authored
[SYCL][NFC] Set appropriate targets for SYCL mode tests when needed (#2750)
Some tests require updating to fix target architecture differences. The tests are expecting 64-bit targets, but under some conditions the default architecture would not match (e.g. running a 32-bit target compiler)
1 parent 9344c03 commit dbe5e32

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/test/Driver/sycl-offload-with-split.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
/// The same phase graph will be used with -fsycl-use-bitcode
1515
// RUN: %clang -ccc-print-phases -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split -fsycl-targets=spir64-unknown-unknown-sycldevice %s 2>&1 \
1616
// RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-DEFAULT-MODE %s
17-
// RUN: %clang_cl -ccc-print-phases -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-targets=spir64-unknown-unknown-sycldevice %s 2>&1 \
17+
// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-targets=spir64-unknown-unknown-sycldevice %s 2>&1 \
1818
// RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-CL-MODE %s
1919
// RUN: %clang -ccc-print-phases -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fno-sycl-use-bitcode %s 2>&1 \
2020
// RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-DEFAULT-MODE %s
21-
// RUN: %clang_cl -ccc-print-phases -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fno-sycl-use-bitcode %s 2>&1 \
21+
// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fno-sycl-use-bitcode %s 2>&1 \
2222
// RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-CL-MODE %s
2323
// RUN: %clang -ccc-print-phases -target x86_64-unknown-linux-gnu -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-use-bitcode %s 2>&1 \
2424
// RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-DEFAULT-MODE %s
25-
// RUN: %clang_cl -ccc-print-phases -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-use-bitcode %s 2>&1 \
25+
// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-use-bitcode %s 2>&1 \
2626
// RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-CL-MODE %s
2727
// CHK-PHASES: 0: input, "[[INPUT:.+\.c]]", c++, (host-sycl)
2828
// CHK-PHASES: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)

clang/test/Driver/sycl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
// HEADER_ORDER-NOT: clang{{.*}} "/usr/include"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include{{[/\\]+}}
7373

7474
/// Verify -fsycl-device-only phases
75-
// RUN: %clang -### -ccc-print-phases -fsycl-device-only %s 2>&1 | FileCheck %s --check-prefix=DEFAULT-PHASES
75+
// RUN: %clang -### -ccc-print-phases -target x86_64-unknown-linux-gnu -fsycl-device-only %s 2>&1 | FileCheck %s --check-prefix=DEFAULT-PHASES
7676
// DEFAULT-PHASES: 0: input, "{{.*}}", c++, (device-sycl)
7777
// DEFAULT-PHASES: 1: preprocessor, {0}, c++-cpp-output, (device-sycl)
7878
// DEFAULT-PHASES: 2: compiler, {1}, ir, (device-sycl)

0 commit comments

Comments
 (0)