|
1 | 1 | // Check that we enable LTO-mode properly with '-fopenmp-target-jit' and that it
|
2 | 2 | // still enabled LTO-mode if `-fno-offload-lto` is on.
|
3 | 3 | // RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-phases -fopenmp=libomp \
|
4 |
| -// RUN: -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-target-jit %s 2>&1 \ |
| 4 | +// RUN: --offload-arch=sm_52 -fopenmp-target-jit %s 2>&1 \ |
5 | 5 | // RUN: | FileCheck -check-prefix=PHASES-JIT %s
|
6 | 6 | // RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-phases -fopenmp=libomp \
|
7 |
| -// RUN: -fopenmp-targets=nvptx64-nvidia-cuda -foffload-lto -fopenmp-target-jit %s 2>&1 \ |
| 7 | +// RUN: --offload-arch=sm_52 -foffload-lto -fopenmp-target-jit %s 2>&1 \ |
8 | 8 | // RUN: | FileCheck -check-prefix=PHASES-JIT %s
|
9 | 9 | // RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-phases -fopenmp=libomp \
|
10 |
| -// RUN: -fopenmp-targets=amdgcn-amd-amdhsa -fopenmp-target-jit %s 2>&1 \ |
| 10 | +// RUN: --offload-arch=gfx90a -fopenmp-target-jit %s 2>&1 \ |
11 | 11 | // RUN: | FileCheck -check-prefix=PHASES-JIT %s
|
12 | 12 | // RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-phases -fopenmp=libomp \
|
13 |
| -// RUN: -fopenmp-targets=amdgcn-amd-amdhsa -foffload-lto -fopenmp-target-jit %s 2>&1 \ |
| 13 | +// RUN: --offload-arch=gfx90a -foffload-lto -fopenmp-target-jit %s 2>&1 \ |
14 | 14 | // RUN: | FileCheck -check-prefix=PHASES-JIT %s
|
15 | 15 | // RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-phases -fopenmp=libomp \
|
16 |
| -// RUN: -fopenmp-targets=amdgcn-amd-amdhsa -fno-offload-lto -fopenmp-target-jit %s 2>&1 \ |
| 16 | +// RUN: --offload-arch=gfx90a -fno-offload-lto -fopenmp-target-jit %s 2>&1 \ |
17 | 17 | // RUN: | FileCheck -check-prefix=PHASES-JIT %s
|
18 | 18 | //
|
19 | 19 | // PHASES-JIT: 0: input, "[[INPUT:.+]]", c, (host-openmp)
|
20 | 20 | // PHASES-JIT-NEXT: 1: preprocessor, {0}, cpp-output, (host-openmp)
|
21 | 21 | // PHASES-JIT-NEXT: 2: compiler, {1}, ir, (host-openmp)
|
22 |
| -// PHASES-JIT-NEXT: 3: input, "[[INPUT]]", c, (device-openmp) |
23 |
| -// PHASES-JIT-NEXT: 4: preprocessor, {3}, cpp-output, (device-openmp) |
24 |
| -// PHASES-JIT-NEXT: 5: compiler, {4}, ir, (device-openmp) |
| 22 | +// PHASES-JIT-NEXT: 3: input, "[[INPUT]]", c, (device-openmp, {{.*}}) |
| 23 | +// PHASES-JIT-NEXT: 4: preprocessor, {3}, cpp-output, (device-openmp, {{.*}}) |
| 24 | +// PHASES-JIT-NEXT: 5: compiler, {4}, ir, (device-openmp, {{.*}}) |
25 | 25 | // PHASES-JIT-NEXT: 6: offload, "host-openmp (x86_64-unknown-linux-gnu)" {2}, "device-openmp ([[TARGET:.+]])" {5}, ir
|
26 |
| -// PHASES-JIT-NEXT: 7: backend, {6}, lto-bc, (device-openmp) |
| 26 | +// PHASES-JIT-NEXT: 7: backend, {6}, lto-bc, (device-openmp, {{.*}}) |
27 | 27 | // PHASES-JIT-NEXT: 8: offload, "device-openmp ([[TARGET]])" {7}, lto-bc
|
28 | 28 | // PHASES-JIT-NEXT: 9: clang-offload-packager, {8}, image, (device-openmp)
|
29 | 29 | // PHASES-JIT-NEXT: 10: offload, "host-openmp (x86_64-unknown-linux-gnu)" {2}, "device-openmp (x86_64-unknown-linux-gnu)" {9}, ir
|
|
41 | 41 | // Check for incompatible combinations
|
42 | 42 |
|
43 | 43 | // RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fno-offload-lto \
|
44 |
| -// RUN: -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-target-jit %s 2>&1 \ |
| 44 | +// RUN: --offload-arch=sm_52 -fopenmp-target-jit %s 2>&1 \ |
45 | 45 | // RUN: | FileCheck -check-prefix=NO-LTO %s
|
46 | 46 | // NO-LTO: error: the combination of '-fno-offload-lto' and '-fopenmp-target-jit' is incompatible
|
47 | 47 |
|
48 | 48 | // RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -foffload-lto=thin \
|
49 |
| -// RUN: -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-target-jit %s 2>&1 \ |
| 49 | +// RUN: --offload-arch=sm_52 -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-target-jit %s 2>&1 \ |
50 | 50 | // RUN: | FileCheck -check-prefix=THIN-LTO %s
|
51 | 51 | // THIN-LTO: error: the combination of '-foffload-lto=' and '-fopenmp-target-jit' is incompatible
|
0 commit comments