comparison clang/test/Driver/hip-save-temps.hip @ 221:79ff65ed7e25

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