150
|
1 // REQUIRES: x86-registered-target
|
|
2 // REQUIRES: amdgpu-registered-target
|
|
3
|
221
|
4 // -fno-gpu-rdc without -o with -c
|
236
|
5 // RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
|
221
|
6 // RUN: --cuda-gpu-arch=gfx900 -c %s 2>&1 | \
|
|
7 // RUN: FileCheck -check-prefixes=CHECK,NORDC %s
|
|
8
|
150
|
9 // -fno-gpu-rdc without -o
|
236
|
10 // RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
|
173
|
11 // RUN: --cuda-gpu-arch=gfx900 %s 2>&1 | \
|
150
|
12 // RUN: FileCheck -check-prefixes=CHECK,NORDC,NOUT %s
|
|
13
|
|
14 // -fno-gpu-rdc with -o
|
236
|
15 // RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
|
173
|
16 // RUN: -o executable --cuda-gpu-arch=gfx900 %s 2>&1 | \
|
150
|
17 // RUN: FileCheck -check-prefixes=CHECK,NORDC,WOUT %s
|
|
18
|
221
|
19 // -fgpu-rdc without -o with -c
|
236
|
20 // RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
|
221
|
21 // RUN: -fgpu-rdc --cuda-gpu-arch=gfx900 -c %s 2>&1 | \
|
|
22 // RUN: FileCheck -check-prefixes=CHECK,RDC,RDCC %s
|
|
23
|
150
|
24 // -fgpu-rdc without -o
|
236
|
25 // RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
|
173
|
26 // RUN: -fgpu-rdc --cuda-gpu-arch=gfx900 %s 2>&1 | \
|
221
|
27 // RUN: FileCheck -check-prefixes=CHECK,RDC,RDCL,NOUT %s
|
150
|
28
|
|
29 // -fgpu-rdc with -o
|
236
|
30 // UN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \
|
221
|
31 // UN: -o executable -fgpu-rdc --cuda-gpu-arch=gfx900 %s 2>&1 | \
|
|
32 // UN: FileCheck -check-prefixes=CHECK,RDC,RDCL,WOUT %s
|
|
33
|
|
34 // -fgpu-rdc host object path
|
|
35 // RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.cui"
|
|
36 // RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
|
37 // RDCL: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
|
38 // RDCL: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.o"
|
|
39
|
|
40 // device object paths
|
|
41 // CHECK: {{".*clang.*"}} "-cc1" {{.*}} "-E" {{.*}} [[CPU:"-target-cpu" "gfx900"]] {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.cui"
|
|
42 // NORDC: {{".*clang.*"}} "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} [[CPU]] {{.*}} "-disable-llvm-passes" {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.bc"
|
|
43 // RDC: {{".*clang.*"}} "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} [[CPU]] {{.*}} "-disable-llvm-passes" {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.tmp.bc"
|
|
44
|
|
45 // NORDC: {{".*clang.*"}} "-cc1" {{.*}} "-S"
|
|
46 // NORDC-SAME: "-mllvm" "-amdgpu-internalize-symbols"
|
|
47 // NORDC-SAME: [[CPU]]
|
|
48 // NORDC-SAME: "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.s"
|
150
|
49
|
221
|
50 // RDC: {{".*clang.*"}} "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} [[CPU]] {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.bc"
|
|
51 // NORDC: {{".*clang.*"}} "-cc1as" {{.*}} "-filetype" "obj" {{.*}} [[CPU]] {{.*}} "-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.o"
|
|
52 // CHECK-NOT: "{{.*}}llvm-link"
|
|
53 // CHECK-NOT: "{{.*}}opt"
|
|
54 // CHECK-NOT: "{{.*}}llc"
|
|
55 // NORDC: {{.*lld.*}}"-o" "hip-save-temps-hip-amdgcn-amd-amdhsa-gfx900.out"
|
|
56 // RDCL: "{{.*lld.*}}" {{.*}} "-plugin-opt=-amdgpu-internalize-symbols" {{.*}}"-save-temps"
|
|
57 // RDCL-SAME: "-o" "a.out-hip-amdgcn-amd-amdhsa-gfx900"
|
|
58 // RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.cui"
|
|
59 // RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
|
60 // RDCC: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
|
61 // RDCC: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.o"
|
236
|
62 // RDCC: "{{.*clang-offload-bundler.*}}" {{.*}} "-output=hip-save-temps.o"
|
|
63 // RDCL: "{{.*clang-offload-bundler.*}}" {{.*}} "-output=hip-save-temps-hip-amdgcn-amd-amdhsa.hipfb"
|
221
|
64 // RDCL: {{.*}}llvm-mc{{.*}}"-o" "hip-save-temps-hip-amdgcn-amd-amdhsa.o" "hip-save-temps-hip-amdgcn-amd-amdhsa.mcin" "--filetype=obj"
|
|
65
|
|
66 // -fno-gpu-rdc host object path
|
|
67 // NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-E" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.cui"
|
|
68 // NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-emit-llvm-bc" {{.*}} "-fcuda-include-gpubinary" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.bc"
|
|
69 // NORDC: "{{.*clang.*}}" "-cc1" {{.*}} "-S" {{.*}} "-o" "hip-save-temps-host-x86_64-unknown-linux-gnu.s"
|
|
70 // NORDC: "{{.*clang.*}}" "-cc1as" {{.*}} "-o" "hip-save-temps{{.*}}.o"
|
|
71
|
|
72 // output to default a.out or -o specified file name
|
150
|
73 // NOUT: {{.*}}ld{{.*}}"-o" "a.out"
|
|
74 // WOUT: {{.*}}ld{{.*}}"-o" "executable"
|