Skip to content

Commit f1d1f13

Browse files
committed
Pre-commit tests: [HIP][SPIRV] Use OPT_fembed_bitcode_EQ instead of the alias OPT_fembed_bitcode_markerpre commit
1 parent b88af66 commit f1d1f13

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

clang/test/Driver/hip-toolchain-no-rdc.hip

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@
4141
// RUN: %s -nogpuinc -nogpulib \
4242
// RUN: 2>&1 | FileCheck -check-prefixes=AMDGCNSPIRV %s
4343

44+
// Only the first case where -fembed-bitcode-marker is used is relevant.
45+
// The next 2 cases only verify that the user's will is respected.
46+
// RUN: %clang -### --target=x86_64-linux-gnu \
47+
// RUN: --offload-arch=amdgcnspirv --offload-arch=gfx900 -fembed-bitcode=all \
48+
// RUN: %s -nogpuinc -nogpulib \
49+
// RUN: 2>&1 | FileCheck -check-prefixes=AMDGCNSPIRV-EMBED %s
50+
51+
// RUN: %clang -### --target=x86_64-linux-gnu \
52+
// RUN: --offload-arch=amdgcnspirv --offload-arch=gfx900 -fembed-bitcode=off \
53+
// RUN: %s -nogpuinc -nogpulib \
54+
// RUN: 2>&1 | FileCheck -check-prefixes=AMDGCNSPIRV %s
55+
4456
//
4557
// Compile device code in a.cu to code object for gfx803.
4658
//
@@ -214,3 +226,7 @@
214226
// AMDGCNSPIRV: {{".*clang-offload-bundler.*"}} "-type=o"
215227
// AMDGCNSPIRV-SAME: "-targets={{.*}}hipv4-spirv64-amd-amdhsa--amdgcnspirv,hipv4-amdgcn-amd-amdhsa--gfx900"
216228
// AMDGCNSPIRV-SAME: "-input=[[AMDGCNSPV_CO]]" "-input=[[GFX900_CO]]"
229+
230+
// Only check that no confliction options are passed
231+
// AMDGCNSPIRV-EMBED: "-cc1" "-triple" "spirv64-amd-amdhsa" {{.*}}"-emit-llvm-bc" {{.*}}"-fembed-bitcode=marker" "-disable-llvm-passes" {{.*}} "-o" "[[AMDGCNSPV_MARKER_BC:.*bc]]"
232+
// AMDGCNSPIRV-EMBED: "-cc1" "-triple" "spirv64-amd-amdhsa" {{.*}}"-emit-llvm-bc" {{.*}}"-fembed-bitcode=all"{{.*}}"-fembed-bitcode=marker" {{.*}} "-o" "[[AMDGCNSPV_BC:.*bc]]" "-x" "ir" "[[AMDGCNSPV_MARKER_BC]]"

0 commit comments

Comments
 (0)