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