File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
llvm/test/tools/sycl-post-link Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ ; This test checks that the post-link tool doesn't incorrectly remove function
2+ ; declarations which are still in use while erasing the "llvm.used" global.
3+ ;
4+ ; RUN: sycl-post-link -split=auto -symbols -S %s -o %t.files.table
5+ ; RUN: FileCheck %s -input-file=%t.files_0.ll
6+ ;
7+ target triple = "spir64-unknown-unknown"
8+
9+ ; CHECK-NOT: llvm.used
10+ @llvm.used = appending global [2 x i8* ] [i8* bitcast (void ()* @notused to i8* ), i8* bitcast (void ()* @stillused to i8* )], section "llvm.metadata"
11+
12+ ; CHECK: declare spir_func void @stillused
13+ declare spir_func void @stillused () #0
14+ declare spir_func void @notused () #0
15+
16+ define spir_kernel void @entry () #0 {
17+ call spir_func void @stillused ()
18+ ret void
19+ }
20+
21+ define spir_kernel void @bar () #0 {
22+ ret void
23+ }
24+
25+ attributes #0 = { "sycl-module-id" ="erase_used_decl.cpp" }
You can’t perform that action at this time.
0 commit comments