Skip to content

Commit 1ce493a

Browse files
authored
[Comgr] Fix SPIRV LIT test to work with Debug and Release
1 parent ecb369e commit 1ce493a

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

amd/comgr/test-lit/spirv-to-reloc.hip

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
// COM: Generate a SPIR-V file from a HIP kernel
44
// RUN: clang -x hip --offload-arch=amdgcnspirv -nogpulib -nogpuinc \
55
// RUN: --no-gpu-bundle-output --offload-device-only -O3 %s -o %t.spv \
6-
// RUN: -fno-rounding-math -fvisibility=hidden -O3 -fno-autolink \
7-
// RUN: -fexceptions -fcolor-diagnostics
6+
// RUN: -fvisibility=hidden -fno-autolink -fexceptions -fcolor-diagnostics
87

98
// COM: Compile SPIR-V source to a relocatable
10-
// RUN: AMD_COMGR_EMIT_VERBOSE_LOGS=1 AMD_COMGR_REDIRECT_LOGS=stdout \
11-
// RUN: spirv-to-reloc %t.spv %t.o | FileCheck %s
12-
13-
// CHECK: ActionKind: AMD_COMGR_ACTION_COMPILE_SPIRV_TO_RELOCATABLE
14-
15-
// COM: Check translation
16-
// CHECK: SPIR-V Translation: amd-llvm-spirv -r --spirv-target-env=CL2.0 {{.*}}
9+
// RUN: AMD_COMGR_EMIT_VERBOSE_LOGS=1 AMD_COMGR_REDIRECT_LOGS=spirv-flags.txt \
10+
// RUN: spirv-to-reloc %t.spv %t.o
1711

1812
// COM: Check that SPIR-V flags are correctly extracted
19-
// CHECK: Compilation Args: {{.*}} "-Xclang" "-fcolor-diagnostics" "-Xclang" "-fexceptions" "-Xclang" "-fno-threadsafe-statics" "-Xclang" "-fvisibility=hidden" "-Xclang" "-fconvergent-functions" "-Xclang" "-ffp-contract=fast-honor-pragmas" "-Xclang" "-fno-experimental-relative-c++-abi-vtables" "-Xclang" "-O3" "-Xclang" "-fno-autolink" "-Xclang" "-finline-functions" "-Xclang" "-mcode-object-version=5"
13+
// RUN: grep '\-fvisibility=hidden' spirv-flags.txt
14+
// RUN: grep '\-fno-autolink' spirv-flags.txt
15+
// RUN: grep '\-fexceptions' spirv-flags.txt
16+
// RUN: grep '\-fcolor-diagnostics' spirv-flags.txt
17+
// RUN: grep '\-O3' spirv-flags.txt
18+
// RUN: grep '\-mcode-object-version=5' spirv-flags.txt
19+
20+
// RUN: rm spirv-flags.txt
2021

2122
#include <cstdlib>
2223

0 commit comments

Comments
 (0)