2022-04-12 20:29:46 +00:00
|
|
|
// REQUIRES: amdgpu-registered-target
|
2020-12-04 22:38:57 +00:00
|
|
|
|
2022-08-26 02:30:21 +00:00
|
|
|
// RUN: %clang -### --target=x86_64-unknown-linux-gnu \
|
2020-12-04 22:38:57 +00:00
|
|
|
// RUN: --offload-arch=gfx803 -nogpulib \
|
|
|
|
// RUN: -x hip-cpp-output %s 2>&1 | FileCheck %s
|
|
|
|
|
2023-01-10 20:58:57 +00:00
|
|
|
// RUN: %clang -### --target=x86_64-unknown-linux-gnu \
|
|
|
|
// RUN: --offload-arch=gfx803 -nogpulib \
|
|
|
|
// RUN: %s 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
// CHECK: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*hipi]]" "-output=[[DEV_PP:.*hipi]]" "-unbundle"
|
2020-12-04 22:38:57 +00:00
|
|
|
// CHECK: {{".*clang.*"}} "-cc1" {{.*}}"-target-cpu" "gfx803" {{.*}}"-o" "[[DEV_O:.*o]]" {{.*}}"[[DEV_PP]]"
|
|
|
|
// CHECK: {{".*lld.*"}} {{.*}}"-o" "[[DEV_ISA:.*]]" "[[DEV_O]]"
|
2022-04-05 14:44:13 +00:00
|
|
|
// CHECK: {{".*clang-offload-bundler.*"}} {{.*}}"-input={{.*}}" "-input=[[DEV_ISA]]" "-output=[[FATBIN:.*]]"
|
2020-12-04 22:38:57 +00:00
|
|
|
// CHECK: {{".*clang.*"}} {{.*}}"-triple" "x86_64-unknown-linux-gnu"{{.*}} "-fcuda-include-gpubinary" "[[FATBIN]]" {{.*}}"-o" "[[HOST_O:.*o]]" {{.*}}"[[HOST_PP]]"
|
|
|
|
// CHECK: {{".*ld.*"}} {{.*}}"[[HOST_O]]"
|
|
|
|
|
2022-08-26 02:30:21 +00:00
|
|
|
// RUN: %clang -### --target=x86_64-unknown-linux-gnu \
|
2020-12-04 22:38:57 +00:00
|
|
|
// RUN: --offload-arch=gfx803 -nogpulib -fgpu-rdc \
|
2023-01-10 20:58:57 +00:00
|
|
|
// RUN: %s 2>&1 | FileCheck -check-prefix=RDC %s
|
2020-12-04 22:38:57 +00:00
|
|
|
|
2023-01-10 20:58:57 +00:00
|
|
|
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*hipi]]" "-output=[[DEV_PP:.*hipi]]" "-unbundle"
|
2020-12-04 22:38:57 +00:00
|
|
|
// RDC: {{".*clang.*"}} {{.*}}"-triple" "x86_64-unknown-linux-gnu"{{.*}} "-o" "[[HOST_O:.*o]]" {{.*}}"[[HOST_PP]]"
|
2023-01-10 20:58:57 +00:00
|
|
|
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-output=[[HOST_PP:.*hipi]]" "-output=[[DEV_PP:.*hipi]]" "-unbundle"
|
2020-12-04 22:38:57 +00:00
|
|
|
// RDC: {{".*clang.*"}} "-cc1" {{.*}}"-target-cpu" "gfx803" {{.*}}"-o" "[[DEV_BC:.*bc]]" {{.*}}"[[DEV_PP]]"
|
|
|
|
// RDC: {{".*lld.*"}} {{.*}}"-o" "[[DEV_ISA:.*]]" "[[DEV_BC]]"
|
2022-04-05 14:44:13 +00:00
|
|
|
// RDC: {{".*clang-offload-bundler.*"}} {{.*}}"-input={{.*}}" "-input=[[DEV_ISA]]" "-output=[[FATBIN:.*]]"
|
2020-12-04 22:38:57 +00:00
|
|
|
// RDC: {{".*llvm-mc.*"}} "-o" "[[FATBIN_O:.*o]]"
|
|
|
|
// RDC: {{".*ld.*"}} {{.*}}"[[HOST_O]]" "[[FATBIN_O]]"
|