|
5 | 5 |
|
6 | 6 | // Check that -fsplit-machine-functions is passed to both x86 and cuda
|
7 | 7 | // compilation and does not cause driver error.
|
| 8 | +// RUN: cd "$(dirname "%t")" ; \ |
8 | 9 | // RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \
|
9 |
| -// RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions -S %s 2>&1 \ |
10 |
| -// RUN: | FileCheck %s --check-prefix=MFS1 |
| 10 | +// RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions -S %s \ |
| 11 | +// RUN: 2>&1 | FileCheck %s --check-prefix=MFS1 |
11 | 12 | // MFS1: "-target-cpu" "x86-64"{{.*}}"-fsplit-machine-functions"
|
12 | 13 | // MFS1: "-target-cpu" "sm_70"{{.*}}"-fsplit-machine-functions"
|
13 | 14 |
|
14 | 15 | // Check that -fsplit-machine-functions is passed to cuda and it
|
15 | 16 | // causes a warning.
|
| 17 | +// RUN: cd "$(dirname "%t")" ; \ |
16 | 18 | // RUN: %clang --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \
|
17 |
| -// RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions -S %s 2>&1 \ |
18 |
| -// RUN: | FileCheck %s --check-prefix=MFS2 |
| 19 | +// RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions -S %s \ |
| 20 | +// RUN: 2>&1 | FileCheck %s --check-prefix=MFS2 |
19 | 21 | // MFS2: warning: -fsplit-machine-functions is not valid for nvptx
|
20 | 22 |
|
21 | 23 | // Check that -Xarch_host -fsplit-machine-functions is passed only to
|
22 | 24 | // native compilation.
|
| 25 | +// RUN: cd "$(dirname "%t")" ; \ |
23 | 26 | // RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \
|
24 | 27 | // RUN: --cuda-gpu-arch=sm_70 -x cuda -Xarch_host \
|
25 | 28 | // RUN: -fsplit-machine-functions -S %s \
|
|
28 | 31 | // MFS3-NOT: "-target-cpu" "sm_70"{{.*}}"-fsplit-machine-functions"
|
29 | 32 |
|
30 | 33 | // Check that -Xarch_host -fsplit-machine-functions does not cause any warning.
|
| 34 | +// RUN: cd "$(dirname "%t")" ; \ |
31 | 35 | // RUN: %clang --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \
|
32 | 36 | // RUN --cuda-gpu-arch=sm_70 -x cuda -Xarch_host \
|
33 | 37 | // RUN -fsplit-machine-functions -S %s || { echo \
|
|
36 | 40 | // MFS4-NOT: warning: -fsplit-machine-functions is not valid for
|
37 | 41 |
|
38 | 42 | // Check that -Xarch_device -fsplit-machine-functions does cause the warning.
|
| 43 | +// RUN: cd "$(dirname "%t")" ; \ |
39 | 44 | // RUN: %clang --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \
|
40 | 45 | // RUN: --cuda-gpu-arch=sm_70 -x cuda -Xarch_device \
|
41 | 46 | // RUN: -fsplit-machine-functions -S %s 2>&1 | \
|
|
44 | 49 |
|
45 | 50 | // Check that -fsplit-machine-functions -Xarch_device
|
46 | 51 | // -fno-split-machine-functions only passes MFS to x86
|
| 52 | +// RUN: cd "$(dirname "%t")" ; \ |
47 | 53 | // RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \
|
48 | 54 | // RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions \
|
49 | 55 | // RUN: -Xarch_device -fno-split-machine-functions -S %s \
|
|
53 | 59 |
|
54 | 60 | // Check that -fsplit-machine-functions -Xarch_device
|
55 | 61 | // -fno-split-machine-functions has no warnings
|
| 62 | +// RUN: cd "$(dirname "%t")" ; \ |
56 | 63 | // RUN: %clang --target=x86_64-unknown-linux-gnu -nogpulib -nogpuinc \
|
57 | 64 | // RUN: --cuda-gpu-arch=sm_70 -x cuda -fsplit-machine-functions \
|
58 | 65 | // RUN: -Xarch_device -fno-split-machine-functions -S %s \
|
|
0 commit comments