|
13 | 13 | /// The same phase graph will be used with -fsycl-device-obj=llvmir |
14 | 14 | // RUN: %clang -ccc-print-phases -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split -fsycl-targets=spir64-unknown-unknown %s 2>&1 \ |
15 | 15 | // RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-DEFAULT-MODE %s |
16 | | -// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-targets=spir64-unknown-unknown %s 2>&1 \ |
| 16 | +// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-targets=spir64-unknown-unknown -- %s 2>&1 \ |
17 | 17 | // RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-CL-MODE %s |
18 | 18 | // RUN: %clang -ccc-print-phases -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-device-obj=spirv %s 2>&1 \ |
19 | 19 | // RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-DEFAULT-MODE %s |
20 | | -// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-device-obj=spirv %s 2>&1 \ |
| 20 | +// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-device-obj=spirv -- %s 2>&1 \ |
21 | 21 | // RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-CL-MODE %s |
22 | 22 | // RUN: %clang -ccc-print-phases -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-device-obj=llvmir %s 2>&1 \ |
23 | 23 | // RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-DEFAULT-MODE %s |
24 | | -// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-device-obj=llvmir %s 2>&1 \ |
| 24 | +// RUN: %clang_cl -ccc-print-phases --target=x86_64-pc-windows-msvc -fsycl --no-offload-new-driver -fno-sycl-instrument-device-code -fno-sycl-device-lib=all -fsycl-device-code-split=per_source -fsycl-device-obj=llvmir -- %s 2>&1 \ |
25 | 25 | // RUN: | FileCheck -check-prefixes=CHK-PHASES,CHK-PHASES-CL-MODE %s |
26 | 26 | // CHK-PHASES: 0: input, "[[INPUT:.+\.c]]", c++, (host-sycl) |
27 | 27 | // CHK-PHASES: 1: preprocessor, {0}, c++-cpp-output, (host-sycl) |
|
199 | 199 | // CHK-TOOLS-AOT: clang{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-int-header=[[INPUT1:.+\-header.+\.h]]" "-fsycl-int-footer={{.*}}"{{.*}} "-o" "[[OUTPUT1:.+\.bc]]" |
200 | 200 | // CHK-TOOLS-AOT: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-o" "[[OUTPUT10:.+\.o]]" |
201 | 201 | // CHK-TOOLS-AOT: llvm-link{{.*}} "[[OUTPUT1]]" "-o" "[[OUTPUT2:.+\.bc]]" |
202 | | -// CHK-TOOLS-AOT: sycl-post-link{{.*}} "-split=auto"{{.*}} "-spec-const=emulation"{{.*}} "-o" "[[OUTPUT3:.+\.table]]" "[[OUTPUT2]]" |
| 202 | +// CHK-TOOLS-FPGA: sycl-post-link{{.*}} "-split=auto"{{.*}} "-spec-const=emulation"{{.*}} "-o" "[[OUTPUT3:.+\.table]]" "[[OUTPUT2]]" |
| 203 | +// CHK-TOOLS-GEN: sycl-post-link{{.*}} "-split=auto"{{.*}} "-spec-const=emulation"{{.*}} "-o" "[[OUTPUT3:.+\.table]]" "[[OUTPUT2]]" |
| 204 | +// CHK-TOOLS-CPU: sycl-post-link{{.*}} "-split=auto"{{.*}} "-spec-const=emulation"{{.*}} "-o" "spir64_x86_64,[[OUTPUT3:.+\.table]]" "[[OUTPUT2]]" |
203 | 205 | // CHK-TOOLS-AOT: file-table-tform{{.*}} "-o" "[[OUTPUT4:.+\.txt]]" "[[OUTPUT3]]" |
204 | 206 | // CHK-TOOLS-AOT: llvm-foreach{{.*}} "--in-file-list=[[OUTPUT4]]" "--in-replace=[[OUTPUT4]]" "--out-ext=spv" "--out-file-list=[[OUTPUT5:.+\.txt]]" "--out-replace=[[OUTPUT5]]" "--" "{{.*}}llvm-spirv{{.*}}" "-o" "[[OUTPUT5]]" {{.*}} "[[OUTPUT4]]" |
205 | 207 | // CHK-TOOLS-FPGA: llvm-foreach{{.*}} "--out-file-list=[[OUTPUT6:.+\.txt]]{{.*}} "--" "{{.*}}aoc{{.*}} "-o" "[[OUTPUT6]]" "[[OUTPUT5]]" |
|
276 | 278 | // Check -fsycl-device-code-split=per_kernel option passing. |
277 | 279 | // RUN: %clang -### -fsycl --no-offload-new-driver -fsycl-device-code-split=per_kernel %s 2>&1 \ |
278 | 280 | // RUN: | FileCheck %s -check-prefixes=CHK-ONE-KERNEL |
279 | | -// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split=per_kernel %s 2>&1 \ |
| 281 | +// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split=per_kernel -- %s 2>&1 \ |
280 | 282 | // RUN: | FileCheck %s -check-prefixes=CHK-ONE-KERNEL |
281 | 283 | // CHK-ONE-KERNEL: sycl-post-link{{.*}} "-split=kernel"{{.*}} "-o"{{.*}} |
282 | 284 |
|
283 | 285 | // Check -fsycl-device-code-split=per_source option passing. |
284 | 286 | // RUN: %clang -### -fsycl --no-offload-new-driver -fsycl-device-code-split=per_source %s 2>&1 \ |
285 | 287 | // RUN: | FileCheck %s -check-prefixes=CHK-PER-SOURCE |
286 | | -// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split=per_source %s 2>&1 \ |
| 288 | +// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split=per_source -- %s 2>&1 \ |
287 | 289 | // RUN: | FileCheck %s -check-prefixes=CHK-PER-SOURCE |
288 | 290 | // CHK-PER-SOURCE: sycl-post-link{{.*}} "-split=source"{{.*}} "-o"{{.*}} |
289 | 291 |
|
290 | 292 | // Check -fsycl-device-code-split option passing. |
291 | 293 | // RUN: %clang -### -fsycl --no-offload-new-driver -fsycl-device-code-split %s 2>&1 \ |
292 | 294 | // RUN: | FileCheck %s -check-prefixes=CHK-AUTO |
293 | | -// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split %s 2>&1 \ |
| 295 | +// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split -- %s 2>&1 \ |
294 | 296 | // RUN: | FileCheck %s -check-prefixes=CHK-AUTO |
295 | 297 | // RUN: %clang -### -fsycl --no-offload-new-driver -fsycl-device-code-split=auto %s 2>&1 \ |
296 | 298 | // RUN: | FileCheck %s -check-prefixes=CHK-AUTO |
297 | | -// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split=auto %s 2>&1 \ |
| 299 | +// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split=auto -- %s 2>&1 \ |
298 | 300 | // RUN: | FileCheck %s -check-prefixes=CHK-AUTO |
299 | 301 | // RUN: %clang -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHK-AUTO |
300 | | -// RUN: %clang_cl -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHK-AUTO |
| 302 | +// RUN: %clang_cl -### -fsycl --no-offload-new-driver -- %s 2>&1 | FileCheck %s -check-prefixes=CHK-AUTO |
301 | 303 | // CHK-AUTO: sycl-post-link{{.*}} "-split=auto"{{.*}} "-o"{{.*}} |
302 | 304 |
|
303 | 305 | // Check no device code split mode. |
304 | 306 | // RUN: %clang -### -fsycl --no-offload-new-driver -fsycl-device-code-split -fsycl-device-code-split=off %s 2>&1 \ |
305 | 307 | // RUN: | FileCheck %s -check-prefixes=CHK-NO-SPLIT |
306 | | -// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split -fsycl-device-code-split=off %s 2>&1 \ |
| 308 | +// RUN: %clang_cl -### -fsycl --no-offload-new-driver -fsycl-device-code-split -fsycl-device-code-split=off -- %s 2>&1 \ |
307 | 309 | // RUN: | FileCheck %s -check-prefixes=CHK-NO-SPLIT |
308 | 310 | // CHK-NO-SPLIT-NOT: sycl-post-link{{.*}} "-split={{.*}} |
309 | 311 |
|
|
319 | 321 |
|
320 | 322 | // Check ESIMD device code split. |
321 | 323 | // RUN: %clang -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT |
322 | | -// RUN: %clang_cl -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT |
| 324 | +// RUN: %clang_cl -### -fsycl --no-offload-new-driver -- %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT |
323 | 325 | // RUN: %clang -### -fintelfpga %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT |
324 | 326 | // RUN: %clang -### -fsycl --no-offload-new-driver -fsycl-targets=spir64_fpga-unknown-unknown %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT |
325 | | -// RUN: %clang_cl -### -fintelfpga %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT |
| 327 | +// RUN: %clang_cl -### -fintelfpga -- %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT |
326 | 328 | // CHK-ESIMD-SPLIT: sycl-post-link{{.*}} "-split-esimd" |
327 | 329 |
|
328 | 330 | // Check lowering of ESIMD device code. |
329 | 331 | // RUN: %clang -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER |
330 | | -// RUN: %clang_cl -### -fsycl --no-offload-new-driver %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER |
| 332 | +// RUN: %clang_cl -### -fsycl --no-offload-new-driver -- %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER |
331 | 333 | // RUN: %clang -### -fintelfpga %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER |
332 | 334 | // RUN: %clang -### -fsycl --no-offload-new-driver -fsycl-targets=spir64_fpga-unknown-unknown %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER |
333 | | -// RUN: %clang_cl -### -fintelfpga %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER |
| 335 | +// RUN: %clang_cl -### -fintelfpga -- %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER |
334 | 336 | // CHK-ESIMD-LOWER: sycl-post-link{{.*}} "-lower-esimd" |
335 | 337 |
|
336 | 338 | // Check -f[no]sycl-device-code-split-esimd option's effect on sycl-post-link invocation |
|
0 commit comments