hip-toolchain-mllvm.hip
1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// REQUIRES: clang-driver
// REQUIRES: x86-registered-target
// REQUIRES: amdgpu-registered-target
// RUN: %clang -### -target x86_64-linux-gnu \
// RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \
// RUN: -mllvm -amdgpu-function-calls=0 \
// RUN: %s 2>&1 | FileCheck %s
// CHECK: [[CLANG:".*clang.*"]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
// CHECK-SAME: "-emit-llvm-bc"
// CHECK-SAME: {{.*}} "-target-cpu" "gfx803"
// CHECK-SAME: {{.*}} "-mllvm" "-amdgpu-function-calls=0" {{.*}}
// CHECK: [[OPT:".*opt"]] {{".*-gfx803-linked.*bc"}} "-mtriple=amdgcn-amd-amdhsa"
// CHECK-SAME: "-mcpu=gfx803" "-amdgpu-function-calls=0"
// CHECK-SAME: "-o" [[OPT_803_BC:".*-gfx803-optimized.*bc"]]
// CHECK: [[LLC: ".*llc"]] [[OPT_803_BC]]
// CHECK-SAME: "-mtriple=amdgcn-amd-amdhsa"
// CHECK-SAME: {{.*}} "-mcpu=gfx803"
// CHECK-SAME: "-filetype=obj"
// CHECK-SAME: "-amdgpu-function-calls=0" "-o" {{".*-gfx803-.*o"}}
// CHECK: [[CLANG]] "-cc1" "-triple" "amdgcn-amd-amdhsa"
// CHECK-SAME: "-aux-triple" "x86_64-unknown-linux-gnu"
// CHECK-SAME: "-emit-llvm-bc"
// CHECK-SAME: {{.*}} "-target-cpu" "gfx900"
// CHECK-SAME: {{.*}} "-mllvm" "-amdgpu-function-calls=0" {{.*}}
// CHECK: [[OPT]] {{".*-gfx900-linked.*bc"}} "-mtriple=amdgcn-amd-amdhsa"
// CHECK-SAME: "-mcpu=gfx900" "-amdgpu-function-calls=0"
// CHECK-SAME: "-o" [[OPT_900_BC:".*-gfx900-optimized.*bc"]]
// CHECK: [[LLC]] [[OPT_900_BC]]
// CHECK-SAME: "-mtriple=amdgcn-amd-amdhsa"
// CHECK-SAME: {{.*}} "-mcpu=gfx900"
// CHECk-SAME: "-filetype=obj"
// CHECK-SAME: "-amdgpu-function-calls=0" "-o" {{".*-gfx900-.*o"}}