Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/negative/invalid-private-global-cast.ll

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: not llvm-spirv %t.bc -o %t.spv 2>&1 | FileCheck %s
3
4 ; CHECK: InvalidModule: Invalid SPIR-V module: Casts from private/local/global address space are allowed only to generic
5
6 source_filename = "sample.cpp"
7 target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"
8 target triple = "spir64-unknown-unknown"
9
10 ; Function Attrs: nofree norecurse nounwind writeonly
11 define dso_local spir_func void @_Z10kernel_funPi(i32 addrspace(1)* %ptr) {
12 entry:
13 %0 = addrspacecast i32 addrspace(1)* %ptr to i32*
14 ret void
15 }
16
17 !llvm.module.flags = !{!0}
18 !opencl.spir.version = !{!1}
19 !spirv.Source = !{!2}
20 !llvm.ident = !{!3}
21
22 !0 = !{i32 1, !"wchar_size", i32 4}
23 !1 = !{i32 1, i32 2}
24 !2 = !{i32 4, i32 100000}
25 !3 = !{!"clang version 12.0.0"}
26 !4 = !{!5, !6, i64 0}
27 !5 = !{!"_ZTSN2cl4sycl9multi_ptrIiLNS0_6access13address_spaceE1EEE", !6, i64 0}
28 !6 = !{!"any pointer", !7, i64 0}
29 !7 = !{!"omnipotent char", !8, i64 0}
30 !8 = !{!"Simple C++ TBAA"}