Skip to content

Commit 51fa25b

Browse files
committed
[Comgr][Cache] Fix broken test: spirv-translator-cached.cl
1 parent 528a697 commit 51fa25b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

amd/comgr/test-lit/spirv-translator-cached.cl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// COM: Same as spirv-translator but with the cache
33

44
// COM: Generate a spirv-targeted LLVM IR file from an OpenCL kernel
5-
// RUN: clang -c -emit-llvm --target=spirv64 %s -o %t.bc
5+
// RUN: clang -c -emit-llvm --target=spirv64 %S/spirv-translator.cl -o %t.bc
66

77
// COM: Translate LLVM IR to SPIRV format
88
// RUN: amd-llvm-spirv --spirv-target-env=CL2.0 %t.bc -o %t.spv
@@ -11,7 +11,12 @@
1111
// RUN: export AMD_COMGR_CACHE=1
1212
// RUN: AMD_COMGR_CACHE_DIR=%t.cache spirv-translator %t.spv -o %t.translated.bc
1313
// RUN: COUNT=$(ls "%t.cache" | wc -l)
14-
// RUN: [ 2 -eq $COUNT ]
14+
// RUN: [ 3 -eq $COUNT ]
15+
16+
// COM: Run again and check that the cache contents haven't changed
17+
// RUN: AMD_COMGR_CACHE_DIR=%t.cache spirv-translator %t.spv -o %t.translated.again.bc
18+
// RUN: COUNT=$(ls "%t.cache" | wc -l)
19+
// RUN: [ 3 -eq $COUNT ]
1520

1621
// COM: Dissasemble LLVM IR bitcode to LLVM IR text
1722
// RUN: llvm-dis %t.translated.bc -o - | FileCheck %S/spirv-translator.cl

0 commit comments

Comments
 (0)