150
|
1 // REQUIRES: clang-driver
|
|
2 // REQUIRES: x86-registered-target
|
|
3 // REQUIRES: amdgpu-registered-target
|
|
4
|
221
|
5 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
6 // RUN: --cuda-gpu-arch=gfx906:xnack+ --cuda-gpu-arch=gfx900:xnack+ %s \
|
|
7 // RUN: 2>&1 | FileCheck %s -check-prefix=XNACK
|
|
8 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
9 // RUN: --cuda-gpu-arch=gfx906:xnack- --cuda-gpu-arch=gfx900:xnack- %s \
|
|
10 // RUN: 2>&1 | FileCheck %s -check-prefix=NOXNACK
|
150
|
11
|
|
12 // XNACK: {{.*}}clang{{.*}}"-target-feature" "+xnack"
|
|
13 // NOXNACK: {{.*}}clang{{.*}}"-target-feature" "-xnack"
|
221
|
14 // XNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+xnack"
|
|
15 // NOXNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-xnack"
|
150
|
16
|
221
|
17 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
18 // RUN: --cuda-gpu-arch=gfx908:sramecc+ %s \
|
|
19 // RUN: 2>&1 | FileCheck %s -check-prefix=SRAM
|
|
20 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
21 // RUN: --cuda-gpu-arch=gfx908:sramecc- %s \
|
|
22 // RUN: 2>&1 | FileCheck %s -check-prefix=NOSRAM
|
|
23
|
|
24 // SRAM: {{.*}}clang{{.*}}"-target-feature" "+sramecc"
|
|
25 // NOSRAM: {{.*}}clang{{.*}}"-target-feature" "-sramecc"
|
|
26 // SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sramecc"
|
|
27 // NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sramecc"
|
150
|
28
|
221
|
29 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
30 // RUN: --cuda-gpu-arch=gfx1010 %s \
|
|
31 // RUN: -mcumode 2>&1 | FileCheck %s -check-prefix=CUMODE
|
|
32 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
33 // RUN: --cuda-gpu-arch=gfx1010 %s \
|
|
34 // RUN: -mno-cumode 2>&1 | FileCheck %s -check-prefix=NOTCUMODE
|
150
|
35
|
221
|
36 // CUMODE: {{.*}}clang{{.*}}"-target-feature" "+cumode"
|
|
37 // NOTCUMODE: {{.*}}clang{{.*}}"-target-feature" "-cumode"
|
|
38 // CUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+cumode"
|
|
39 // NOTCUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-cumode"
|
|
40
|
|
41 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
42 // RUN: --cuda-gpu-arch=gfx908:xnack+:sramecc+ %s \
|
150
|
43 // RUN: 2>&1 | FileCheck %s -check-prefix=ALL3
|
221
|
44 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
45 // RUN: --cuda-gpu-arch=gfx908:xnack-:sramecc- %s \
|
150
|
46 // RUN: 2>&1 | FileCheck %s -check-prefix=NOALL3
|
|
47
|
221
|
48 // ALL3: {{.*}}clang{{.*}}"-target-feature" "+sramecc" "-target-feature" "+xnack"
|
|
49 // NOALL3: {{.*}}clang{{.*}}"-target-feature" "-sramecc" "-target-feature" "-xnack"
|
|
50
|
|
51 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
52 // RUN: --cuda-gpu-arch=gfx1010 %s \
|
|
53 // RUN: -mtgsplit 2>&1 | FileCheck %s -check-prefix=TGSPLIT
|
|
54 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
55 // RUN: --cuda-gpu-arch=gfx1010 %s \
|
|
56 // RUN: -mno-tgsplit 2>&1 | FileCheck %s -check-prefix=NOTTGSPLIT
|
|
57
|
|
58 // TGSPLIT: {{.*}}clang{{.*}}"-target-feature" "+tgsplit"
|
|
59 // NOTTGSPLIT: {{.*}}clang{{.*}}"-target-feature" "-tgsplit"
|
|
60 // TGSPLIT: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+tgsplit"
|
|
61 // NOTTGSPLIT: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-tgsplit"
|
|
62
|
|
63 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
64 // RUN: --cuda-gpu-arch=gfx1010 %s \
|
|
65 // RUN: -mcumode -mcumode -mno-cumode -mwavefrontsize64 -mcumode \
|
|
66 // RUN: -mwavefrontsize64 -mno-wavefrontsize64 2>&1 \
|
|
67 // RUN: | FileCheck %s -check-prefix=DUP
|
|
68 // DUP: {{.*}}clang{{.*}} "-target-feature" "+cumode"
|
|
69 // DUP-NOT: "-target-feature" "{{.*}}wavefrontsize16"
|
|
70 // DUP-NOT: "-target-feature" "{{.*}}wavefrontsize32"
|
|
71 // DUP-NOT: "-target-feature" "{{.*}}wavefrontsize64"
|
|
72 // DUP: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+cumode"
|
|
73
|
|
74 // RUN: %clang -### -target x86_64-linux-gnu -fgpu-rdc -nogpulib \
|
|
75 // RUN: --cuda-gpu-arch=gfx1010 %s \
|
|
76 // RUN: -mno-wavefrontsize64 -mwavefrontsize64 2>&1 \
|
|
77 // RUN: | FileCheck %s -check-prefix=WAVE64
|
|
78 // WAVE64: {{.*}}clang{{.*}} "-target-feature" "+wavefrontsize64"
|
|
79 // WAVE64-NOT: "-target-feature" "{{.*}}wavefrontsize16"
|
|
80 // WAVE64-NOT: "-target-feature" "{{.*}}wavefrontsize32"
|
|
81 // WAVE64: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+wavefrontsize64"
|