1+ ; RUN: opt -S -passes=dbg-counter < %s 2>&1 | FileCheck %s
2+
3+ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
4+ target triple = "x86_64-unknown-linux-gnu"
5+
6+ ; CHECK: Function: main
7+ ; CHECK-NEXT: #dbg_value: 30
8+ ; CHECK-NEXT: #dbg_declare: 0
9+ ; CHECK-NEXT: #dbg_assign: 0
10+
11+ %struct.student = type { [50 x i8 ], i32 , float }
12+
13+ @s = dso_local local_unnamed_addr global [10 x %struct.student ] zeroinitializer , align 16 , !dbg !0
14+
15+ define dso_local noundef i32 @main () local_unnamed_addr #0 !dbg !28 {
16+ #dbg_value(i32 2 , !32 , !DIExpression (), !43 )
17+ #dbg_value(i32 3 , !33 , !DIExpression (), !43 )
18+ #dbg_value(i32 4 , !34 , !DIExpression (), !43 )
19+ #dbg_value(ptr poison, !35 , !DIExpression (), !43 )
20+ #dbg_value(ptr poison, !37 , !DIExpression (), !43 )
21+ #dbg_value(ptr poison, !38 , !DIExpression (), !43 )
22+ #dbg_value(i32 5 , !34 , !DIExpression (), !43 )
23+ #dbg_value(i32 0 , !39 , !DIExpression (), !44 )
24+ #dbg_value(i64 0 , !39 , !DIExpression (), !44 )
25+ store i32 6 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 52 ), align 4 , !dbg !45 , !tbaa !48
26+ #dbg_value(i64 1 , !39 , !DIExpression (), !44 )
27+ store i32 7 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 112 ), align 16 , !dbg !54 , !tbaa !48
28+ #dbg_value(i64 2 , !39 , !DIExpression (), !44 )
29+ store i32 8 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 172 ), align 4 , !dbg !55 , !tbaa !48
30+ #dbg_value(i64 3 , !39 , !DIExpression (), !44 )
31+ store i32 9 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 232 ), align 8 , !dbg !56 , !tbaa !48
32+ #dbg_value(i64 4 , !39 , !DIExpression (), !44 )
33+ store i32 10 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 292 ), align 4 , !dbg !57 , !tbaa !48
34+ #dbg_value(i64 5 , !39 , !DIExpression (), !44 )
35+ store i32 11 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 352 ), align 16 , !dbg !58 , !tbaa !48
36+ #dbg_value(i64 6 , !39 , !DIExpression (), !44 )
37+ store i32 12 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 412 ), align 4 , !dbg !59 , !tbaa !48
38+ #dbg_value(i64 7 , !39 , !DIExpression (), !44 )
39+ store i32 13 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 472 ), align 8 , !dbg !60 , !tbaa !48
40+ #dbg_value(i64 8 , !39 , !DIExpression (), !44 )
41+ store i32 14 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 532 ), align 4 , !dbg !61 , !tbaa !48
42+ #dbg_value(i64 9 , !39 , !DIExpression (), !44 )
43+ store i32 15 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 592 ), align 16 , !dbg !62 , !tbaa !48
44+ #dbg_value(i64 10 , !39 , !DIExpression (), !44 )
45+ #dbg_value(i64 0 , !41 , !DIExpression (), !63 )
46+ %1 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 56 ), align 8 , !dbg !64 , !tbaa !67
47+ %2 = fadd float %1 , 1 .000000e+00 , !dbg !68
48+ store float %2 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 56 ), align 8 , !dbg !69 , !tbaa !67
49+ #dbg_value(i64 1 , !41 , !DIExpression (), !63 )
50+ %3 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 116 ), align 4 , !dbg !64 , !tbaa !67
51+ %4 = fadd float %3 , 1 .000000e+00 , !dbg !70
52+ store float %4 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 116 ), align 4 , !dbg !71 , !tbaa !67
53+ #dbg_value(i64 2 , !41 , !DIExpression (), !63 )
54+ %5 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 176 ), align 16 , !dbg !64 , !tbaa !67
55+ %6 = fadd float %5 , 1 .000000e+00 , !dbg !72
56+ store float %6 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 176 ), align 16 , !dbg !73 , !tbaa !67
57+ #dbg_value(i64 3 , !41 , !DIExpression (), !63 )
58+ %7 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 236 ), align 4 , !dbg !64 , !tbaa !67
59+ %8 = fadd float %7 , 1 .000000e+00 , !dbg !74
60+ store float %8 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 236 ), align 4 , !dbg !75 , !tbaa !67
61+ #dbg_value(i64 4 , !41 , !DIExpression (), !63 )
62+ %9 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 296 ), align 8 , !dbg !64 , !tbaa !67
63+ %10 = fadd float %9 , 1 .000000e+00 , !dbg !76
64+ store float %10 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 296 ), align 8 , !dbg !77 , !tbaa !67
65+ #dbg_value(i64 5 , !41 , !DIExpression (), !63 )
66+ %11 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 356 ), align 4 , !dbg !64 , !tbaa !67
67+ %12 = fadd float %11 , 1 .000000e+00 , !dbg !78
68+ store float %12 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 356 ), align 4 , !dbg !79 , !tbaa !67
69+ #dbg_value(i64 6 , !41 , !DIExpression (), !63 )
70+ %13 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 416 ), align 16 , !dbg !64 , !tbaa !67
71+ %14 = fadd float %13 , 1 .000000e+00 , !dbg !80
72+ store float %14 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 416 ), align 16 , !dbg !81 , !tbaa !67
73+ #dbg_value(i64 7 , !41 , !DIExpression (), !63 )
74+ %15 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 476 ), align 4 , !dbg !64 , !tbaa !67
75+ %16 = fadd float %15 , 1 .000000e+00 , !dbg !82
76+ store float %16 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 476 ), align 4 , !dbg !83 , !tbaa !67
77+ #dbg_value(i64 8 , !41 , !DIExpression (), !63 )
78+ %17 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 536 ), align 8 , !dbg !64 , !tbaa !67
79+ %18 = fadd float %17 , 1 .000000e+00 , !dbg !84
80+ store float %18 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 536 ), align 8 , !dbg !85 , !tbaa !67
81+ #dbg_value(i64 9 , !41 , !DIExpression (), !63 )
82+ %19 = load float , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 596 ), align 4 , !dbg !64 , !tbaa !67
83+ %20 = fadd float %19 , 1 .000000e+00 , !dbg !86
84+ store float %20 , ptr getelementptr inbounds nuw (i8 , ptr @s , i64 596 ), align 4 , !dbg !87 , !tbaa !67
85+ #dbg_value(i64 10 , !41 , !DIExpression (), !63 )
86+ ret i32 0 , !dbg !88
87+ }
88+
89+ attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width" ="0" "no-trapping-math" ="true" "stack-protector-buffer-size" ="8" "target-cpu" ="x86-64" "target-features" ="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu" ="generic" }
90+
91+ !llvm.dbg.cu = !{!2 }
92+ !llvm.module.flags = !{!20 , !21 , !22 , !23 , !24 , !25 , !26 }
93+ !llvm.ident = !{!27 }
94+
95+ !0 = !DIGlobalVariableExpression (var: !1 , expr: !DIExpression ())
96+ !1 = distinct !DIGlobalVariable (name: "s" , scope: !2 , file: !5 , line: 8 , type: !6 , isLocal: false , isDefinition: true )
97+ !2 = distinct !DICompileUnit (language: DW_LANG_C_plus_plus_14, file: !3 , producer: "clang version 22.0.0git (https://github.com/anamaoh/llvm-project.git 782a91e1fc94d9c82495f60afc5ed5edd72de776)" , isOptimized: true , runtimeVersion: 0 , emissionKind: FullDebug, globals: !4 , splitDebugInlining: false , nameTableKind: None)
98+ !3 = !DIFile (filename: "/home/ana-marija/Documents/load.cpp" , directory: "/home/ana-marija/Desktop/LLVM/llvm-project" , checksumkind: CSK_MD5, checksum: "1bce1e274606359bd3ee799e44db5ab7" )
99+ !4 = !{!0 }
100+ !5 = !DIFile (filename: "Documents/load.cpp" , directory: "/home/ana-marija" , checksumkind: CSK_MD5, checksum: "1bce1e274606359bd3ee799e44db5ab7" )
101+ !6 = !DICompositeType (tag: DW_TAG_array_type, baseType: !7 , size: 4800 , elements: !18 )
102+ !7 = distinct !DICompositeType (tag: DW_TAG_structure_type, name: "student" , file: !5 , line: 3 , size: 480 , flags: DIFlagTypePassByValue, elements: !8 , identifier: "_ZTS7student" )
103+ !8 = !{!9 , !14 , !16 }
104+ !9 = !DIDerivedType (tag: DW_TAG_member, name: "name" , scope: !7 , file: !5 , line: 5 , baseType: !10 , size: 400 )
105+ !10 = !DICompositeType (tag: DW_TAG_array_type, baseType: !11 , size: 400 , elements: !12 )
106+ !11 = !DIBasicType (name: "char" , size: 8 , encoding: DW_ATE_signed_char)
107+ !12 = !{!13 }
108+ !13 = !DISubrange (count: 50 )
109+ !14 = !DIDerivedType (tag: DW_TAG_member, name: "roll" , scope: !7 , file: !5 , line: 6 , baseType: !15 , size: 32 , offset: 416 )
110+ !15 = !DIBasicType (name: "int" , size: 32 , encoding: DW_ATE_signed)
111+ !16 = !DIDerivedType (tag: DW_TAG_member, name: "marks" , scope: !7 , file: !5 , line: 7 , baseType: !17 , size: 32 , offset: 448 )
112+ !17 = !DIBasicType (name: "float" , size: 32 , encoding: DW_ATE_float)
113+ !18 = !{!19 }
114+ !19 = !DISubrange (count: 10 )
115+ !20 = !{i32 7 , !"Dwarf Version" , i32 5 }
116+ !21 = !{i32 2 , !"Debug Info Version" , i32 3 }
117+ !22 = !{i32 1 , !"wchar_size" , i32 4 }
118+ !23 = !{i32 8 , !"PIC Level" , i32 2 }
119+ !24 = !{i32 7 , !"PIE Level" , i32 2 }
120+ !25 = !{i32 7 , !"uwtable" , i32 2 }
121+ !26 = !{i32 7 , !"debug-info-assignment-tracking" , i1 true }
122+ !27 = !{!"clang version 22.0.0git (https://github.com/anamaoh/llvm-project.git 782a91e1fc94d9c82495f60afc5ed5edd72de776)" }
123+ !28 = distinct !DISubprogram (name: "main" , scope: !5 , file: !5 , line: 10 , type: !29 , scopeLine: 11 , flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2 , retainedNodes: !31 , keyInstructions: true )
124+ !29 = !DISubroutineType (types: !30 )
125+ !30 = !{!15 }
126+ !31 = !{!32 , !33 , !34 , !35 , !37 , !38 , !39 , !41 }
127+ !32 = !DILocalVariable (name: "x" , scope: !28 , file: !5 , line: 12 , type: !15 )
128+ !33 = !DILocalVariable (name: "y" , scope: !28 , file: !5 , line: 12 , type: !15 )
129+ !34 = !DILocalVariable (name: "z" , scope: !28 , file: !5 , line: 12 , type: !15 )
130+ !35 = !DILocalVariable (name: "px" , scope: !28 , file: !5 , line: 13 , type: !36 )
131+ !36 = !DIDerivedType (tag: DW_TAG_pointer_type, baseType: !15 , size: 64 )
132+ !37 = !DILocalVariable (name: "py" , scope: !28 , file: !5 , line: 13 , type: !36 )
133+ !38 = !DILocalVariable (name: "pz" , scope: !28 , file: !5 , line: 13 , type: !36 )
134+ !39 = !DILocalVariable (name: "i" , scope: !40 , file: !5 , line: 17 , type: !15 )
135+ !40 = distinct !DILexicalBlock (scope: !28 , file: !5 , line: 17 , column: 5 )
136+ !41 = !DILocalVariable (name: "i" , scope: !42 , file: !5 , line: 23 , type: !15 )
137+ !42 = distinct !DILexicalBlock (scope: !28 , file: !5 , line: 23 , column: 5 )
138+ !43 = !DILocation (line: 0 , scope: !28 )
139+ !44 = !DILocation (line: 0 , scope: !40 )
140+ !45 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 11 , atomRank: 1 )
141+ !46 = distinct !DILexicalBlock (scope: !47 , file: !5 , line: 18 , column: 5 )
142+ !47 = distinct !DILexicalBlock (scope: !40 , file: !5 , line: 17 , column: 5 )
143+ !48 = !{!49 , !52 , i64 52 }
144+ !49 = !{!"_ZTS7student" , !50 , i64 0 , !52 , i64 52 , !53 , i64 56 }
145+ !50 = !{!"omnipotent char" , !51 , i64 0 }
146+ !51 = !{!"Simple C++ TBAA" }
147+ !52 = !{!"int" , !50 , i64 0 }
148+ !53 = !{!"float" , !50 , i64 0 }
149+ !54 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 26 , atomRank: 1 )
150+ !55 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 29 , atomRank: 1 )
151+ !56 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 32 , atomRank: 1 )
152+ !57 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 35 , atomRank: 1 )
153+ !58 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 38 , atomRank: 1 )
154+ !59 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 41 , atomRank: 1 )
155+ !60 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 44 , atomRank: 1 )
156+ !61 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 47 , atomRank: 1 )
157+ !62 = !DILocation (line: 19 , column: 19 , scope: !46 , atomGroup: 50 , atomRank: 1 )
158+ !63 = !DILocation (line: 0 , scope: !42 )
159+ !64 = !DILocation (line: 25 , column: 19 , scope: !65 )
160+ !65 = distinct !DILexicalBlock (scope: !66 , file: !5 , line: 24 , column: 5 )
161+ !66 = distinct !DILexicalBlock (scope: !42 , file: !5 , line: 23 , column: 5 )
162+ !67 = !{!49 , !53 , i64 56 }
163+ !68 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 17 , atomRank: 2 )
164+ !69 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 17 , atomRank: 1 )
165+ !70 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 53 , atomRank: 2 )
166+ !71 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 53 , atomRank: 1 )
167+ !72 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 57 , atomRank: 2 )
168+ !73 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 57 , atomRank: 1 )
169+ !74 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 61 , atomRank: 2 )
170+ !75 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 61 , atomRank: 1 )
171+ !76 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 65 , atomRank: 2 )
172+ !77 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 65 , atomRank: 1 )
173+ !78 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 69 , atomRank: 2 )
174+ !79 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 69 , atomRank: 1 )
175+ !80 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 73 , atomRank: 2 )
176+ !81 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 73 , atomRank: 1 )
177+ !82 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 77 , atomRank: 2 )
178+ !83 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 77 , atomRank: 1 )
179+ !84 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 81 , atomRank: 2 )
180+ !85 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 81 , atomRank: 1 )
181+ !86 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 85 , atomRank: 2 )
182+ !87 = !DILocation (line: 25 , column: 19 , scope: !65 , atomGroup: 85 , atomRank: 1 )
183+ !88 = !DILocation (line: 28 , column: 5 , scope: !28 , atomGroup: 21 , atomRank: 1 )
0 commit comments