11; This test checks that the post-link tool properly generates "asanUsed=1"
2- ; in [SYCL/misc properties]
2+ ; in prop file, and fixes the attributes and metadata of @__AsanKernelMetadata
33
44; RUN: sycl-post-link -properties -split=kernel -symbols -S < %s -o %t.table
5- ; RUN: FileCheck %s -input-file=%t_0.prop
6- ; CHECK: [SYCL/misc properties]
7- ; CHECK: asanUsed=1
5+
6+ ; RUN: FileCheck %s -input-file=%t_0.prop --check-prefix CHECK-PROP
7+ ; CHECK-PROP: [SYCL/misc properties]
8+ ; CHECK-PROP: asanUsed=1
9+
10+ ; RUN: FileCheck %s -input-file=%t_0.ll --check-prefix CHECK-IR
811
912; ModuleID = 'parallel_for_int.cpp'
1013source_filename = "parallel_for_int.cpp"
@@ -15,6 +18,7 @@ $_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E8MyKernel = comdat any
1518
1619@__asan_kernel = internal addrspace (1 ) constant [55 x i8 ] c "_ZTSZZ4mainENKUlRN4sycl3_V17handlerEE_clES2_E8MyKernel\00 "
1720@__AsanKernelMetadata = appending dso_local local_unnamed_addr addrspace (1 ) global [1 x { i64 , i64 }] [{ i64 , i64 } { i64 ptrtoint (ptr addrspace (1 ) @__asan_kernel to i64 ), i64 54 }] #2
21+ ; CHECK-IR: @__AsanKernelMetadata {{.*}} !spirv.Decorations
1822@__spirv_BuiltInGlobalInvocationId = external dso_local local_unnamed_addr addrspace (1 ) constant <3 x i64 >, align 32
1923@__asan_func = internal addrspace (2 ) constant [106 x i8 ] c "typeinfo name for main::'lambda'(sycl::_V1::handler&)::operator()(sycl::_V1::handler&) const::MyKernelR_4\00 "
2024
@@ -48,7 +52,7 @@ declare spir_func void @__itt_offload_wi_finish_wrapper()
4852
4953attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
5054attributes #1 = { mustprogress norecurse nounwind sanitize_address uwtable "frame-pointer" ="all" "no-trapping-math" ="true" "stack-protector-buffer-size" ="8" "sycl-module-id" ="parallel_for_int.cpp" "sycl-optlevel" ="2" "uniform-work-group-size" ="true" }
51- attributes #2 = { "sycl-device-global-size" ="16" "sycl-device-image-scope" "sycl-host-access" ="2 " "sycl-unique-id" ="_Z20__AsanKernelMetadata" }
55+ attributes #2 = { "sycl-device-global-size" ="16" "sycl-device-image-scope" "sycl-host-access" ="0 " "sycl-unique-id" ="_Z20__AsanKernelMetadata" }
5256
5357!llvm.module.flags = !{!0 , !1 , !2 }
5458!opencl.spir.version = !{!3 }
0 commit comments