Debian Codegraph @

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

raw
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: llvm-spirv %t.bc -o %t.spv --spirv-ext=+all --spirv-allow-unknown-intrinsics
3 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.bc
4 ; RUN: llvm-dis %t.bc -o %t.ll
5 ; RUN: FileCheck %s --input-file %t.ll -check-prefix=LLVM
6
7 ; ModuleID = 'test.bc'
8 source_filename = "test.cl"
9 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
10 target triple = "spir"
11
12 ; Function Attrs: norecurse nounwind readnone uwtable
13 define dso_local i32 @foo(i32 %x, i32 %y) local_unnamed_addr #0 !dbg !8 {
14 entry:
15 call void @llvm.dbg.value(metadata i32 %x, metadata !13, metadata !DIExpression()), !dbg !15
16 call void @llvm.dbg.value(metadata i32 %y, metadata !14, metadata !DIExpression()), !dbg !15
17 %add = add nsw i32 %y, %x, !dbg !16
18 ret i32 %add, !dbg !17
19 }
20
21 ; LLVM: declare void @llvm.dbg.value(metadata, metadata, metadata)
22 ; Function Attrs: nounwind readnone speculatable willreturn
23 declare void @llvm.dbg.value(metadata, metadata, metadata) #1
24
25 attributes #0 = { norecurse nounwind readnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
26 attributes #1 = { nounwind readnone speculatable willreturn }
27
28 !llvm.dbg.cu = !{!0}
29 !llvm.module.flags = !{!3, !4, !5}
30 !opencl.ocl.version = !{!6}
31 !llvm.ident = !{!7}
32
33 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 11.0.0 (https://github.com/llvm/llvm-project.git 05b4ff0a4b1a822449e9bf98782b9d337e6f81cf)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
34 !1 = !DIFile(filename: "test.cl", directory: "/users/nrudenko/LLVMv/runtests")
35 !2 = !{}
36 !3 = !{i32 7, !"Dwarf Version", i32 4}
37 !4 = !{i32 2, !"Debug Info Version", i32 3}
38 !5 = !{i32 1, !"wchar_size", i32 4}
39 !6 = !{i32 1, i32 0}
40 !7 = !{!"clang version 11.0.0 (https://github.com/llvm/llvm-project.git 05b4ff0a4b1a822449e9bf98782b9d337e6f81cf)"}
41 !8 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 1, type: !9, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
42 !9 = !DISubroutineType(types: !10)
43 !10 = !{!11, !11, !11}
44 !11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
45 !12 = !{!13, !14}
46 !13 = !DILocalVariable(name: "x", arg: 1, scope: !8, file: !1, line: 1, type: !11)
47 !14 = !DILocalVariable(name: "y", arg: 2, scope: !8, file: !1, line: 1, type: !11)
48 !15 = !DILocation(line: 0, scope: !8)
49 !16 = !DILocation(line: 3, column: 11, scope: !8)
50 !17 = !DILocation(line: 3, column: 3, scope: !8)