Skip to content

Commit a884680

Browse files
committed
Update test to address review comments
1 parent e611f4c commit a884680

File tree

1 file changed

+26
-30
lines changed

1 file changed

+26
-30
lines changed

clang/test/Driver/sycl-offload-jit.cpp

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,29 @@
33
///
44

55
/// Check the phases graph with -fsycl. Use of -fsycl enables offload
6-
// RUN: %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu \
7-
// RUN: -fsycl %s 2>&1 \
8-
// RUN: | FileCheck -check-prefixes=CHK-PHASES %s
9-
// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl \
10-
// RUN: %s 2>&1 \
11-
// RUN: | FileCheck -check-prefixes=CHK-PHASES %s
6+
// RUN: %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu -fsycl %s 2>&1 \
7+
// RUN: | FileCheck -check-prefixes=CHK-PHASES %s
8+
// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl %s 2>&1 \
9+
// RUN: | FileCheck -check-prefixes=CHK-PHASES %s
1210
// CHK-PHASES: 0: input, "[[INPUT:.+\.cpp]]", c++, (host-sycl)
13-
// CHK-PHASES: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)
14-
// CHK-PHASES: 2: compiler, {1}, ir, (host-sycl)
15-
// CHK-PHASES: 3: input, "[[INPUT]]", c++, (device-sycl)
16-
// CHK-PHASES: 4: preprocessor, {3}, c++-cpp-output, (device-sycl)
17-
// CHK-PHASES: 5: compiler, {4}, ir, (device-sycl)
18-
// CHK-PHASES: 6: backend, {5}, ir, (device-sycl)
19-
// CHK-PHASES: 7: offload, "device-sycl (spirv64-unknown-unknown)" {6}, ir
20-
// CHK-PHASES: 8: clang-offload-packager, {7}, image, (device-sycl)
21-
// CHK-PHASES: 9: offload, "host-sycl (x86_64{{.*}})" {2}, "device-sycl (x86_64{{.*}})" {8}, ir
22-
// CHK-PHASES: 10: backend, {9}, assembler, (host-sycl)
23-
// CHK-PHASES: 11: assembler, {10}, object, (host-sycl)
24-
// CHK-PHASES: 12: clang-linker-wrapper, {11}, image, (host-sycl)
11+
// CHK-PHASES-NEXT: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)
12+
// CHK-PHASES-NEXT: 2: compiler, {1}, ir, (host-sycl)
13+
// CHK-PHASES-NEXT: 3: input, "[[INPUT]]", c++, (device-sycl)
14+
// CHK-PHASES-NEXT: 4: preprocessor, {3}, c++-cpp-output, (device-sycl)
15+
// CHK-PHASES-NEXT: 5: compiler, {4}, ir, (device-sycl)
16+
// CHK-PHASES-NEXT: 6: backend, {5}, ir, (device-sycl)
17+
// CHK-PHASES-NEXT: 7: offload, "device-sycl (spirv64-unknown-unknown)" {6}, ir
18+
// CHK-PHASES-NEXT: 8: clang-offload-packager, {7}, image, (device-sycl)
19+
// CHK-PHASES-NEXT: 9: offload, "host-sycl (x86_64{{.*}})" {2}, "device-sycl (x86_64{{.*}})" {8}, ir
20+
// CHK-PHASES-NEXT: 10: backend, {9}, assembler, (host-sycl)
21+
// CHK-PHASES-NEXT: 11: assembler, {10}, object, (host-sycl)
22+
// CHK-PHASES-NEXT: 12: clang-linker-wrapper, {11}, image, (host-sycl)
2523

2624
/// Check expected default values for device compilation when using -fsycl as
2725
/// well as clang-offload-packager inputs.
2826
// RUN: %clang -### -fsycl -c --target=x86_64-unknown-linux-gnu %s 2>&1 \
29-
// RUN: | FileCheck -check-prefix=CHK-DEVICE-TRIPLE %s
30-
// CHK-DEVICE-TRIPLE: clang{{.*}} "-triple" "spirv64-unknown-unknown"
27+
// RUN: | FileCheck -check-prefix=CHK-DEVICE-TRIPLE %s
28+
// CHK-DEVICE-TRIPLE: "-cc1"{{.*}} "-triple" "spirv64-unknown-unknown"
3129
// CHK-DEVICE-TRIPLE-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
3230
// CHK-DEVICE-TRIPLE-SAME: "-fsycl-is-device"
3331
// CHK-DEVICE-TRIPLE-SAME: "-O2"
@@ -36,21 +34,19 @@
3634
/// Check -fsycl-is-device is passed when compiling for the device.
3735
/// Check -fsycl-is-host is passed when compiling for host.
3836
// RUN: %clang -### -fsycl -c %s 2>&1 \
39-
// RUN: | FileCheck -check-prefixes=CHK-FSYCL-IS-DEVICE,CHK-FSYCL-IS-HOST %s
37+
// RUN: | FileCheck -check-prefixes=CHK-FSYCL-IS-DEVICE,CHK-FSYCL-IS-HOST %s
4038
// RUN: %clang -### -fsycl -fsycl-device-only %s 2>&1 \
41-
// RUN: | FileCheck -check-prefix=CHK-FSYCL-IS-DEVICE %s
39+
// RUN: | FileCheck -check-prefix=CHK-FSYCL-IS-DEVICE %s
4240
// RUN: %clang_cl -### -fsycl -c %s 2>&1 \
43-
// RUN: | FileCheck -check-prefixes=CHK-FSYCL-IS-DEVICE,CHK-FSYCL-IS-HOST %s
41+
// RUN: | FileCheck -check-prefixes=CHK-FSYCL-IS-DEVICE,CHK-FSYCL-IS-HOST %s
4442
// RUN: %clang -### -fsycl -fsycl-host-only %s 2>&1 \
45-
// RUN: | FileCheck -check-prefix=CHK-FSYCL-IS-HOST %s
46-
// CHK-FSYCL-IS-DEVICE: clang{{.*}} "-fsycl-is-device" {{.*}} "-emit-llvm-bc"
47-
// CHK-FSYCL-IS-HOST: clang{{.*}} "-fsycl-is-host"
43+
// RUN: | FileCheck -check-prefix=CHK-FSYCL-IS-HOST %s
44+
// CHK-FSYCL-IS-DEVICE: "-cc1"{{.*}} "-fsycl-is-device" {{.*}} "-emit-llvm-bc"
45+
// CHK-FSYCL-IS-HOST: "-cc1"{{.*}} "-fsycl-is-host"
4846

4947
/// Check for option incompatibility with -fsycl
5048
// RUN: not %clang -### -fsycl -ffreestanding %s 2>&1 \
51-
// RUN: | FileCheck -check-prefix=CHK-INCOMPATIBILITY %s \
52-
// RUN: -DINCOMPATOPT=-ffreestanding
49+
// RUN: | FileCheck -check-prefix=CHK-INCOMPATIBILITY %s -DINCOMPATOPT=-ffreestanding
5350
// RUN: not %clang -### -fsycl --offload-new-driver -static-libstdc++ %s 2>&1 \
54-
// RUN: | FileCheck -check-prefix=CHK-INCOMPATIBILITY %s \
55-
// RUN: -DINCOMPATOPT=-static-libstdc++
51+
// RUN: | FileCheck -check-prefix=CHK-INCOMPATIBILITY %s -DINCOMPATOPT=-static-libstdc++
5652
// CHK-INCOMPATIBILITY: error: invalid argument '[[INCOMPATOPT]]' not allowed with '-fsycl'

0 commit comments

Comments
 (0)