|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 |
1 | 2 | ; RUN: opt %s -S -passes=dse -o - | FileCheck %s --implicit-check-not="call void @llvm.dbg" |
2 | 3 | ; RUN: opt --try-experimental-debuginfo-iterators %s -S -passes=dse -o - | FileCheck %s --implicit-check-not="call void @llvm.dbg" |
3 | 4 |
|
|
15 | 16 | ;; fragment of the shortened store. |
16 | 17 | ;; |
17 | 18 | ; CHECK: #dbg_assign({{.*}}, ptr %g, !DIExpression(), |
18 | | -; CHECK: #dbg_assign(float 0.000000e+00, ![[#]], !DIExpression(DW_OP_LLVM_fragment, 64, 32), ![[ID:[0-9]+]], ptr %arrayidx.i, !DIExpression(), |
19 | | -; CHECK: #dbg_assign(float 0.000000e+00, ![[#]], !DIExpression(DW_OP_LLVM_fragment, 32, 32), ![[ID]], ptr %arrayidx3.i, !DIExpression(), |
20 | | -; CHECK: #dbg_assign(float 0.000000e+00, ![[#]], !DIExpression(DW_OP_LLVM_fragment, 0, 32), ![[UniqueID1:[0-9]+]], ptr poison, !DIExpression(), |
21 | | -; CHECK: #dbg_assign(float 0.000000e+00, ![[#]], !DIExpression(DW_OP_LLVM_fragment, 96, 32), ![[UniqueID2:[0-9]+]], ptr poison, !DIExpression(), |
22 | | -; CHECK: call void @llvm.memset{{.*}}, !DIAssignID ![[ID]] |
23 | 19 |
|
24 | | -; CHECK-DAG: ![[ID]] = distinct !DIAssignID() |
25 | | -; CHECK-DAG: ![[UniqueID1]] = distinct !DIAssignID() |
26 | | -; CHECK-DAG: ![[UniqueID2]] = distinct !DIAssignID() |
27 | 20 |
|
28 | 21 | %struct.v = type { [4 x float] } |
29 | 22 |
|
30 | 23 | $_ZN1vC2Ef = comdat any |
31 | 24 |
|
32 | 25 | define dso_local void @_Z1fv() local_unnamed_addr !dbg !7 { |
| 26 | +; CHECK-LABEL: define dso_local void @_Z1fv( |
| 27 | +; CHECK-SAME: ) local_unnamed_addr !dbg [[DBG8:![0-9]+]] { |
| 28 | +; CHECK-NEXT: [[ENTRY:.*:]] |
| 29 | +; CHECK-NEXT: [[G:%.*]] = alloca [[STRUCT_V:%.*]], align 4, !DIAssignID [[DIASSIGNID24:![0-9]+]] |
| 30 | +; CHECK-NEXT: #dbg_assign(i1 poison, [[META12:![0-9]+]], !DIExpression(), [[DIASSIGNID24]], ptr [[G]], !DIExpression(), [[META25:![0-9]+]]) |
| 31 | +; CHECK-NEXT: [[ARRAYIDX_I:%.*]] = getelementptr inbounds [[STRUCT_V]], ptr [[G]], i64 0, i32 0, i64 2, !dbg [[DBG26:![0-9]+]] |
| 32 | +; CHECK-NEXT: #dbg_assign(float 0.000000e+00, [[META12]], !DIExpression(DW_OP_LLVM_fragment, 64, 32), [[META34:![0-9]+]], ptr [[ARRAYIDX_I]], !DIExpression(), [[META25]]) |
| 33 | +; CHECK-NEXT: [[ARRAYIDX3_I:%.*]] = getelementptr inbounds [[STRUCT_V]], ptr [[G]], i64 0, i32 0, i64 1, !dbg [[DBG35:![0-9]+]] |
| 34 | +; CHECK-NEXT: #dbg_assign(float 0.000000e+00, [[META12]], !DIExpression(DW_OP_LLVM_fragment, 32, 32), [[META34]], ptr [[ARRAYIDX3_I]], !DIExpression(), [[META25]]) |
| 35 | +; CHECK-NEXT: [[ARRAYIDX5_I:%.*]] = getelementptr inbounds [[STRUCT_V]], ptr [[G]], i64 0, i32 0, i64 0, !dbg [[DBG36:![0-9]+]] |
| 36 | +; CHECK-NEXT: #dbg_assign(float 0.000000e+00, [[META12]], !DIExpression(DW_OP_LLVM_fragment, 0, 32), [[META37:![0-9]+]], ptr poison, !DIExpression(), [[META25]]) |
| 37 | +; CHECK-NEXT: [[ARRAYIDX7_I:%.*]] = getelementptr inbounds [[STRUCT_V]], ptr [[G]], i64 0, i32 0, i64 3, !dbg [[DBG38:![0-9]+]] |
| 38 | +; CHECK-NEXT: #dbg_assign(float 0.000000e+00, [[META12]], !DIExpression(DW_OP_LLVM_fragment, 96, 32), [[META39:![0-9]+]], ptr poison, !DIExpression(), [[META25]]) |
| 39 | +; CHECK-NEXT: [[TMP0:%.*]] = bitcast ptr [[ARRAYIDX5_I]] to ptr, !dbg [[DBG40:![0-9]+]] |
| 40 | +; CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds i8, ptr [[TMP0]], i64 4, !dbg [[DBG41:![0-9]+]] |
| 41 | +; CHECK-NEXT: call void @llvm.memset.p0.i64(ptr align 4 [[TMP1]], i8 0, i64 8, i1 false), !dbg [[DBG41]], !DIAssignID [[META34]] |
| 42 | +; CHECK-NEXT: [[ARRAYIDX7:%.*]] = getelementptr inbounds [[STRUCT_V]], ptr [[G]], i64 0, i32 0, i64 3, !dbg [[META25]] |
| 43 | +; CHECK-NEXT: store float 0.000000e+00, ptr [[ARRAYIDX7]], align 4, !dbg [[META25]], !DIAssignID [[DIASSIGNID42:![0-9]+]] |
| 44 | +; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [[STRUCT_V]], ptr [[G]], i64 0, i32 0, i64 0, !dbg [[META25]] |
| 45 | +; CHECK-NEXT: store float 0.000000e+00, ptr [[ARRAYIDX]], align 4, !dbg [[META25]], !DIAssignID [[DIASSIGNID43:![0-9]+]] |
| 46 | +; CHECK-NEXT: call void @_Z3escP1v(ptr nonnull [[G]]), !dbg [[DBG40]] |
| 47 | +; CHECK-NEXT: ret void, !dbg [[DBG44:![0-9]+]] |
| 48 | +; |
33 | 49 | entry: |
34 | 50 | %g = alloca %struct.v, align 4, !DIAssignID !23 |
35 | 51 | call void @llvm.dbg.assign(metadata i1 poison, metadata !11, metadata !DIExpression(), metadata !23, metadata ptr %g, metadata !DIExpression()), !dbg !24 |
36 | | - %arrayidx.i = getelementptr inbounds %struct.v, ptr %g, i64 0, i32 0, i64 2, !dbg !37 |
| 52 | + %arrayidx.i = getelementptr inbounds %struct.v, ptr %g, i64 0, i32 0, i64 2, !dbg !37 |
37 | 53 | call void @llvm.dbg.assign(metadata float 0.000000e+00, metadata !11, metadata !DIExpression(DW_OP_LLVM_fragment, 64, 32), metadata !39, metadata ptr %arrayidx.i, metadata !DIExpression()), !dbg !24 |
38 | 54 | %arrayidx3.i = getelementptr inbounds %struct.v, ptr %g, i64 0, i32 0, i64 1, !dbg !40 |
39 | 55 | call void @llvm.dbg.assign(metadata float 0.000000e+00, metadata !11, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 32), metadata !39, metadata ptr %arrayidx3.i, metadata !DIExpression()), !dbg !24 |
@@ -125,3 +141,45 @@ declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) |
125 | 141 | !65 = !DISubroutineType(types: !66) |
126 | 142 | !66 = !{null, !30} |
127 | 143 | !1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true} |
| 144 | +;. |
| 145 | +; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: [[META1:![0-9]+]], producer: "{{.*}}clang version {{.*}}", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: [[META2:![0-9]+]], splitDebugInlining: false, nameTableKind: None) |
| 146 | +; CHECK: [[META1]] = !DIFile(filename: "reduce.cpp", directory: {{.*}}) |
| 147 | +; CHECK: [[META2]] = !{} |
| 148 | +; CHECK: [[DBG8]] = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", scope: [[META1]], file: [[META1]], line: 12, type: [[META9:![0-9]+]], scopeLine: 12, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], retainedNodes: [[META11:![0-9]+]]) |
| 149 | +; CHECK: [[META9]] = !DISubroutineType(types: [[META10:![0-9]+]]) |
| 150 | +; CHECK: [[META10]] = !{null} |
| 151 | +; CHECK: [[META11]] = !{[[META12]]} |
| 152 | +; CHECK: [[META12]] = !DILocalVariable(name: "g", scope: [[DBG8]], file: [[META1]], line: 13, type: [[META13:![0-9]+]]) |
| 153 | +; CHECK: [[META13]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "v", file: [[META1]], line: 1, size: 128, flags: DIFlagTypePassByValue | DIFlagNonTrivial, elements: [[META14:![0-9]+]], identifier: "_ZTS1v") |
| 154 | +; CHECK: [[META14]] = !{[[META15:![0-9]+]], [[META20:![0-9]+]]} |
| 155 | +; CHECK: [[META15]] = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: [[META13]], file: [[META1]], line: 2, baseType: [[META16:![0-9]+]], size: 128) |
| 156 | +; CHECK: [[META16]] = !DICompositeType(tag: DW_TAG_array_type, baseType: [[META17:![0-9]+]], size: 128, elements: [[META18:![0-9]+]]) |
| 157 | +; CHECK: [[META17]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) |
| 158 | +; CHECK: [[META18]] = !{[[META19:![0-9]+]]} |
| 159 | +; CHECK: [[META19]] = !DISubrange(count: 4) |
| 160 | +; CHECK: [[META20]] = !DISubprogram(name: "v", scope: [[META13]], file: [[META1]], line: 4, type: [[META21:![0-9]+]], scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized) |
| 161 | +; CHECK: [[META21]] = !DISubroutineType(types: [[META22:![0-9]+]]) |
| 162 | +; CHECK: [[META22]] = !{null, [[META23:![0-9]+]], [[META17]]} |
| 163 | +; CHECK: [[META23]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[META13]], size: 64, flags: DIFlagArtificial | DIFlagObjectPointer) |
| 164 | +; CHECK: [[DIASSIGNID24]] = distinct !DIAssignID() |
| 165 | +; CHECK: [[META25]] = !DILocation(line: 0, scope: [[DBG8]]) |
| 166 | +; CHECK: [[DBG26]] = !DILocation(line: 5, column: 19, scope: [[META27:![0-9]+]], inlinedAt: [[META33:![0-9]+]]) |
| 167 | +; CHECK: [[META27]] = distinct !DILexicalBlock(scope: [[META28:![0-9]+]], file: [[META1]], line: 4, column: 14) |
| 168 | +; CHECK: [[META28]] = distinct !DISubprogram(name: "v", linkageName: "_ZN1vC2Ef", scope: [[META13]], file: [[META1]], line: 4, type: [[META21]], scopeLine: 4, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: [[META0]], declaration: [[META20]], retainedNodes: [[META29:![0-9]+]]) |
| 169 | +; CHECK: [[META29]] = !{[[META30:![0-9]+]], [[META32:![0-9]+]]} |
| 170 | +; CHECK: [[META30]] = !DILocalVariable(name: "this", arg: 1, scope: [[META28]], type: [[META31:![0-9]+]], flags: DIFlagArtificial | DIFlagObjectPointer) |
| 171 | +; CHECK: [[META31]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[META13]], size: 64) |
| 172 | +; CHECK: [[META32]] = !DILocalVariable(name: "d", arg: 2, scope: [[META28]], file: [[META1]], line: 4, type: [[META17]]) |
| 173 | +; CHECK: [[META33]] = distinct !DILocation(line: 13, column: 5, scope: [[DBG8]]) |
| 174 | +; CHECK: [[META34]] = distinct !DIAssignID() |
| 175 | +; CHECK: [[DBG35]] = !DILocation(line: 5, column: 12, scope: [[META27]], inlinedAt: [[META33]]) |
| 176 | +; CHECK: [[DBG36]] = !DILocation(line: 5, column: 5, scope: [[META27]], inlinedAt: [[META33]]) |
| 177 | +; CHECK: [[META37]] = distinct !DIAssignID() |
| 178 | +; CHECK: [[DBG38]] = !DILocation(line: 6, column: 5, scope: [[META27]], inlinedAt: [[META33]]) |
| 179 | +; CHECK: [[META39]] = distinct !DIAssignID() |
| 180 | +; CHECK: [[DBG40]] = !DILocation(line: 14, column: 3, scope: [[DBG8]]) |
| 181 | +; CHECK: [[DBG41]] = !DILocation(line: 5, column: 17, scope: [[META27]], inlinedAt: [[META33]]) |
| 182 | +; CHECK: [[DIASSIGNID42]] = distinct !DIAssignID() |
| 183 | +; CHECK: [[DIASSIGNID43]] = distinct !DIAssignID() |
| 184 | +; CHECK: [[DBG44]] = !DILocation(line: 15, column: 1, scope: [[DBG8]]) |
| 185 | +;. |
0 commit comments