[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / thinlto.cu
blobd4f265baf3708fe509e0717a47b03e1cd88ed441
1 // REQUIRES: x86-registered-target
2 // REQUIRES: nvptx-registered-target
4 // -flto=thin causes a switch to llvm-bc object files.
5 // RUN: %clangxx -ccc-print-phases -nocudainc -nocudalib -c %s -flto=thin 2> %t
6 // RUN: FileCheck -check-prefix=CHECK-COMPILE-ACTIONS < %t %s
7 //
8 // CHECK-COMPILE-ACTIONS: 2: compiler, {1}, ir, (host-cuda)
9 // CHECK-COMPILE-ACTIONS-NOT: lto-bc
10 // CHECK-COMPILE-ACTIONS: 12: backend, {11}, lto-bc, (host-cuda)
12 // RUN: %clangxx -ccc-print-phases -nocudainc -nocudalib %s -flto=thin 2> %t
13 // RUN: FileCheck -check-prefix=CHECK-COMPILELINK-ACTIONS < %t %s
15 // CHECK-COMPILELINK-ACTIONS: 0: input, "{{.*}}thinlto.cu", cuda, (host-cuda)
16 // CHECK-COMPILELINK-ACTIONS: 1: preprocessor, {0}, cuda-cpp-output
17 // CHECK-COMPILELINK-ACTIONS: 2: compiler, {1}, ir, (host-cuda)
18 // CHECK-COMPILELINK-ACTIONS: 3: input, "{{.*}}thinlto.cu", cuda, (device-cuda, sm_{{.*}})
19 // CHECK-COMPILELINK-ACTIONS: 4: preprocessor, {3}, cuda-cpp-output, (device-cuda, sm_{{.*}})
20 // CHECK-COMPILELINK-ACTIONS: 5: compiler, {4}, ir, (device-cuda, sm_{{.*}})
21 // CHECK-COMPILELINK-ACTIONS: 6: backend, {5}, assembler, (device-cuda, sm_{{.*}})
22 // CHECK-COMPILELINK-ACTIONS: 7: assembler, {6}, object, (device-cuda, sm_{{.*}})
23 // CHECK-COMPILELINK-ACTIONS: 8: offload, "device-cuda (nvptx{{.*}}-nvidia-cuda:sm_{{.*}})" {7}, object
24 // CHECK-COMPILELINK-ACTIONS: 9: offload, "device-cuda (nvptx{{.*}}-nvidia-cuda:sm_{{.*}})" {6}, assembler
25 // CHECK-COMPILELINK-ACTIONS: 10: linker, {8, 9}, cuda-fatbin, (device-cuda)
26 // CHECK-COMPILELINK-ACTIONS: 11: offload, "host-cuda {{.*}}" {2}, "device-cuda{{.*}}" {10}, ir
27 // CHECK-COMPILELINK-ACTIONS: 12: backend, {11}, lto-bc, (host-cuda)
28 // CHECK-COMPILELINK-ACTIONS: 13: linker, {12}, image, (host-cuda)