blob: 940828b82b3340c1a14bd348e3fcc3dbb8890432 [file] [log] [blame]
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +00001///
2/// Perform several driver tests for OpenMP offloading
3///
4
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +00005// REQUIRES: clang-driver
6// REQUIRES: x86-registered-target
7// REQUIRES: powerpc-registered-target
8// REQUIRES: nvptx-registered-target
9
10/// ###########################################################################
11
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +000012/// Check -Xopenmp-target uses one of the archs provided when several archs are used.
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000013// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
14// RUN: -Xopenmp-target -march=sm_35 -Xopenmp-target -march=sm_60 %s 2>&1 \
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +000015// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-ARCHS %s
16
17// CHK-FOPENMP-TARGET-ARCHS: ptxas{{.*}}" "--gpu-name" "sm_60"
18// CHK-FOPENMP-TARGET-ARCHS: nvlink{{.*}}" "-arch" "sm_60"
19
20/// ###########################################################################
21
22/// Check -Xopenmp-target -march=sm_35 works as expected when two triples are present.
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000023// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp \
24// RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu,nvptx64-nvidia-cuda \
25// RUN: -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_35 %s 2>&1 \
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +000026// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-COMPILATION %s
27
28// CHK-FOPENMP-TARGET-COMPILATION: ptxas{{.*}}" "--gpu-name" "sm_35"
29// CHK-FOPENMP-TARGET-COMPILATION: nvlink{{.*}}" "-arch" "sm_35"
30
31/// ###########################################################################
32
Jonas Hahnfelda981f672018-09-27 16:12:32 +000033/// Check that -lomptarget-nvptx is passed to nvlink.
34// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp \
35// RUN: -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \
36// RUN: | FileCheck -check-prefix=CHK-NVLINK %s
37/// Check that the value of --libomptarget-nvptx-path is forwarded to nvlink.
38// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp \
39// RUN: --libomptarget-nvptx-path=/path/to/libomptarget/ \
40// RUN: -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \
41// RUN: | FileCheck -check-prefixes=CHK-NVLINK,CHK-LIBOMPTARGET-NVPTX-PATH %s
42
43// CHK-NVLINK: nvlink
44// CHK-LIBOMPTARGET-NVPTX-PATH-SAME: "-L/path/to/libomptarget/"
45// CHK-NVLINK-SAME: "-lomptarget-nvptx"
46
47/// ###########################################################################
48
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +000049/// Check cubin file generation and usage by nvlink
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000050// RUN: %clang -### -no-canonical-prefixes -target powerpc64le-unknown-linux-gnu -fopenmp=libomp \
51// RUN: -fopenmp-targets=nvptx64-nvidia-cuda -save-temps %s 2>&1 \
52// RUN: | FileCheck -check-prefix=CHK-CUBIN-NVLINK %s
53/// Check cubin file generation and usage by nvlink when toolchain has BindArchAction
54// RUN: %clang -### -no-canonical-prefixes -target x86_64-apple-darwin17.0.0 -fopenmp=libomp \
55// RUN: -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \
56// RUN: | FileCheck -check-prefix=CHK-CUBIN-NVLINK %s
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +000057
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000058// CHK-CUBIN-NVLINK: clang{{.*}}" "-o" "[[PTX:.*\.s]]"
59// CHK-CUBIN-NVLINK-NEXT: ptxas{{.*}}" "--output-file" "[[CUBIN:.*\.cubin]]" {{.*}}"[[PTX]]"
60// CHK-CUBIN-NVLINK-NEXT: nvlink{{.*}}" {{.*}}"[[CUBIN]]"
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +000061
62/// ###########################################################################
63
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000064/// Check unbundlink of assembly file, cubin file generation and usage by nvlink
65// RUN: touch %t.s
Jonas Hahnfeld4609b252017-11-21 15:06:28 +000066// RUN: %clang -### -target powerpc64le-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
67// RUN: -no-canonical-prefixes -save-temps %t.s 2>&1 \
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000068// RUN: | FileCheck -check-prefix=CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK %s
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +000069
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000070/// Use DAG to ensure that assembly file has been unbundled.
71// CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK-DAG: ptxas{{.*}}" "--output-file" "[[CUBIN:.*\.cubin]]" {{.*}}"[[PTX:.*\.s]]"
72// CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK-DAG: clang-offload-bundler{{.*}}" "-type=s" {{.*}}"-outputs={{.*}}[[PTX]]
73// CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK-DAG-SAME: "-unbundle"
74// CHK-UNBUNDLING-PTXAS-CUBIN-NVLINK: nvlink{{.*}}" {{.*}}"[[CUBIN]]"
75
76/// ###########################################################################
77
78/// Check cubin file generation and bundling
Jonas Hahnfeld4609b252017-11-21 15:06:28 +000079// RUN: %clang -### -target powerpc64le-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
80// RUN: -no-canonical-prefixes -save-temps %s -c 2>&1 \
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000081// RUN: | FileCheck -check-prefix=CHK-PTXAS-CUBIN-BUNDLING %s
82
83// CHK-PTXAS-CUBIN-BUNDLING: clang{{.*}}" "-o" "[[PTX:.*\.s]]"
84// CHK-PTXAS-CUBIN-BUNDLING-NEXT: ptxas{{.*}}" "--output-file" "[[CUBIN:.*\.cubin]]" {{.*}}"[[PTX]]"
85// CHK-PTXAS-CUBIN-BUNDLING: clang-offload-bundler{{.*}}" "-type=o" {{.*}}"-inputs={{.*}}[[CUBIN]]
86
87/// ###########################################################################
88
89/// Check cubin file unbundling and usage by nvlink
90// RUN: touch %t.o
Jonas Hahnfeld4609b252017-11-21 15:06:28 +000091// RUN: %clang -### -target powerpc64le-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
Alexey Bataeva5178f52018-09-28 16:17:59 +000092// RUN: -no-canonical-prefixes -save-temps %t.o %S/Inputs/in.so 2>&1 \
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000093// RUN: | FileCheck -check-prefix=CHK-CUBIN-UNBUNDLING-NVLINK %s
94
95/// Use DAG to ensure that cubin file has been unbundled.
Alexey Bataeva5178f52018-09-28 16:17:59 +000096// CHK-CUBIN-UNBUNDLING-NVLINK-NOT: clang-offload-bundler{{.*}}" "-type=o"{{.*}}in.so
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +000097// CHK-CUBIN-UNBUNDLING-NVLINK-DAG: nvlink{{.*}}" {{.*}}"[[CUBIN:.*\.cubin]]"
98// CHK-CUBIN-UNBUNDLING-NVLINK-DAG: clang-offload-bundler{{.*}}" "-type=o" {{.*}}"-outputs={{.*}}[[CUBIN]]
99// CHK-CUBIN-UNBUNDLING-NVLINK-DAG-SAME: "-unbundle"
Alexey Bataeva5178f52018-09-28 16:17:59 +0000100// CHK-CUBIN-UNBUNDLING-NVLINK-NOT: clang-offload-bundler{{.*}}" "-type=o"{{.*}}in.so
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +0000101
102/// ###########################################################################
103
104/// Check cubin file generation and usage by nvlink
105// RUN: touch %t1.o
106// RUN: touch %t2.o
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +0000107// RUN: %clang -### -no-canonical-prefixes -target powerpc64le-unknown-linux-gnu -fopenmp=libomp \
108// RUN: -fopenmp-targets=nvptx64-nvidia-cuda %t1.o %t2.o 2>&1 \
109// RUN: | FileCheck -check-prefix=CHK-TWOCUBIN %s
110/// Check cubin file generation and usage by nvlink when toolchain has BindArchAction
111// RUN: %clang -### -no-canonical-prefixes -target x86_64-apple-darwin17.0.0 -fopenmp=libomp \
112// RUN: -fopenmp-targets=nvptx64-nvidia-cuda %t1.o %t2.o 2>&1 \
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +0000113// RUN: | FileCheck -check-prefix=CHK-TWOCUBIN %s
114
Gheorghe-Teodor Bercea5636f4b2017-09-25 21:25:38 +0000115// CHK-TWOCUBIN: nvlink{{.*}}openmp-offload-{{.*}}.cubin" "{{.*}}openmp-offload-{{.*}}.cubin"
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +0000116
117/// ###########################################################################
118
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +0000119/// Check PTXAS is passed -c flag when offloading to an NVIDIA device using OpenMP.
120// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -no-canonical-prefixes %s 2>&1 \
121// RUN: | FileCheck -check-prefix=CHK-PTXAS-DEFAULT %s
122
123// CHK-PTXAS-DEFAULT: ptxas{{.*}}" "-c"
124
125/// ###########################################################################
126
127/// PTXAS is passed -c flag by default when offloading to an NVIDIA device using OpenMP - disable it.
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +0000128// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fnoopenmp-relocatable-target \
129// RUN: -save-temps -no-canonical-prefixes %s 2>&1 \
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +0000130// RUN: | FileCheck -check-prefix=CHK-PTXAS-NORELO %s
131
132// CHK-PTXAS-NORELO-NOT: ptxas{{.*}}" "-c"
133
134/// ###########################################################################
135
136/// PTXAS is passed -c flag by default when offloading to an NVIDIA device using OpenMP
137/// Check that the flag is passed when -fopenmp-relocatable-target is used.
Jonas Hahnfeld7c78cc52017-11-21 14:44:45 +0000138// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-relocatable-target \
139// RUN: -save-temps -no-canonical-prefixes %s 2>&1 \
Gheorghe-Teodor Bercea9c525742017-08-11 15:46:22 +0000140// RUN: | FileCheck -check-prefix=CHK-PTXAS-RELO %s
141
142// CHK-PTXAS-RELO: ptxas{{.*}}" "-c"
Gheorghe-Teodor Bercea20789a52017-09-25 21:56:32 +0000143
144/// ###########################################################################
145
146/// Check that error is not thrown by toolchain when no cuda lib flag is used.
147/// Check that the flag is passed when -fopenmp-relocatable-target is used.
148// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 \
149// RUN: -nocudalib -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
150// RUN: | FileCheck -check-prefix=CHK-FLAG-NOLIBDEVICE %s
151
152// CHK-FLAG-NOLIBDEVICE-NOT: error:{{.*}}sm_60
Gheorghe-Teodor Bercea5a3608c2017-09-26 15:36:20 +0000153
154/// ###########################################################################
155
156/// Check that error is not thrown by toolchain when no cuda lib device is found when using -S.
157/// Check that the flag is passed when -fopenmp-relocatable-target is used.
158// RUN: %clang -### -S -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 \
159// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
160// RUN: | FileCheck -check-prefix=CHK-NOLIBDEVICE %s
161
162// CHK-NOLIBDEVICE-NOT: error:{{.*}}sm_60
Gheorghe-Teodor Bercea0d5aa842018-03-13 23:19:52 +0000163
164/// ###########################################################################
165
166/// Check that the runtime bitcode library is part of the compile line. Create a bogus
167/// bitcode library and add it to the LIBRARY_PATH.
168// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
169// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
170// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
171// RUN: | FileCheck -check-prefix=CHK-BCLIB %s
Jonas Hahnfelda981f672018-09-27 16:12:32 +0000172/// The user can override default detection using --libomptarget-nvptx-path=.
173// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda --libomptarget-nvptx-path=%S/Inputs/libomptarget \
174// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
175// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
176// RUN: | FileCheck -check-prefix=CHK-BCLIB %s
Gheorghe-Teodor Bercea0d5aa842018-03-13 23:19:52 +0000177
Matt Arsenaulta13746b2018-08-20 18:16:48 +0000178// CHK-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-sm_20.bc
Gheorghe-Teodor Bercea0d5aa842018-03-13 23:19:52 +0000179// CHK-BCLIB-NOT: {{error:|warning:}}
180
181/// ###########################################################################
182
183/// Check that the warning is thrown when the libomptarget bitcode library is not found.
184/// Libomptarget requires sm_35 or newer so an sm_20 bitcode library should never exist.
185// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
186// RUN: -Xopenmp-target -march=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda \
187// RUN: -fopenmp-relocatable-target -save-temps -no-canonical-prefixes %s 2>&1 \
188// RUN: | FileCheck -check-prefix=CHK-BCLIB-WARN %s
189
190// CHK-BCLIB-WARN: No library 'libomptarget-nvptx-sm_20.bc' found in the default clang lib directory or in LIBRARY_PATH. Expect degraded performance due to no inlining of runtime functions on target devices.
Alexey Bataeve36c67b2018-04-18 16:31:09 +0000191
192/// Check that debug info is emitted in dwarf-2
193// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O0 --no-cuda-noopt-device-debug 2>&1 \
194// RUN: | FileCheck -check-prefix=NO_DEBUG %s
195// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 2>&1 \
196// RUN: | FileCheck -check-prefix=NO_DEBUG %s
197// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 --no-cuda-noopt-device-debug 2>&1 \
198// RUN: | FileCheck -check-prefix=NO_DEBUG %s
199// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g0 2>&1 \
200// RUN: | FileCheck -check-prefix=NO_DEBUG %s
201// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb0 -O3 --cuda-noopt-device-debug 2>&1 \
202// RUN: | FileCheck -check-prefix=NO_DEBUG %s
203// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -gline-tables-only 2>&1 \
204// RUN: | FileCheck -check-prefix=NO_DEBUG -check-prefix=LINE_TABLE %s
205// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb1 -O2 --cuda-noopt-device-debug 2>&1 \
206// RUN: | FileCheck -check-prefix=NO_DEBUG -check-prefix=LINE_TABLE %s
207
Alexey Bataevb83b4e42018-07-27 19:45:14 +0000208// LINE_TABLE-NOT: warning: debug
209// NO_DEBUG-NOT: warning: debug
Alexey Bataeve36c67b2018-04-18 16:31:09 +0000210// NO_DEBUG: ptxas
211// LINE_TABLE: "-lineinfo"
212// NO_DEBUG-NOT: "-g"
213// NO_DEBUG: nvlink
214// NO_DEBUG-NOT: "-g"
215
216// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g 2>&1 \
217// RUN: | FileCheck -check-prefix=HAS_DEBUG %s
218// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O0 --cuda-noopt-device-debug 2>&1 \
219// RUN: | FileCheck -check-prefix=HAS_DEBUG %s
220// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 --cuda-noopt-device-debug 2>&1 \
221// RUN: | FileCheck -check-prefix=HAS_DEBUG %s
222// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g2 2>&1 \
223// RUN: | FileCheck -check-prefix=HAS_DEBUG %s
224// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb2 -O0 --cuda-noopt-device-debug 2>&1 \
225// RUN: | FileCheck -check-prefix=HAS_DEBUG %s
226// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g3 -O3 --cuda-noopt-device-debug 2>&1 \
227// RUN: | FileCheck -check-prefix=HAS_DEBUG %s
228// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb3 -O2 --cuda-noopt-device-debug 2>&1 \
229// RUN: | FileCheck -check-prefix=HAS_DEBUG %s
230
Alexey Bataevb83b4e42018-07-27 19:45:14 +0000231// HAS_DEBUG-NOT: warning: debug
Alexey Bataeve36c67b2018-04-18 16:31:09 +0000232// HAS_DEBUG: "-triple" "nvptx64-nvidia-cuda"
233// HAS_DEBUG-SAME: "-dwarf-version=2"
234// HAS_DEBUG-SAME: "-fopenmp-is-device"
235// HAS_DEBUG: ptxas
236// HAS_DEBUG-SAME: "-g"
237// HAS_DEBUG-SAME: "--dont-merge-basicblocks"
238// HAS_DEBUG-SAME: "--return-at-end"
239// HAS_DEBUG: nvlink
240// HAS_DEBUG-SAME: "-g"
241
Alexey Bataev80a9a612018-08-30 14:45:24 +0000242// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-mode 2>&1 \
243// RUN: | FileCheck -check-prefix=CUDA_MODE %s
244// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-mode -fopenmp-cuda-mode 2>&1 \
245// RUN: | FileCheck -check-prefix=CUDA_MODE %s
246// CUDA_MODE: clang{{.*}}"-cc1"{{.*}}"-triple" "nvptx64-nvidia-cuda"
247// CUDA_MODE-SAME: "-fopenmp-cuda-mode"
248// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-mode 2>&1 \
249// RUN: | FileCheck -check-prefix=NO_CUDA_MODE %s
250// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-mode -fno-openmp-cuda-mode 2>&1 \
251// RUN: | FileCheck -check-prefix=NO_CUDA_MODE %s
252// NO_CUDA_MODE-NOT: "-{{fno-|f}}openmp-cuda-mode"
253
254// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-force-full-runtime 2>&1 \
255// RUN: | FileCheck -check-prefix=FULL_RUNTIME %s
256// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-force-full-runtime -fopenmp-cuda-force-full-runtime 2>&1 \
257// RUN: | FileCheck -check-prefix=FULL_RUNTIME %s
258// FULL_RUNTIME: clang{{.*}}"-cc1"{{.*}}"-triple" "nvptx64-nvidia-cuda"
259// FULL_RUNTIME-SAME: "-fopenmp-cuda-force-full-runtime"
260// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-force-full-runtime 2>&1 \
261// RUN: | FileCheck -check-prefix=NO_FULL_RUNTIME %s
262// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-force-full-runtime -fno-openmp-cuda-force-full-runtime 2>&1 \
263// RUN: | FileCheck -check-prefix=NO_FULL_RUNTIME %s
264// NO_FULL_RUNTIME-NOT: "-{{fno-|f}}openmp-cuda-force-full-runtime"