Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/DebugInfo/RelativeSrcPath.ll

raw
1 ; Source:
2 ; __kernel void foo(__global int *a, __global int *b) {
3 ; a[0] += b[0];
4 ; }
5
6 ; Command:
7 ; clang -cc1 -triple spir -O0 -debug-info-kind=line-tables-only -emit-llvm -o RelativeSrcPath.ll RelativeSrcPath.cl
8
9 ; Directory: /tmp
10
11 ; RUN: llvm-as %s -o %t.bc
12 ; RUN: llvm-spirv %t.bc -spirv-text -o - | FileCheck %s
13
14 ; ModuleID = 'RelativeSrcPath.cl'
15 source_filename = "RelativeSrcPath.cl"
16 target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
17 target triple = "spir"
18
19 ; Function Attrs: convergent noinline nounwind optnone
20 define spir_kernel void @foo(i32 addrspace(1)* %a, i32 addrspace(1)* %b) #0 !dbg !8 !kernel_arg_addr_space !11 !kernel_arg_access_qual !12 !kernel_arg_type !13 !kernel_arg_base_type !13 !kernel_arg_type_qual !14 {
21 entry:
22 %a.addr = alloca i32 addrspace(1)*, align 4
23 %b.addr = alloca i32 addrspace(1)*, align 4
24 store i32 addrspace(1)* %a, i32 addrspace(1)** %a.addr, align 4
25 store i32 addrspace(1)* %b, i32 addrspace(1)** %b.addr, align 4
26 %0 = load i32 addrspace(1)*, i32 addrspace(1)** %b.addr, align 4, !dbg !15
27 %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %0, i32 0, !dbg !15
28 %1 = load i32, i32 addrspace(1)* %arrayidx, align 4, !dbg !15
29 %2 = load i32 addrspace(1)*, i32 addrspace(1)** %a.addr, align 4, !dbg !15
30 %arrayidx1 = getelementptr inbounds i32, i32 addrspace(1)* %2, i32 0, !dbg !15
31 %3 = load i32, i32 addrspace(1)* %arrayidx1, align 4, !dbg !15
32 %add = add nsw i32 %3, %1, !dbg !15
33 store i32 %add, i32 addrspace(1)* %arrayidx1, align 4, !dbg !15
34 ret void, !dbg !16
35 }
36
37 attributes #0 = { convergent noinline nounwind optnone "correctly-rounded-divide-sqrt-fp-math"="false" "denorms-are-zero"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" "unsafe-fp-math"="false" "use-soft-float"="false" }
38
39 !llvm.dbg.cu = !{!0}
40 !llvm.module.flags = !{!3, !4}
41 !opencl.ocl.version = !{!5}
42 !opencl.spir.version = !{!6}
43 !llvm.ident = !{!7}
44
45 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 8.0.0 (cfe/trunk)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, enums: !2, nameTableKind: None)
46 !1 = !DIFile(filename: "<stdin>", directory: "/tmp")
47 !2 = !{}
48 !3 = !{i32 2, !"Debug Info Version", i32 3}
49 !4 = !{i32 1, !"wchar_size", i32 4}
50 !5 = !{i32 1, i32 0}
51 !6 = !{i32 1, i32 2}
52 !7 = !{!"clang version 8.0.0 (cfe/trunk)"}
53 !8 = distinct !DISubprogram(name: "foo", scope: !9, file: !9, line: 1, type: !10, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
54 ; CHECK: String [[ID:[0-9]+]] "/tmp{{[/\\]}}RelativeSrcPath.cl"
55 ; CHECK: Line [[ID]]
56 !9 = !DIFile(filename: "RelativeSrcPath.cl", directory: "/tmp")
57 !10 = !DISubroutineType(types: !2)
58 !11 = !{i32 1, i32 1}
59 !12 = !{!"none", !"none"}
60 !13 = !{!"int*", !"int*"}
61 !14 = !{!"", !""}
62 !15 = !DILocation(line: 2, scope: !8)
63 !16 = !DILocation(line: 3, scope: !8)