[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / test / CodeGen / BPF / BTF / func-non-void.ll
blobc09ee9a77c16f4886218b43680cf83baf62b7b83
1 ; RUN: llc -march=bpfel -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
2 ; RUN: llc -march=bpfeb -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
4 ; Source code:
5 ;   int f1(int a1) { return a1; }
6 ; Compilation flag:
7 ;   clang -target bpf -O2 -g -S -emit-llvm t.c
9 ; Function Attrs: nounwind readnone
10 define dso_local i32 @f1(i32 returned) local_unnamed_addr #0 !dbg !7 {
11   call void @llvm.dbg.value(metadata i32 %0, metadata !12, metadata !DIExpression()), !dbg !13
12   ret i32 %0, !dbg !14
15 ; CHECK:             .section        .BTF,"",@progbits
16 ; CHECK-NEXT:        .short  60319                   # 0xeb9f
17 ; CHECK-NEXT:        .byte   1
18 ; CHECK-NEXT:        .byte   0
19 ; CHECK-NEXT:        .long   24
20 ; CHECK-NEXT:        .long   0
21 ; CHECK-NEXT:        .long   48
22 ; CHECK-NEXT:        .long   48
23 ; CHECK-NEXT:        .long   26
24 ; CHECK-NEXT:        .long   1                       # BTF_KIND_INT(id = 1)
25 ; CHECK-NEXT:        .long   16777216                # 0x1000000
26 ; CHECK-NEXT:        .long   4
27 ; CHECK-NEXT:        .long   16777248                # 0x1000020
28 ; CHECK-NEXT:        .long   0                       # BTF_KIND_FUNC_PROTO(id = 2)
29 ; CHECK-NEXT:        .long   218103809               # 0xd000001
30 ; CHECK-NEXT:        .long   1
31 ; CHECK-NEXT:        .long   5
32 ; CHECK-NEXT:        .long   1
33 ; CHECK-NEXT:        .long   8                       # BTF_KIND_FUNC(id = 3)
34 ; CHECK-NEXT:        .long   201326592               # 0xc000000
35 ; CHECK-NEXT:        .long   2
36 ; CHECK-NEXT:        .byte   0                       # string offset=0
37 ; CHECK-NEXT:        .ascii  "int"                   # string offset=1
38 ; CHECK-NEXT:        .byte   0
39 ; CHECK-NEXT:        .ascii  "a1"                    # string offset=5
40 ; CHECK-NEXT:        .byte   0
41 ; CHECK-NEXT:        .ascii  "f1"                    # string offset=8
42 ; CHECK-NEXT:        .byte   0
43 ; CHECK-NEXT:        .ascii  ".text"                 # string offset=11
44 ; CHECK-NEXT:        .byte   0
45 ; CHECK-NEXT:        .ascii  "/tmp/t.c"              # string offset=17
46 ; CHECK-NEXT:        .byte   0
47 ; CHECK-NEXT:        .section        .BTF.ext,"",@progbits
48 ; CHECK-NEXT:        .short  60319                   # 0xeb9f
49 ; CHECK-NEXT:        .byte   1
50 ; CHECK-NEXT:        .byte   0
51 ; CHECK-NEXT:        .long   32
52 ; CHECK-NEXT:        .long   0
53 ; CHECK-NEXT:        .long   20
54 ; CHECK-NEXT:        .long   20
55 ; CHECK-NEXT:        .long   44
56 ; CHECK-NEXT:        .long   64
57 ; CHECK-NEXT:        .long   0
58 ; CHECK-NEXT:        .long   8                       # FuncInfo
59 ; CHECK-NEXT:        .long   11                      # FuncInfo section string offset=11
60 ; CHECK-NEXT:        .long   1
61 ; CHECK-NEXT:        .long   .Lfunc_begin0
62 ; CHECK-NEXT:        .long   3
63 ; CHECK-NEXT:        .long   16                      # LineInfo
64 ; CHECK-NEXT:        .long   11                      # LineInfo section string offset=11
65 ; CHECK-NEXT:        .long   2
66 ; CHECK-NEXT:        .long   .Lfunc_begin0
67 ; CHECK-NEXT:        .long   17
68 ; CHECK-NEXT:        .long   0
69 ; CHECK-NEXT:        .long   1024                    # Line 1 Col 0
70 ; CHECK-NEXT:        .long   .Ltmp{{[0-9]+}}
71 ; CHECK-NEXT:        .long   17
72 ; CHECK-NEXT:        .long   0
73 ; CHECK-NEXT:        .long   1042                    # Line 1 Col 18
75 ; Function Attrs: nounwind readnone speculatable
76 declare void @llvm.dbg.value(metadata, metadata, metadata) #1
78 attributes #0 = { nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "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" "unsafe-fp-math"="false" "use-soft-float"="false" }
79 attributes #1 = { nounwind readnone speculatable }
81 !llvm.dbg.cu = !{!0}
82 !llvm.module.flags = !{!3, !4, !5}
83 !llvm.ident = !{!6}
85 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 8.0.0 (trunk 345562) (llvm/trunk 345560)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, nameTableKind: None)
86 !1 = !DIFile(filename: "t.c", directory: "/tmp")
87 !2 = !{}
88 !3 = !{i32 2, !"Dwarf Version", i32 4}
89 !4 = !{i32 2, !"Debug Info Version", i32 3}
90 !5 = !{i32 1, !"wchar_size", i32 4}
91 !6 = !{!"clang version 8.0.0 (trunk 345562) (llvm/trunk 345560)"}
92 !7 = distinct !DISubprogram(name: "f1", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !11)
93 !8 = !DISubroutineType(types: !9)
94 !9 = !{!10, !10}
95 !10 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
96 !11 = !{!12}
97 !12 = !DILocalVariable(name: "a1", arg: 1, scope: !7, file: !1, line: 1, type: !10)
98 !13 = !DILocation(line: 1, column: 12, scope: !7)
99 !14 = !DILocation(line: 1, column: 18, scope: !7)