|
1 |
| -; RUN: llc < %s -filetype=obj | llvm-readobj --codeview - | FileCheck %s --check-prefix=OBJ |
| 1 | +; RUN: llc < %s -filetype=obj -arm-atomic-cfg-tidy=0 | llvm-readobj --codeview - | FileCheck %s --check-prefix=OBJ |
2 | 2 |
|
3 | 3 | ; Generated from:
|
4 | 4 |
|
@@ -57,64 +57,58 @@ target triple = "thumbv7-pc-windows-msvc19.11.0"
|
57 | 57 |
|
58 | 58 | @x = dso_local global i32 0, align 4, !dbg !0
|
59 | 59 |
|
60 |
| -; Function Attrs: noinline nounwind optnone |
61 | 60 | define dso_local arm_aapcs_vfpcc void @f(i32 %p) !dbg !14 {
|
62 | 61 | entry:
|
63 | 62 | %p.addr = alloca i32, align 4
|
64 | 63 | %a = alloca i32, align 4
|
65 | 64 | %b = alloca i32, align 4
|
66 | 65 | %c = alloca i32, align 4
|
67 | 66 | store i32 %p, ptr %p.addr, align 4
|
68 |
| - call void @llvm.dbg.declare(metadata ptr %p.addr, metadata !17, metadata !DIExpression()), !dbg !18 |
| 67 | + #dbg_declare(ptr %p.addr, !17, !DIExpression(), !18) |
69 | 68 | %0 = load i32, ptr %p.addr, align 4, !dbg !19
|
70 | 69 | %tobool = icmp ne i32 %0, 0, !dbg !19
|
| 70 | + %call = call arm_aapcs_vfpcc i32 @getint(), !dbg !20 |
71 | 71 | br i1 %tobool, label %if.then, label %if.else, !dbg !19
|
72 | 72 |
|
73 | 73 | if.then: ; preds = %entry
|
74 |
| - call void @llvm.dbg.declare(metadata ptr %a, metadata !20, metadata !DIExpression()), !dbg !23 |
75 |
| - %call = call arm_aapcs_vfpcc i32 @getint(), !dbg !23 |
76 |
| - store i32 %call, ptr %a, align 4, !dbg !23 |
77 |
| - call void @llvm.dbg.declare(metadata ptr %b, metadata !24, metadata !DIExpression()), !dbg !25 |
78 |
| - %1 = load i32, ptr %a, align 4, !dbg !25 |
79 |
| - %call1 = call arm_aapcs_vfpcc i32 @inlineinc(i32 %1), !dbg !25 |
80 |
| - store i32 %call1, ptr %b, align 4, !dbg !25 |
81 |
| - %2 = load i32, ptr %b, align 4, !dbg !26 |
82 |
| - call arm_aapcs_vfpcc void @putint(i32 %2), !dbg !26 |
83 |
| - br label %if.end, !dbg !27 |
| 74 | + #dbg_declare(ptr %a, !22, !DIExpression(), !24) |
| 75 | + store i32 %call, ptr %a, align 4, !dbg !24 |
| 76 | + #dbg_declare(ptr %b, !25, !DIExpression(), !26) |
| 77 | + %1 = load i32, ptr %a, align 4, !dbg !26 |
| 78 | + %call1 = call arm_aapcs_vfpcc i32 @inlineinc(i32 %1), !dbg !26 |
| 79 | + store i32 %call1, ptr %b, align 4, !dbg !26 |
| 80 | + %2 = load i32, ptr %b, align 4, !dbg !27 |
| 81 | + br label %if.end, !dbg !28 |
84 | 82 |
|
85 | 83 | if.else: ; preds = %entry
|
86 |
| - call void @llvm.dbg.declare(metadata ptr %c, metadata !28, metadata !DIExpression()), !dbg !30 |
87 |
| - %call2 = call arm_aapcs_vfpcc i32 @getint(), !dbg !30 |
88 |
| - store i32 %call2, ptr %c, align 4, !dbg !30 |
89 |
| - %3 = load i32, ptr %c, align 4, !dbg !31 |
90 |
| - call arm_aapcs_vfpcc void @putint(i32 %3), !dbg !31 |
91 |
| - br label %if.end, !dbg !32 |
| 84 | + #dbg_declare(ptr %c, !29, !DIExpression(), !31) |
| 85 | + store i32 %call, ptr %c, align 4, !dbg !31 |
| 86 | + %3 = load i32, ptr %c, align 4, !dbg !32 |
| 87 | + br label %if.end, !dbg !33 |
92 | 88 |
|
93 | 89 | if.end: ; preds = %if.else, %if.then
|
94 |
| - ret void, !dbg !33 |
| 90 | + %.sink = phi i32 [ %3, %if.else ], [ %2, %if.then ] |
| 91 | + call arm_aapcs_vfpcc void @putint(i32 %.sink), !dbg !20 |
| 92 | + ret void, !dbg !34 |
95 | 93 | }
|
96 | 94 |
|
97 |
| -; Function Attrs: nounwind readnone speculatable willreturn |
98 |
| -declare void @llvm.dbg.declare(metadata, metadata, metadata) |
99 |
| - |
100 | 95 | declare dso_local arm_aapcs_vfpcc i32 @getint()
|
101 | 96 |
|
102 |
| -; Function Attrs: noinline nounwind optnone |
103 |
| -define internal arm_aapcs_vfpcc i32 @inlineinc(i32 %a) !dbg !34 { |
| 97 | +define internal arm_aapcs_vfpcc i32 @inlineinc(i32 %a) !dbg !35 { |
104 | 98 | entry:
|
105 | 99 | %a.addr = alloca i32, align 4
|
106 | 100 | %b = alloca i32, align 4
|
107 | 101 | store i32 %a, ptr %a.addr, align 4
|
108 |
| - call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !37, metadata !DIExpression()), !dbg !38 |
109 |
| - call void @llvm.dbg.declare(metadata ptr %b, metadata !39, metadata !DIExpression()), !dbg !40 |
110 |
| - %0 = load i32, ptr %a.addr, align 4, !dbg !40 |
111 |
| - %add = add nsw i32 %0, 1, !dbg !40 |
112 |
| - store i32 %add, ptr %b, align 4, !dbg !40 |
113 |
| - %1 = load volatile i32, ptr @x, align 4, !dbg !41 |
114 |
| - %inc = add nsw i32 %1, 1, !dbg !41 |
115 |
| - store volatile i32 %inc, ptr @x, align 4, !dbg !41 |
116 |
| - %2 = load i32, ptr %b, align 4, !dbg !42 |
117 |
| - ret i32 %2, !dbg !42 |
| 102 | + #dbg_declare(ptr %a.addr, !38, !DIExpression(), !39) |
| 103 | + #dbg_declare(ptr %b, !40, !DIExpression(), !41) |
| 104 | + %0 = load i32, ptr %a.addr, align 4, !dbg !41 |
| 105 | + %add = add nsw i32 %0, 1, !dbg !41 |
| 106 | + store i32 %add, ptr %b, align 4, !dbg !41 |
| 107 | + %1 = load volatile i32, ptr @x, align 4, !dbg !42 |
| 108 | + %inc = add nsw i32 %1, 1, !dbg !42 |
| 109 | + store volatile i32 %inc, ptr @x, align 4, !dbg !42 |
| 110 | + %2 = load i32, ptr %b, align 4, !dbg !43 |
| 111 | + ret i32 %2, !dbg !43 |
118 | 112 | }
|
119 | 113 |
|
120 | 114 | declare dso_local arm_aapcs_vfpcc void @putint(i32)
|
@@ -143,26 +137,27 @@ declare dso_local arm_aapcs_vfpcc void @putint(i32)
|
143 | 137 | !17 = !DILocalVariable(name: "p", arg: 1, scope: !14, file: !6, line: 9, type: !8)
|
144 | 138 | !18 = !DILocation(line: 9, scope: !14)
|
145 | 139 | !19 = !DILocation(line: 10, scope: !14)
|
146 |
| -!20 = !DILocalVariable(name: "a", scope: !21, file: !6, line: 11, type: !8) |
147 |
| -!21 = distinct !DILexicalBlock(scope: !22, file: !6, line: 10) |
148 |
| -!22 = distinct !DILexicalBlock(scope: !14, file: !6, line: 10) |
149 |
| -!23 = !DILocation(line: 11, scope: !21) |
150 |
| -!24 = !DILocalVariable(name: "b", scope: !21, file: !6, line: 12, type: !8) |
151 |
| -!25 = !DILocation(line: 12, scope: !21) |
152 |
| -!26 = !DILocation(line: 13, scope: !21) |
153 |
| -!27 = !DILocation(line: 14, scope: !21) |
154 |
| -!28 = !DILocalVariable(name: "c", scope: !29, file: !6, line: 15, type: !8) |
155 |
| -!29 = distinct !DILexicalBlock(scope: !22, file: !6, line: 14) |
156 |
| -!30 = !DILocation(line: 15, scope: !29) |
157 |
| -!31 = !DILocation(line: 16, scope: !29) |
158 |
| -!32 = !DILocation(line: 17, scope: !29) |
159 |
| -!33 = !DILocation(line: 18, scope: !14) |
160 |
| -!34 = distinct !DISubprogram(name: "inlineinc", scope: !6, file: !6, line: 4, type: !35, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !2, retainedNodes: !4) |
161 |
| -!35 = !DISubroutineType(types: !36) |
162 |
| -!36 = !{!8, !8} |
163 |
| -!37 = !DILocalVariable(name: "a", arg: 1, scope: !34, file: !6, line: 4, type: !8) |
164 |
| -!38 = !DILocation(line: 4, scope: !34) |
165 |
| -!39 = !DILocalVariable(name: "b", scope: !34, file: !6, line: 5, type: !8) |
166 |
| -!40 = !DILocation(line: 5, scope: !34) |
167 |
| -!41 = !DILocation(line: 6, scope: !34) |
168 |
| -!42 = !DILocation(line: 7, scope: !34) |
| 140 | +!20 = !DILocation(line: 0, scope: !21) |
| 141 | +!21 = distinct !DILexicalBlock(scope: !14, file: !6, line: 10) |
| 142 | +!22 = !DILocalVariable(name: "a", scope: !23, file: !6, line: 11, type: !8) |
| 143 | +!23 = distinct !DILexicalBlock(scope: !21, file: !6, line: 10) |
| 144 | +!24 = !DILocation(line: 11, scope: !23) |
| 145 | +!25 = !DILocalVariable(name: "b", scope: !23, file: !6, line: 12, type: !8) |
| 146 | +!26 = !DILocation(line: 12, scope: !23) |
| 147 | +!27 = !DILocation(line: 13, scope: !23) |
| 148 | +!28 = !DILocation(line: 14, scope: !23) |
| 149 | +!29 = !DILocalVariable(name: "c", scope: !30, file: !6, line: 15, type: !8) |
| 150 | +!30 = distinct !DILexicalBlock(scope: !21, file: !6, line: 14) |
| 151 | +!31 = !DILocation(line: 15, scope: !30) |
| 152 | +!32 = !DILocation(line: 16, scope: !30) |
| 153 | +!33 = !DILocation(line: 17, scope: !30) |
| 154 | +!34 = !DILocation(line: 18, scope: !14) |
| 155 | +!35 = distinct !DISubprogram(name: "inlineinc", scope: !6, file: !6, line: 4, type: !36, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !2, retainedNodes: !4) |
| 156 | +!36 = !DISubroutineType(types: !37) |
| 157 | +!37 = !{!8, !8} |
| 158 | +!38 = !DILocalVariable(name: "a", arg: 1, scope: !35, file: !6, line: 4, type: !8) |
| 159 | +!39 = !DILocation(line: 4, scope: !35) |
| 160 | +!40 = !DILocalVariable(name: "b", scope: !35, file: !6, line: 5, type: !8) |
| 161 | +!41 = !DILocation(line: 5, scope: !35) |
| 162 | +!42 = !DILocation(line: 6, scope: !35) |
| 163 | +!43 = !DILocation(line: 7, scope: !35) |
0 commit comments