Skip to content

Commit 8e58b19

Browse files
committed
Add test for compiler phases w/ and w/o integration footer
1 parent d5765f4 commit 8e58b19

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

clang/test/Driver/sycl-int-footer.cpp

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,36 @@
3030
// RUN: | FileCheck -check-prefix NO-FOOTER --implicit-check-not "-fsycl-int-footer" %s
3131
// NO-FOOTER: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INTHEADER:.+\.h]]" "-sycl-std={{.*}}"
3232
// NO-FOOTER: clang{{.*}} "-include" "[[INTHEADER]]"{{.*}} "-fsycl-is-host"{{.*}} "-o"
33+
34+
/// Check phases without integration footer
35+
// RUN: %clangxx -fsycl -fno-sycl-device-lib=all -fno-sycl-use-footer %s -ccc-print-phases 2>&1 \
36+
// RUN: | FileCheck -check-prefix NO-FOOTER-PHASES -check-prefix COMMON-PHASES %s
37+
// NO-FOOTER-PHASES: 0: input, "{{.*}}", c++, (host-sycl)
38+
// NO-FOOTER-PHASES: [[#HOST_PREPROC:]]: preprocessor, {0}, c++-cpp-output, (host-sycl)
39+
// NO-FOOTER-PHASES: 2: input, "{{.*}}", c++, (device-sycl)
40+
// NO-FOOTER-PHASES: 3: preprocessor, {2}, c++-cpp-output, (device-sycl)
41+
// NO-FOOTER-PHASES: [[#DEVICE_IR:]]: compiler, {3}, ir, (device-sycl)
42+
43+
/// Check phases with integration footer
44+
// RUN: %clangxx -fsycl -fno-sycl-device-lib=all %s -ccc-print-phases 2>&1 \
45+
// RUN: | FileCheck -check-prefix FOOTER-PHASES -check-prefix COMMON-PHASES %s
46+
// FOOTER-PHASES: 0: input, "{{.*}}", c++, (host-sycl)
47+
// FOOTER-PHASES: 1: preprocessor, {0}, c++-cpp-output, (host-sycl)
48+
// FOOTER-PHASES: 2: append-footer, {1}, c++, (host-sycl)
49+
// FOOTER-PHASES: [[#HOST_PREPROC:]]: preprocessor, {2}, c++-cpp-output, (host-sycl)
50+
// FOOTER-PHASES: 4: input, "{{.*}}", c++, (device-sycl)
51+
// FOOTER-PHASES: 5: preprocessor, {4}, c++-cpp-output, (device-sycl)
52+
// FOOTER-PHASES: [[#DEVICE_IR:]]: compiler, {5}, ir, (device-sycl)
53+
54+
// COMMON-PHASES: [[#OFFLOAD:]]: offload, "host-sycl (x86_64-unknown-linux-gnu)" {[[#HOST_PREPROC]]}, "device-sycl (spir64-unknown-unknown-sycldevice)" {[[#DEVICE_IR]]}, c++-cpp-output
55+
// COMMON-PHASES: [[#OFFLOAD+1]]: compiler, {[[#OFFLOAD]]}, ir, (host-sycl)
56+
// COMMON-PHASES: [[#OFFLOAD+2]]: backend, {[[#OFFLOAD+1]]}, assembler, (host-sycl)
57+
// COMMON-PHASES: [[#OFFLOAD+3]]: assembler, {[[#OFFLOAD+2]]}, object, (host-sycl)
58+
// COMMON-PHASES: [[#OFFLOAD+4]]: linker, {[[#OFFLOAD+3]]}, image, (host-sycl)
59+
// COMMON-PHASES: [[#OFFLOAD+5]]: linker, {[[#DEVICE_IR]]}, ir, (device-sycl)
60+
// COMMON-PHASES: [[#OFFLOAD+6]]: sycl-post-link, {[[#OFFLOAD+5]]}, tempfiletable, (device-sycl)
61+
// COMMON-PHASES: [[#OFFLOAD+7]]: file-table-tform, {[[#OFFLOAD+6]]}, tempfilelist, (device-sycl)
62+
// COMMON-PHASES: [[#OFFLOAD+8]]: llvm-spirv, {[[#OFFLOAD+7]]}, tempfilelist, (device-sycl)
63+
// COMMON-PHASES: [[#OFFLOAD+9]]: file-table-tform, {[[#OFFLOAD+6]], [[#OFFLOAD+8]]}, tempfiletable, (device-sycl)
64+
// COMMON-PHASES: [[#OFFLOAD+10]]: clang-offload-wrapper, {[[#OFFLOAD+9]]}, object, (device-sycl)
65+
// COMMON-PHASES: [[#OFFLOAD+11]]: offload, "host-sycl (x86_64-unknown-linux-gnu)" {[[#OFFLOAD+4]]}, "device-sycl (spir64-unknown-unknown-sycldevice)" {[[#OFFLOAD+10]]}, image

0 commit comments

Comments
 (0)