Skip to content

Commit 3560926

Browse files
authored
[Comgr][Merge] Two dependent changes to fix spirv test (llvm#1317)
2 parents 952e890 + 73f3702 commit 3560926

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// REQUIRES: comgr-has-spirv
22
// COM: Same as spirv-translator but with the cache
3+
// RUN: rm -fr %t.cache
34

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

78
// COM: Translate LLVM IR to SPIRV format
89
// RUN: amd-llvm-spirv --spirv-target-env=CL2.0 %t.bc -o %t.spv
@@ -13,5 +14,10 @@
1314
// RUN: COUNT=$(ls "%t.cache" | wc -l)
1415
// RUN: [ 2 -eq $COUNT ]
1516

17+
// COM: Run again and check that the cache contents haven't changed
18+
// RUN: AMD_COMGR_CACHE_DIR=%t.cache spirv-translator %t.spv -o %t.translated.again.bc
19+
// RUN: COUNT=$(ls "%t.cache" | wc -l)
20+
// RUN: [ 2 -eq $COUNT ]
21+
1622
// COM: Dissasemble LLVM IR bitcode to LLVM IR text
1723
// RUN: llvm-dis %t.translated.bc -o - | FileCheck %S/spirv-translator.cl

0 commit comments

Comments
 (0)