[llvm] 4ff8d1e - [NFC][DebugInfo] assignment-tracking/sroa: do check !DIAssignID, and the metadata

Roman Lebedev via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 10:21:23 PST 2022


Author: Roman Lebedev
Date: 2022-12-15T21:21:03+03:00
New Revision: 4ff8d1e315bdd26daae8a6928aa46e347fe0d6eb

URL: https://github.com/llvm/llvm-project/commit/4ff8d1e315bdd26daae8a6928aa46e347fe0d6eb
DIFF: https://github.com/llvm/llvm-project/commit/4ff8d1e315bdd26daae8a6928aa46e347fe0d6eb.diff

LOG: [NFC][DebugInfo] assignment-tracking/sroa: do check !DIAssignID, and the metadata

Based on post-commit feedback for the original change.

Added: 
    

Modified: 
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll
    llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll
index 651f45f8af0c..45ffac9338a7 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt %s -S -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s
 
 ;; Check that SROA preserves the InlinedAt status of new dbg.assign intriniscs
@@ -40,6 +40,10 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 declare void @llvm.lifetime.start.p0i8(i64 immarg, ptr nocapture) #2
 declare void @llvm.lifetime.end.p0i8(i64 immarg, ptr nocapture) #2
 
+;.
+; CHECK: @[[F:[a-zA-Z0-9_$"\\.-]+]] = dso_local local_unnamed_addr global i32 0, align 4, !dbg [[DBG0:![0-9]+]]
+; CHECK: @[[E:[a-zA-Z0-9_$"\\.-]+]] = dso_local local_unnamed_addr global i32 0, align 4, !dbg [[DBG9:![0-9]+]]
+;.
 define dso_local void @l() local_unnamed_addr #4 !dbg !73 {
 ; CHECK-LABEL: @l(
 ; CHECK-NEXT:  entry:
@@ -145,3 +149,52 @@ entry:
 !81 = !DILocation(line: 14, column: 5, scope: !40, inlinedAt: !79)
 !82 = !DILocation(line: 20, column: 1, scope: !60, inlinedAt: !76)
 !83 = !DILocation(line: 21, column: 17, scope: !73)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; CHECK: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "f", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
+; CHECK: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META3:![0-9]+]] = !DIFile(filename: "test.c", directory: "/")
+; CHECK: [[META4:![0-9]+]] = !{}
+; CHECK: [[META5:![0-9]+]] = !{!6, !9, !0}
+; CHECK: [[META6:![0-9]+]] = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
+; CHECK: [[META7:![0-9]+]] = distinct !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
+; CHECK: [[META8:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[DBG9]] = !DIGlobalVariableExpression(var: !10, expr: !DIExpression())
+; CHECK: [[META10:![0-9]+]] = distinct !DIGlobalVariable(name: "e", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
+; CHECK: [[META11:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META12:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META13:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META14:![0-9]+]] = !{!"clang version 12.0.0)"}
+; CHECK: [[META15:![0-9]+]] = distinct !DISubprogram(name: "l", scope: !3, file: !3, line: 21, type: !16, scopeLine: 21, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !4)
+; CHECK: [[META16:![0-9]+]] = !DISubroutineType(types: !17)
+; CHECK: [[META17:![0-9]+]] = !{null}
+; CHECK: [[META18]] = !DILocalVariable(name: "j", scope: !19, file: !3, line: 17, type: !21)
+; CHECK: [[META19:![0-9]+]] = distinct !DISubprogram(name: "k", scope: !3, file: !3, line: 16, type: !16, scopeLine: 16, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !20)
+; CHECK: [[META20:![0-9]+]] = !{!18}
+; CHECK: [[META21:![0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "c", file: !3, line: 4, baseType: !22)
+; CHECK: [[META22:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !3, line: 1, size: 32, elements: !23)
+; CHECK: [[META23:![0-9]+]] = !{!24, !25}
+; CHECK: [[META24:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !22, file: !3, line: 2, baseType: !8, size: 32)
+; CHECK: [[META25:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !22, file: !3, line: 3, baseType: !26, offset: 32)
+; CHECK: [[META26:![0-9]+]] = !DICompositeType(tag: DW_TAG_array_type, baseType: !8, elements: !27)
+; CHECK: [[META27:![0-9]+]] = !{!28}
+; CHECK: [[META28:![0-9]+]] = !DISubrange(count: -1)
+; CHECK: [[META29]] = distinct !DIAssignID()
+; CHECK: [[DBG30]] = !DILocation(line: 0, scope: !19, inlinedAt: !31)
+; CHECK: [[META31:![0-9]+]] = distinct !DILocation(line: 21, column: 12, scope: !15)
+; CHECK: [[DBG32]] = !DILocation(line: 0, scope: !33, inlinedAt: !41)
+; CHECK: [[META33:![0-9]+]] = distinct !DISubprogram(name: "i", scope: !3, file: !3, line: 10, type: !34, scopeLine: 10, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !37)
+; CHECK: [[META34:![0-9]+]] = !DISubroutineType(types: !35)
+; CHECK: [[META35:![0-9]+]] = !{null, !36}
+; CHECK: [[META36:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !21, size: 64)
+; CHECK: [[META37:![0-9]+]] = !{!38, !39}
+; CHECK: [[META38:![0-9]+]] = !DILocalVariable(name: "h", arg: 1, scope: !33, file: !3, line: 10, type: !36)
+; CHECK: [[META39:![0-9]+]] = !DILocalVariable(name: "j", scope: !33, file: !3, line: 11, type: !40)
+; CHECK: [[META40:![0-9]+]] = !DIBasicType(name: "long int", size: 64, encoding: DW_ATE_signed)
+; CHECK: [[META41:![0-9]+]] = distinct !DILocation(line: 19, column: 3, scope: !19, inlinedAt: !31)
+; CHECK: [[DBG42]] = !DILocation(line: 14, column: 5, scope: !33, inlinedAt: !41)
+; CHECK: [[DBG43]] = !DILocation(line: 21, column: 17, scope: !15)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll
index 9d89512a2c57..032653920e5e 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -passes=sroa,verify -S %s -o - -experimental-assignment-tracking \
 ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
 
@@ -23,11 +23,14 @@ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16
 
 @c = dso_local global i32 0, align 4, !dbg !0
 
+;.
+; CHECK: @[[C:[a-zA-Z0-9_$"\\.-]+]] = dso_local global i32 0, align 4, !dbg [[DBG0:![0-9]+]]
+;.
 define dso_local void @d() !dbg !11 {
 ; CHECK-LABEL: @d(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_SROA_0:%.*]] = alloca i64, align 8, !DIAssignID !23
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META15:![0-9]+]], metadata !DIExpression(), metadata [[META23:![0-9]+]], metadata ptr [[A_SROA_0]], metadata !DIExpression()), !dbg [[DBG24:![0-9]+]]
+; CHECK-NEXT:    [[A_SROA_0:%.*]] = alloca i64, align 8, !DIAssignID [[DIASSIGNID23:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META15:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID23]], metadata ptr [[A_SROA_0]], metadata !DIExpression()), !dbg [[DBG24:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 8, ptr [[A_SROA_0]]), !dbg [[DBG25:![0-9]+]]
 ; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @c, align 4, !dbg [[DBG26:![0-9]+]]
 ; CHECK-NEXT:    [[CONV:%.*]] = sext i32 [[TMP0]] to i64, !dbg [[DBG26]]
@@ -89,3 +92,38 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !27 = !DILocation(line: 7, column: 3, scope: !11)
 !28 = !DILocation(line: 7, column: 18, scope: !11)
 !33 = !DILocation(line: 8, column: 1, scope: !11)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; CHECK: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "c", scope: !2, file: !3, line: 4, type: !6, isLocal: false, isDefinition: true)
+; CHECK: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META3:![0-9]+]] = !DIFile(filename: "test.c", directory: "/")
+; CHECK: [[META4:![0-9]+]] = !{}
+; CHECK: [[META5:![0-9]+]] = !{!0}
+; CHECK: [[META6:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[META7:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META8:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META9:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META10:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META11:![0-9]+]] = distinct !DISubprogram(name: "d", scope: !3, file: !3, line: 5, type: !12, scopeLine: 5, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !14)
+; CHECK: [[META12:![0-9]+]] = !DISubroutineType(types: !13)
+; CHECK: [[META13:![0-9]+]] = !{null}
+; CHECK: [[META14:![0-9]+]] = !{!15}
+; CHECK: [[META15]] = !DILocalVariable(name: "a", scope: !11, file: !3, line: 6, type: !16)
+; CHECK: [[META16:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "a", file: !3, line: 1, size: 64, elements: !17)
+; CHECK: [[META17:![0-9]+]] = !{!18}
+; CHECK: [[META18:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !16, file: !3, line: 2, baseType: !19, size: 64)
+; CHECK: [[META19:![0-9]+]] = !DICompositeType(tag: DW_TAG_array_type, baseType: !20, size: 64, elements: !21)
+; CHECK: [[META20:![0-9]+]] = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
+; CHECK: [[META21:![0-9]+]] = !{!22}
+; CHECK: [[META22:![0-9]+]] = !DISubrange(count: 8)
+; CHECK: [[DIASSIGNID23]] = distinct !DIAssignID()
+; CHECK: [[DBG24]] = !DILocation(line: 0, scope: !11)
+; CHECK: [[DBG25]] = !DILocation(line: 6, column: 3, scope: !11)
+; CHECK: [[DBG26]] = !DILocation(line: 7, column: 18, scope: !11)
+; CHECK: [[DBG27]] = !DILocation(line: 7, column: 3, scope: !11)
+; CHECK: [[DBG28]] = !DILocation(line: 8, column: 1, scope: !11)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
index 7e9b1e3bad07..511387a00558 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -passes=sroa -S -o - %s -experimental-assignment-tracking | FileCheck %s
 ;
 ;; Based on llvm/test/DebugInfo/ARM/sroa-complex.ll
@@ -73,3 +73,26 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !18 = distinct !DIAssignID()
 !19 = distinct !DIAssignID()
 !20 = !DILocation(line: 2, column: 36, scope: !8)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META1:![0-9]+]] = !DIFile(filename: "test.c", directory: "/")
+; CHECK: [[META2:![0-9]+]] = !{}
+; CHECK: [[META3:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META4:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META5:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META6:![0-9]+]] = !{i32 1, !"min_enum_size", i32 4}
+; CHECK: [[META7:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META8:![0-9]+]] = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 2, type: !9, scopeLine: 2, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
+; CHECK: [[META9:![0-9]+]] = !DISubroutineType(types: !10)
+; CHECK: [[META10:![0-9]+]] = !{null, !11}
+; CHECK: [[META11:![0-9]+]] = !DIBasicType(name: "complex", size: 128, encoding: DW_ATE_complex_float)
+; CHECK: [[META12:![0-9]+]] = !{!13}
+; CHECK: [[META13]] = !DILocalVariable(name: "c", arg: 1, scope: !8, file: !1, line: 2, type: !11)
+; CHECK: [[META14]] = distinct !DIAssignID()
+; CHECK: [[DBG15]] = !DILocation(line: 0, scope: !8)
+; CHECK: [[META16]] = distinct !DIAssignID()
+; CHECK: [[META17]] = distinct !DIAssignID()
+; CHECK: [[DBG18]] = !DILocation(line: 2, column: 36, scope: !8)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll
index dc153f98c490..ada9eec25534 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -passes=sroa -S %s -o - -experimental-assignment-tracking | FileCheck %s
 
 ;; $ cat test.cpp
@@ -112,17 +112,17 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 define dso_local void @_Z1jv() local_unnamed_addr #4 !dbg !57 {
 ; CHECK-LABEL: @_Z1jv(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[CONVEXBODY:%.*]] = alloca [[CLASS_H:%.*]], align 1, !DIAssignID !69
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META57:![0-9]+]], metadata !DIExpression(), metadata [[META69:![0-9]+]], metadata ptr [[CONVEXBODY]], metadata !DIExpression()), !dbg [[DBG70:![0-9]+]]
-; CHECK-NEXT:    [[K:%.*]] = alloca [[CLASS_H]], align 1, !DIAssignID !71
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META64:![0-9]+]], metadata !DIExpression(), metadata [[META71:![0-9]+]], metadata ptr [[K]], metadata !DIExpression()), !dbg [[DBG70]]
-; CHECK-NEXT:    [[L:%.*]] = alloca [[CLASS_B:%.*]], align 4, !DIAssignID !72
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META65:![0-9]+]], metadata !DIExpression(), metadata [[META72:![0-9]+]], metadata ptr [[L]], metadata !DIExpression()), !dbg [[DBG70]]
-; CHECK-NEXT:    [[M:%.*]] = alloca [[CLASS_B]], align 4, !DIAssignID !73
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META66:![0-9]+]], metadata !DIExpression(), metadata [[META73:![0-9]+]], metadata ptr [[M]], metadata !DIExpression()), !dbg [[DBG70]]
+; CHECK-NEXT:    [[CONVEXBODY:%.*]] = alloca [[CLASS_H:%.*]], align 1, !DIAssignID [[DIASSIGNID69:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META57:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID69]], metadata ptr [[CONVEXBODY]], metadata !DIExpression()), !dbg [[DBG70:![0-9]+]]
+; CHECK-NEXT:    [[K:%.*]] = alloca [[CLASS_H]], align 1, !DIAssignID [[DIASSIGNID71:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META64:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID71]], metadata ptr [[K]], metadata !DIExpression()), !dbg [[DBG70]]
+; CHECK-NEXT:    [[L:%.*]] = alloca [[CLASS_B:%.*]], align 4, !DIAssignID [[DIASSIGNID72:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META65:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID72]], metadata ptr [[L]], metadata !DIExpression()), !dbg [[DBG70]]
+; CHECK-NEXT:    [[M:%.*]] = alloca [[CLASS_B]], align 4, !DIAssignID [[DIASSIGNID73:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META66:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID73]], metadata ptr [[M]], metadata !DIExpression()), !dbg [[DBG70]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META67:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32), metadata [[META74:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG70]]
-; CHECK-NEXT:    [[O:%.*]] = alloca [[CLASS_A:%.*]], align 4, !DIAssignID !75
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META68:![0-9]+]], metadata !DIExpression(), metadata [[META75:![0-9]+]], metadata ptr [[O]], metadata !DIExpression()), !dbg [[DBG70]]
+; CHECK-NEXT:    [[O:%.*]] = alloca [[CLASS_A:%.*]], align 4, !DIAssignID [[DIASSIGNID75:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META68:![0-9]+]], metadata !DIExpression(), metadata [[DIASSIGNID75]], metadata ptr [[O]], metadata !DIExpression()), !dbg [[DBG70]]
 ; CHECK-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[CLASS_H]], ptr [[CONVEXBODY]], i64 0, i32 0, !dbg [[DBG76:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 1, ptr nonnull [[TMP0]]), !dbg [[DBG76]]
 ; CHECK-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[CLASS_H]], ptr [[K]], i64 0, i32 0, !dbg [[DBG76]]
@@ -143,11 +143,11 @@ define dso_local void @_Z1jv() local_unnamed_addr #4 !dbg !57 {
 ; CHECK-NEXT:    call void @llvm.dbg.value(metadata <2 x float> [[AGG_TMP_SROA_2_0_COPYLOAD_I]], metadata [[META67]], metadata !DIExpression(DW_OP_LLVM_fragment, 96, 64)), !dbg [[DBG70]]
 ; CHECK-NEXT:    [[TMP4:%.*]] = bitcast ptr [[O]] to ptr, !dbg [[DBG82:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 16, ptr nonnull [[TMP4]]), !dbg [[DBG82]]
-; CHECK-NEXT:    store <2 x float> [[AGG_TMP_SROA_0_0_COPYLOAD_I]], ptr [[TMP4]], align 4, !dbg [[DBG83:![0-9]+]], !DIAssignID !84
+; CHECK-NEXT:    store <2 x float> [[AGG_TMP_SROA_0_0_COPYLOAD_I]], ptr [[TMP4]], align 4, !dbg [[DBG83:![0-9]+]], !DIAssignID [[DIASSIGNID84:![0-9]+]]
 ; CHECK-NEXT:    [[N_SROA_4_4__SROA_IDX:%.*]] = getelementptr inbounds i8, ptr [[TMP4]], i64 8, !dbg [[DBG83]]
-; CHECK-NEXT:    store <2 x float> [[AGG_TMP_SROA_2_0_COPYLOAD_I]], ptr [[N_SROA_4_4__SROA_IDX]], align 4, !dbg [[DBG83]], !DIAssignID !85
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata <2 x float> [[AGG_TMP_SROA_0_0_COPYLOAD_I]], metadata [[META68]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64), metadata [[META84:![0-9]+]], metadata ptr [[TMP4]], metadata !DIExpression()), !dbg [[DBG70]]
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata <2 x float> [[AGG_TMP_SROA_2_0_COPYLOAD_I]], metadata [[META68]], metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64), metadata [[META85:![0-9]+]], metadata ptr [[N_SROA_4_4__SROA_IDX]], metadata !DIExpression()), !dbg [[DBG70]]
+; CHECK-NEXT:    store <2 x float> [[AGG_TMP_SROA_2_0_COPYLOAD_I]], ptr [[N_SROA_4_4__SROA_IDX]], align 4, !dbg [[DBG83]], !DIAssignID [[DIASSIGNID85:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata <2 x float> [[AGG_TMP_SROA_0_0_COPYLOAD_I]], metadata [[META68]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64), metadata [[DIASSIGNID84]], metadata ptr [[TMP4]], metadata !DIExpression()), !dbg [[DBG70]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata <2 x float> [[AGG_TMP_SROA_2_0_COPYLOAD_I]], metadata [[META68]], metadata !DIExpression(DW_OP_LLVM_fragment, 64, 64), metadata [[DIASSIGNID85]], metadata ptr [[N_SROA_4_4__SROA_IDX]], metadata !DIExpression()), !dbg [[DBG70]]
 ; CHECK-NEXT:    call void @_ZN1a1cEv(ptr nonnull [[O]]), !dbg [[DBG86:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 16, ptr nonnull [[TMP4]]), !dbg [[DBG87:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 20, ptr nonnull [[TMP3]]), !dbg [[DBG87]]
@@ -329,3 +329,102 @@ declare void @llvm.lifetime.end.p0i8(i64 immarg, ptr nocapture) #1
 !100 = !DILocation(line: 24, column: 1, scope: !57)
 !101 = !DILocation(line: 9, column: 19, scope: !93)
 !102 = !DILocation(line: 9, column: 12, scope: !93)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META1:![0-9]+]] = !DIFile(filename: "reduce.cpp", directory: "/")
+; CHECK: [[META2:![0-9]+]] = !{}
+; CHECK: [[META3:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META4:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META5:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META6:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META7:![0-9]+]] = distinct !DISubprogram(name: "operator*", linkageName: "_ZNK1BmlERKS_", scope: !8, file: !1, line: 14, type: !33, scopeLine: 14, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !32, retainedNodes: !38)
+; CHECK: [[META8:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !1, line: 6, size: 160, flags: DIFlagTypePassByValue | DIFlagNonTrivial, elements: !9, identifier: "_ZTS1B")
+; CHECK: [[META9:![0-9]+]] = !{!10, !12, !24, !28, !32}
+; CHECK: [[META10:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "g", scope: !8, file: !1, line: 11, baseType: !11, size: 32, flags: DIFlagPublic)
+; CHECK: [[META11:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[META12:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "e", scope: !8, file: !1, line: 12, baseType: !13, size: 128, offset: 32, flags: DIFlagPublic)
+; CHECK: [[META13:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "a", file: !1, line: 1, size: 128, flags: DIFlagTypePassByValue, elements: !14, identifier: "_ZTS1a")
+; CHECK: [[META14:![0-9]+]] = !{!15, !20}
+; CHECK: [[META15:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !13, file: !1, line: 3, baseType: !16, size: 128, flags: DIFlagPublic)
+; CHECK: [[META16:![0-9]+]] = !DICompositeType(tag: DW_TAG_array_type, baseType: !17, size: 128, elements: !18)
+; CHECK: [[META17:![0-9]+]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
+; CHECK: [[META18:![0-9]+]] = !{!19}
+; CHECK: [[META19:![0-9]+]] = !DISubrange(count: 4)
+; CHECK: [[META20:![0-9]+]] = !DISubprogram(name: "c", linkageName: "_ZN1a1cEv", scope: !13, file: !1, line: 4, type: !21, scopeLine: 4, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META21:![0-9]+]] = !DISubroutineType(types: !22)
+; CHECK: [[META22:![0-9]+]] = !{null, !23}
+; CHECK: [[META23:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META24:![0-9]+]] = !DISubprogram(name: "B", scope: !8, file: !1, line: 8, type: !25, scopeLine: 8, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META25:![0-9]+]] = !DISubroutineType(types: !26)
+; CHECK: [[META26:![0-9]+]] = !{null, !27, !13}
+; CHECK: [[META27:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META28:![0-9]+]] = !DISubprogram(name: "f", linkageName: "_ZN1B1fEv", scope: !8, file: !1, line: 9, type: !29, scopeLine: 9, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META29:![0-9]+]] = !DISubroutineType(types: !30)
+; CHECK: [[META30:![0-9]+]] = !{!31, !27}
+; CHECK: [[META31:![0-9]+]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !13, size: 64)
+; CHECK: [[META32:![0-9]+]] = !DISubprogram(name: "operator*", linkageName: "_ZNK1BmlERKS_", scope: !8, file: !1, line: 10, type: !33, scopeLine: 10, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META33:![0-9]+]] = !DISubroutineType(types: !34)
+; CHECK: [[META34:![0-9]+]] = !{!8, !35, !37}
+; CHECK: [[META35:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META36:![0-9]+]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: !8)
+; CHECK: [[META37:![0-9]+]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !36, size: 64)
+; CHECK: [[META38:![0-9]+]] = !{!39, !41}
+; CHECK: [[META39:![0-9]+]] = !DILocalVariable(name: "this", arg: 1, scope: !7, type: !40, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META40:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !36, size: 64)
+; CHECK: [[META41:![0-9]+]] = !DILocalVariable(arg: 2, scope: !7, file: !1, line: 14, type: !37)
+; CHECK: [[DBG42]] = !DILocation(line: 14, column: 41, scope: !7)
+; CHECK: [[DBG43]] = !DILocation(line: 8, column: 12, scope: !44, inlinedAt: !49)
+; CHECK: [[META44:![0-9]+]] = distinct !DISubprogram(name: "B", linkageName: "_ZN1BC2E1a", scope: !8, file: !1, line: 8, type: !25, scopeLine: 8, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !24, retainedNodes: !45)
+; CHECK: [[META45:![0-9]+]] = !{!46, !48}
+; CHECK: [[META46:![0-9]+]] = !DILocalVariable(name: "this", arg: 1, scope: !44, type: !47, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META47:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !8, size: 64)
+; CHECK: [[META48:![0-9]+]] = !DILocalVariable(name: "d", arg: 2, scope: !44, file: !1, line: 8, type: !13)
+; CHECK: [[META49:![0-9]+]] = distinct !DILocation(line: 14, column: 41, scope: !7)
+; CHECK: [[DBG50]] = !DILocation(line: 14, column: 34, scope: !7)
+; CHECK: [[DBG51]] = !DILocation(line: 8, column: 12, scope: !44)
+; CHECK: [[DBG52]] = !DILocation(line: 8, column: 18, scope: !44)
+; CHECK: [[META53:![0-9]+]] = distinct !DISubprogram(name: "j", linkageName: "_Z1jv", scope: !1, file: !1, line: 19, type: !54, scopeLine: 19, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !56)
+; CHECK: [[META54:![0-9]+]] = !DISubroutineType(types: !55)
+; CHECK: [[META55:![0-9]+]] = !{null}
+; CHECK: [[META56:![0-9]+]] = !{!57, !64, !65, !66, !67, !68}
+; CHECK: [[META57]] = !DILocalVariable(name: "convexbody", scope: !53, file: !1, line: 20, type: !58)
+; CHECK: [[META58:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "h", file: !1, line: 15, size: 8, flags: DIFlagTypePassByValue, elements: !59, identifier: "_ZTS1h")
+; CHECK: [[META59:![0-9]+]] = !{!60}
+; CHECK: [[META60:![0-9]+]] = !DISubprogram(name: "i", linkageName: "_ZN1h1iEv", scope: !58, file: !1, line: 17, type: !61, scopeLine: 17, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META61:![0-9]+]] = !DISubroutineType(types: !62)
+; CHECK: [[META62:![0-9]+]] = !{!8, !63}
+; CHECK: [[META63:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !58, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META64]] = !DILocalVariable(name: "k", scope: !53, file: !1, line: 20, type: !58)
+; CHECK: [[META65]] = !DILocalVariable(name: "l", scope: !53, file: !1, line: 21, type: !8)
+; CHECK: [[META66]] = !DILocalVariable(name: "m", scope: !53, file: !1, line: 21, type: !8)
+; CHECK: [[META67]] = !DILocalVariable(name: "n", scope: !53, file: !1, line: 21, type: !8)
+; CHECK: [[META68]] = !DILocalVariable(name: "o", scope: !53, file: !1, line: 22, type: !13)
+; CHECK: [[DIASSIGNID69]] = distinct !DIAssignID()
+; CHECK: [[DBG70]] = !DILocation(line: 0, scope: !53)
+; CHECK: [[DIASSIGNID71]] = distinct !DIAssignID()
+; CHECK: [[DIASSIGNID72]] = distinct !DIAssignID()
+; CHECK: [[DIASSIGNID73]] = distinct !DIAssignID()
+; CHECK: [[META74]] = distinct !DIAssignID()
+; CHECK: [[DIASSIGNID75]] = distinct !DIAssignID()
+; CHECK: [[DBG76]] = !DILocation(line: 20, column: 3, scope: !53)
+; CHECK: [[DBG77]] = !DILocation(line: 21, column: 3, scope: !53)
+; CHECK: [[DBG78]] = !DILocation(line: 21, column: 11, scope: !53)
+; CHECK: [[DBG79]] = !DILocation(line: 21, column: 31, scope: !53)
+; CHECK: [[DBG80]] = !DILocation(line: 14, column: 41, scope: !7, inlinedAt: !81)
+; CHECK: [[META81:![0-9]+]] = distinct !DILocation(line: 21, column: 42, scope: !53)
+; CHECK: [[DBG82]] = !DILocation(line: 22, column: 3, scope: !53)
+; CHECK: [[DBG83]] = !DILocation(line: 22, column: 9, scope: !53)
+; CHECK: [[DIASSIGNID84]] = distinct !DIAssignID()
+; CHECK: [[DIASSIGNID85]] = distinct !DIAssignID()
+; CHECK: [[DBG86]] = !DILocation(line: 23, column: 5, scope: !53)
+; CHECK: [[DBG87]] = !DILocation(line: 24, column: 1, scope: !53)
+; CHECK: [[META88:![0-9]+]] = distinct !DISubprogram(name: "f", linkageName: "_ZN1B1fEv", scope: !8, file: !1, line: 9, type: !29, scopeLine: 9, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !28, retainedNodes: !89)
+; CHECK: [[META89:![0-9]+]] = !{!90}
+; CHECK: [[META90:![0-9]+]] = !DILocalVariable(name: "this", arg: 1, scope: !88, type: !47, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[DBG91]] = !DILocation(line: 9, column: 19, scope: !88)
+; CHECK: [[DBG92]] = !DILocation(line: 9, column: 12, scope: !88)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll
index add2e1443e8d..bbb113c6a909 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt %s -S -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s
 
 ;; $ cat test.cpp
@@ -117,3 +117,40 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !34 = !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", scope: !1, file: !1, line: 4, type: !35, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
 !35 = !DISubroutineType(types: !36)
 !36 = !{!13}
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META1:![0-9]+]] = !DIFile(filename: "reduce.cpp", directory: "/")
+; CHECK: [[META2:![0-9]+]] = !{}
+; CHECK: [[META3:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META4:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META5:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META6:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META7:![0-9]+]] = distinct !DISubprogram(name: "d", linkageName: "_Z1dv", scope: !1, file: !1, line: 5, type: !8, scopeLine: 5, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !10)
+; CHECK: [[META8:![0-9]+]] = !DISubroutineType(types: !9)
+; CHECK: [[META9:![0-9]+]] = !{null}
+; CHECK: [[META10:![0-9]+]] = !{!11}
+; CHECK: [[META11]] = !DILocalVariable(name: "a", scope: !7, file: !1, line: 6, type: !12)
+; CHECK: [[META12:![0-9]+]] = !DICompositeType(tag: DW_TAG_array_type, baseType: !13, size: 384, elements: !20)
+; CHECK: [[META13:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "c", file: !1, line: 1, size: 128, flags: DIFlagTypePassByValue, elements: !14, identifier: "_ZTS1c")
+; CHECK: [[META14:![0-9]+]] = !{!15}
+; CHECK: [[META15:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !13, file: !1, line: 2, baseType: !16, size: 128)
+; CHECK: [[META16:![0-9]+]] = !DICompositeType(tag: DW_TAG_array_type, baseType: !17, size: 128, elements: !18)
+; CHECK: [[META17:![0-9]+]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
+; CHECK: [[META18:![0-9]+]] = !{!19}
+; CHECK: [[META19:![0-9]+]] = !DISubrange(count: 4)
+; CHECK: [[META20:![0-9]+]] = !{!21}
+; CHECK: [[META21:![0-9]+]] = !DISubrange(count: 3)
+; CHECK: [[META22]] = distinct !DIAssignID()
+; CHECK: [[DBG23]] = !DILocation(line: 0, scope: !7)
+; CHECK: [[DBG24]] = !DILocation(line: 7, column: 10, scope: !7)
+; CHECK: [[META25]] = distinct !DIAssignID()
+; CHECK: [[META26]] = distinct !DIAssignID()
+; CHECK: [[DBG27]] = !DILocation(line: 8, column: 1, scope: !7)
+; CHECK: [[META28:![0-9]+]] = !DISubprogram(name: "fn1", linkageName: "_Z3fn1v", scope: !1, file: !1, line: 4, type: !29, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2)
+; CHECK: [[META29:![0-9]+]] = !DISubroutineType(types: !30)
+; CHECK: [[META30:![0-9]+]] = !{!13}
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll
index afa1b831fe8f..7052e1f86e5b 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -passes=sroa -S %s -o - -experimental-assignment-tracking | FileCheck %s
 
 ;; Check that multiple dbg.assign intrinsics linked to a store that is getting
@@ -38,6 +38,11 @@ $_ZN1aC2EiRf = comdat any
 @c = dso_local local_unnamed_addr global i32 0, align 4, !dbg !9
 
 ; Function Attrs: nounwind readonly uwtable
+;.
+; CHECK: @[[B:[a-zA-Z0-9_$"\\.-]+]] = dso_local local_unnamed_addr global float 0.000000e+00, align 4, !dbg [[DBG0:![0-9]+]]
+; CHECK: @[[D:[a-zA-Z0-9_$"\\.-]+]] = dso_local local_unnamed_addr global float 0.000000e+00, align 4, !dbg [[DBG6:![0-9]+]]
+; CHECK: @[[C:[a-zA-Z0-9_$"\\.-]+]] = dso_local local_unnamed_addr global i32 0, align 4, !dbg [[DBG9:![0-9]+]]
+;.
 define dso_local void @_Z1fv() local_unnamed_addr #0 !dbg !16 {
 ; CHECK-LABEL: @_Z1fv(
 ; CHECK-NEXT:  entry:
@@ -201,3 +206,71 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !68 = distinct !DIAssignID()
 !69 = distinct !DIAssignID()
 !70 = !DILocation(line: 3, column: 20, scope: !42)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; CHECK: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "b", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
+; CHECK: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META3:![0-9]+]] = !DIFile(filename: "reduce.cpp", directory: "")
+; CHECK: [[META4:![0-9]+]] = !{}
+; CHECK: [[META5:![0-9]+]] = !{!0, !6, !9}
+; CHECK: [[DBG6]] = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
+; CHECK: [[META7:![0-9]+]] = distinct !DIGlobalVariable(name: "d", scope: !2, file: !3, line: 5, type: !8, isLocal: false, isDefinition: true)
+; CHECK: [[META8:![0-9]+]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
+; CHECK: [[DBG9]] = !DIGlobalVariableExpression(var: !10, expr: !DIExpression())
+; CHECK: [[META10:![0-9]+]] = distinct !DIGlobalVariable(name: "c", scope: !2, file: !3, line: 6, type: !11, isLocal: false, isDefinition: true)
+; CHECK: [[META11:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[META12:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META13:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META14:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META15:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META16:![0-9]+]] = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", scope: !3, file: !3, line: 7, type: !17, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !19)
+; CHECK: [[META17:![0-9]+]] = !DISubroutineType(types: !18)
+; CHECK: [[META18:![0-9]+]] = !{null}
+; CHECK: [[META19:![0-9]+]] = !{!20}
+; CHECK: [[META20]] = !DILocalVariable(name: "e", scope: !16, file: !3, line: 8, type: !8)
+; CHECK: [[DBG21]] = !DILocation(line: 9, column: 7, scope: !22)
+; CHECK: [[META22:![0-9]+]] = distinct !DILexicalBlock(scope: !16, file: !3, line: 9, column: 7)
+; CHECK: [[DBG23]] = !DILocation(line: 9, column: 7, scope: !16)
+; CHECK: [[DBG24]] = !DILocation(line: 10, column: 9, scope: !22)
+; CHECK: [[META25]] = distinct !DIAssignID()
+; CHECK: [[DBG26]] = !DILocation(line: 0, scope: !16)
+; CHECK: [[DBG27]] = !DILocation(line: 10, column: 5, scope: !22)
+; CHECK: [[DBG28]] = !DILocation(line: 12, column: 9, scope: !22)
+; CHECK: [[DBG29]] = !DILocation(line: 12, column: 13, scope: !22)
+; CHECK: [[DBG30]] = !DILocation(line: 12, column: 11, scope: !22)
+; CHECK: [[DBG31]] = !DILocation(line: 0, scope: !22)
+; CHECK: [[DBG32]] = !DILocation(line: 13, column: 5, scope: !16)
+; CHECK: [[META33]] = !DILocalVariable(name: "this", arg: 1, scope: !34, type: !45, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META34:![0-9]+]] = distinct !DISubprogram(name: "a", linkageName: "_ZN1aC2EiRf", scope: !35, file: !3, line: 3, type: !38, scopeLine: 3, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, declaration: !37, retainedNodes: !42)
+; CHECK: [[META35:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "a", file: !3, line: 1, size: 8, flags: DIFlagTypePassByValue | DIFlagNonTrivial, elements: !36, identifier: "_ZTS1a")
+; CHECK: [[META36:![0-9]+]] = !{!37}
+; CHECK: [[META37:![0-9]+]] = !DISubprogram(name: "a", scope: !35, file: !3, line: 3, type: !38, scopeLine: 3, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META38:![0-9]+]] = !DISubroutineType(types: !39)
+; CHECK: [[META39:![0-9]+]] = !{null, !40, !11, !41}
+; CHECK: [[META40:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !35, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META41:![0-9]+]] = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !8, size: 64)
+; CHECK: [[META42:![0-9]+]] = !{!33, !43, !44}
+; CHECK: [[META43]] = !DILocalVariable(arg: 2, scope: !34, file: !3, line: 3, type: !11)
+; CHECK: [[META44]] = !DILocalVariable(arg: 3, scope: !34, file: !3, line: 3, type: !41)
+; CHECK: [[META45:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !35, size: 64)
+; CHECK: [[META46]] = distinct !DIAssignID()
+; CHECK: [[DBG47]] = !DILocation(line: 0, scope: !34, inlinedAt: !48)
+; CHECK: [[META48:![0-9]+]] = distinct !DILocation(line: 13, column: 3, scope: !16)
+; CHECK: [[META49]] = distinct !DIAssignID()
+; CHECK: [[META50]] = distinct !DIAssignID()
+; CHECK: [[META51]] = distinct !DIAssignID()
+; CHECK: [[META52]] = distinct !DIAssignID()
+; CHECK: [[META53]] = distinct !DIAssignID()
+; CHECK: [[DBG54]] = !DILocation(line: 14, column: 1, scope: !16)
+; CHECK: [[META55]] = distinct !DIAssignID()
+; CHECK: [[DBG56]] = !DILocation(line: 0, scope: !34)
+; CHECK: [[META57]] = distinct !DIAssignID()
+; CHECK: [[META58]] = distinct !DIAssignID()
+; CHECK: [[META59]] = distinct !DIAssignID()
+; CHECK: [[META60]] = distinct !DIAssignID()
+; CHECK: [[META61]] = distinct !DIAssignID()
+; CHECK: [[DBG62]] = !DILocation(line: 3, column: 20, scope: !34)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll
index 9bba4495375b..ae5a1bfd659a 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -passes=sroa,verify -S %s -o - -experimental-assignment-tracking \
 ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
 
@@ -39,21 +39,24 @@ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16
 @From = dso_local global %struct.LargeStruct zeroinitializer, align 4, !dbg !0
 
 ; Function Attrs: nounwind uwtable mustprogress
+;.
+; CHECK: @[[FROM:[a-zA-Z0-9_$"\\.-]+]] = dso_local global [[STRUCT_LARGESTRUCT:%.*]] zeroinitializer, align 4, !dbg [[DBG0:![0-9]+]]
+;.
 define dso_local i32 @_Z7examplev() #0 !dbg !20 {
 ; CHECK-LABEL: @_Z7examplev(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[TO_SROA_0:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID !25
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META24:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[META25:![0-9]+]], metadata ptr [[TO_SROA_0]], metadata !DIExpression()), !dbg [[DBG26:![0-9]+]]
-; CHECK-NEXT:    [[TO_SROA_4:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID !27
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META24]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[META27:![0-9]+]], metadata ptr [[TO_SROA_4]], metadata !DIExpression()), !dbg [[DBG26]]
+; CHECK-NEXT:    [[TO_SROA_0:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID [[DIASSIGNID25:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META24:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[DIASSIGNID25]], metadata ptr [[TO_SROA_0]], metadata !DIExpression()), !dbg [[DBG26:![0-9]+]]
+; CHECK-NEXT:    [[TO_SROA_4:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID [[DIASSIGNID27:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META24]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[DIASSIGNID27]], metadata ptr [[TO_SROA_4]], metadata !DIExpression()), !dbg [[DBG26]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 12, ptr [[TO_SROA_0]]), !dbg [[DBG28:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 12, ptr [[TO_SROA_4]]), !dbg [[DBG28]]
-; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TO_SROA_0]], ptr align 4 @From, i64 12, i1 false), !dbg [[DBG29:![0-9]+]], !DIAssignID !30
+; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TO_SROA_0]], ptr align 4 @From, i64 12, i1 false), !dbg [[DBG29:![0-9]+]], !DIAssignID [[DIASSIGNID30:![0-9]+]]
 ; CHECK-NEXT:    [[TO_SROA_3_0_COPYLOAD:%.*]] = load i32, ptr getelementptr inbounds (i8, ptr @From, i64 12), align 4, !dbg [[DBG29]]
-; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TO_SROA_4]], ptr align 4 getelementptr inbounds (i8, ptr @From, i64 16), i64 12, i1 false), !dbg [[DBG29]], !DIAssignID !31
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META24]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[META30:![0-9]+]], metadata ptr [[TO_SROA_0]], metadata !DIExpression()), !dbg [[DBG29]]
+; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 8 [[TO_SROA_4]], ptr align 4 getelementptr inbounds (i8, ptr @From, i64 16), i64 12, i1 false), !dbg [[DBG29]], !DIAssignID [[DIASSIGNID31:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META24]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[DIASSIGNID30]], metadata ptr [[TO_SROA_0]], metadata !DIExpression()), !dbg [[DBG29]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i32 [[TO_SROA_3_0_COPYLOAD]], metadata [[META24]], metadata !DIExpression(DW_OP_LLVM_fragment, 96, 32), metadata [[META32:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG29]]
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META24]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[META31:![0-9]+]], metadata ptr [[TO_SROA_4]], metadata !DIExpression()), !dbg [[DBG29]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META24]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[DIASSIGNID31]], metadata ptr [[TO_SROA_4]], metadata !DIExpression()), !dbg [[DBG29]]
 ; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 12, ptr [[TO_SROA_0]]), !dbg [[DBG33:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 12, ptr [[TO_SROA_4]]), !dbg [[DBG33]]
 ; CHECK-NEXT:    ret i32 [[TO_SROA_3_0_COPYLOAD]], !dbg [[DBG34:![0-9]+]]
@@ -123,3 +126,44 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !35 = !DILocation(line: 9, column: 13, scope: !20)
 !38 = !DILocation(line: 10, column: 1, scope: !20)
 !39 = !DILocation(line: 9, column: 3, scope: !20)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; CHECK: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "From", scope: !2, file: !3, line: 6, type: !6, isLocal: false, isDefinition: true)
+; CHECK: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META3:![0-9]+]] = !DIFile(filename: "sroa-test.cpp", directory: "/")
+; CHECK: [[META4:![0-9]+]] = !{}
+; CHECK: [[META5:![0-9]+]] = !{!0}
+; CHECK: [[META6:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "LargeStruct", file: !3, line: 1, size: 224, flags: DIFlagTypePassByValue, elements: !7, identifier: "_ZTS11LargeStruct")
+; CHECK: [[META7:![0-9]+]] = !{!8, !10, !11, !12, !13, !14, !15}
+; CHECK: [[META8:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !6, file: !3, line: 2, baseType: !9, size: 32)
+; CHECK: [[META9:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[META10:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "B", scope: !6, file: !3, line: 2, baseType: !9, size: 32, offset: 32)
+; CHECK: [[META11:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "C", scope: !6, file: !3, line: 2, baseType: !9, size: 32, offset: 64)
+; CHECK: [[META12:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "Var", scope: !6, file: !3, line: 3, baseType: !9, size: 32, offset: 96)
+; CHECK: [[META13:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "D", scope: !6, file: !3, line: 4, baseType: !9, size: 32, offset: 128)
+; CHECK: [[META14:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "E", scope: !6, file: !3, line: 4, baseType: !9, size: 32, offset: 160)
+; CHECK: [[META15:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "F", scope: !6, file: !3, line: 4, baseType: !9, size: 32, offset: 192)
+; CHECK: [[META16:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META17:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META18:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META19:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META20:![0-9]+]] = distinct !DISubprogram(name: "example", linkageName: "_Z7examplev", scope: !3, file: !3, line: 7, type: !21, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !23)
+; CHECK: [[META21:![0-9]+]] = !DISubroutineType(types: !22)
+; CHECK: [[META22:![0-9]+]] = !{!9}
+; CHECK: [[META23:![0-9]+]] = !{!24}
+; CHECK: [[META24]] = !DILocalVariable(name: "To", scope: !20, file: !3, line: 8, type: !6)
+; CHECK: [[DIASSIGNID25]] = distinct !DIAssignID()
+; CHECK: [[DBG26]] = !DILocation(line: 0, scope: !20)
+; CHECK: [[DIASSIGNID27]] = distinct !DIAssignID()
+; CHECK: [[DBG28]] = !DILocation(line: 8, column: 3, scope: !20)
+; CHECK: [[DBG29]] = !DILocation(line: 8, column: 20, scope: !20)
+; CHECK: [[DIASSIGNID30]] = distinct !DIAssignID()
+; CHECK: [[DIASSIGNID31]] = distinct !DIAssignID()
+; CHECK: [[META32]] = distinct !DIAssignID()
+; CHECK: [[DBG33]] = !DILocation(line: 10, column: 1, scope: !20)
+; CHECK: [[DBG34]] = !DILocation(line: 9, column: 3, scope: !20)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll
index 0af17a37fdd4..5bbf184888dd 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt %s -passes=sroa -o - -S -experimental-assignment-tracking \
 ; RUN: | FileCheck %s
 
@@ -54,30 +54,35 @@ target triple = "x86_64-unknown-linux-gnu"
 @C = dso_local global ptr null, align 8
 
 ; Function Attrs: mustprogress uwtable
+;.
+; CHECK: @[[GLOB:[a-zA-Z0-9_$"\\.-]+]] = dso_local global [[STRUCT_BLOB:%.*]] zeroinitializer, align 4
+; CHECK: @[[COND:[a-zA-Z0-9_$"\\.-]+]] = dso_local global i32 0, align 4
+; CHECK: @[[C:[a-zA-Z0-9_$"\\.-]+]] = dso_local global ptr null, align 8
+;.
 define dso_local void @_Z1fv() #0 !dbg !9 {
 ; CHECK-LABEL: @_Z1fv(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A_SROA_0_SROA_5:%.*]] = alloca [5 x i32], align 4, !DIAssignID !18
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 32, 160), metadata [[META18:![0-9]+]], metadata ptr [[A_SROA_0_SROA_5]], metadata !DIExpression()), !dbg [[DBG19:![0-9]+]]
+; CHECK-NEXT:    [[A_SROA_0_SROA_5:%.*]] = alloca [5 x i32], align 4, !DIAssignID [[DIASSIGNID18:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 32, 160), metadata [[DIASSIGNID18]], metadata ptr [[A_SROA_0_SROA_5]], metadata !DIExpression()), !dbg [[DBG19:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 192, 64), metadata [[META20:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG19]]
-; CHECK-NEXT:    [[A_SROA_51_SROA_5:%.*]] = alloca [5 x i32], align 4, !DIAssignID !21
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 288, 160), metadata [[META21:![0-9]+]], metadata ptr [[A_SROA_51_SROA_5]], metadata !DIExpression()), !dbg [[DBG19]]
+; CHECK-NEXT:    [[A_SROA_51_SROA_5:%.*]] = alloca [5 x i32], align 4, !DIAssignID [[DIASSIGNID21:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 288, 160), metadata [[DIASSIGNID21]], metadata ptr [[A_SROA_51_SROA_5]], metadata !DIExpression()), !dbg [[DBG19]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 448, 64), metadata [[META22:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG19]]
 ; CHECK-NEXT:    [[B:%.*]] = alloca [16 x i32], align 16
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 20, ptr [[A_SROA_0_SROA_5]]), !dbg [[DBG23:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 20, ptr [[A_SROA_51_SROA_5]]), !dbg [[DBG23]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 64, ptr [[B]]), !dbg [[DBG24:![0-9]+]]
 ; CHECK-NEXT:    [[A_SROA_0_SROA_0_0_COPYLOAD:%.*]] = load i32, ptr @Glob, align 4, !dbg [[DBG25:![0-9]+]]
-; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[A_SROA_0_SROA_5]], ptr align 4 getelementptr inbounds (i8, ptr @Glob, i64 4), i64 20, i1 false), !dbg [[DBG25]], !DIAssignID !26
+; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[A_SROA_0_SROA_5]], ptr align 4 getelementptr inbounds (i8, ptr @Glob, i64 4), i64 20, i1 false), !dbg [[DBG25]], !DIAssignID [[DIASSIGNID26:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i32 [[A_SROA_0_SROA_0_0_COPYLOAD]], metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 32), metadata [[META27:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG19]]
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 32, 160), metadata [[META26:![0-9]+]], metadata ptr [[A_SROA_0_SROA_5]], metadata !DIExpression()), !dbg [[DBG19]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 32, 160), metadata [[DIASSIGNID26]], metadata ptr [[A_SROA_0_SROA_5]], metadata !DIExpression()), !dbg [[DBG19]]
 ; CHECK-NEXT:    call void @_Z4calli(i32 noundef 0), !dbg [[DBG28:![0-9]+]]
 ; CHECK-NEXT:    [[ARRAYIDX1:%.*]] = getelementptr inbounds [16 x i32], ptr [[B]], i64 0, i64 8, !dbg [[DBG29:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.memmove.p0.p0.i64(ptr align 16 [[ARRAYIDX1]], ptr align 4 @Glob, i64 24, i1 false), !dbg [[DBG30:![0-9]+]]
 ; CHECK-NEXT:    call void @_Z4calli(i32 noundef [[A_SROA_0_SROA_0_0_COPYLOAD]]), !dbg [[DBG31:![0-9]+]]
-; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[A_SROA_51_SROA_5]], ptr align 4 [[A_SROA_0_SROA_5]], i64 20, i1 false), !dbg [[DBG32:![0-9]+]], !DIAssignID !33
+; CHECK-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[A_SROA_51_SROA_5]], ptr align 4 [[A_SROA_0_SROA_5]], i64 20, i1 false), !dbg [[DBG32:![0-9]+]], !DIAssignID [[DIASSIGNID33:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i32 [[A_SROA_0_SROA_0_0_COPYLOAD]], metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 256, 32), metadata [[META34:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG19]]
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 288, 160), metadata [[META33:![0-9]+]], metadata ptr [[A_SROA_51_SROA_5]], metadata !DIExpression()), !dbg [[DBG19]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META13]], metadata !DIExpression(DW_OP_LLVM_fragment, 288, 160), metadata [[DIASSIGNID33]], metadata ptr [[A_SROA_51_SROA_5]], metadata !DIExpression()), !dbg [[DBG19]]
 ; CHECK-NEXT:    call void @_Z4calli(i32 noundef [[A_SROA_0_SROA_0_0_COPYLOAD]]), !dbg [[DBG35:![0-9]+]]
 ; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @Cond, align 4, !dbg [[DBG36:![0-9]+]]
 ; CHECK-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0, !dbg [[DBG36]]
@@ -201,3 +206,54 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !49 = !DILocation(line: 23, column: 27, scope: !41)
 !50 = !DILocation(line: 23, column: 5, scope: !41)
 !51 = !DILocation(line: 24, column: 1, scope: !9)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 16.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META1:![0-9]+]] = !DIFile(filename: "test.cpp", directory: "/")
+; CHECK: [[META2:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 5}
+; CHECK: [[META3:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META4:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META5:![0-9]+]] = !{i32 8, !"PIC Level", i32 2}
+; CHECK: [[META6:![0-9]+]] = !{i32 7, !"PIE Level", i32 2}
+; CHECK: [[META7:![0-9]+]] = !{i32 7, !"uwtable", i32 2}
+; CHECK: [[META8:![0-9]+]] = !{!"clang version 16.0.0"}
+; CHECK: [[META9:![0-9]+]] = distinct !DISubprogram(name: "f", linkageName: "_Z1fv", scope: !1, file: !1, line: 6, type: !10, scopeLine: 6, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !12)
+; CHECK: [[META10:![0-9]+]] = !DISubroutineType(types: !11)
+; CHECK: [[META11:![0-9]+]] = !{null}
+; CHECK: [[META12:![0-9]+]] = !{!13}
+; CHECK: [[META13]] = !DILocalVariable(name: "A", scope: !9, file: !1, line: 7, type: !14)
+; CHECK: [[META14:![0-9]+]] = !DICompositeType(tag: DW_TAG_array_type, baseType: !15, size: 512, elements: !16)
+; CHECK: [[META15:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[META16:![0-9]+]] = !{!17}
+; CHECK: [[META17:![0-9]+]] = !DISubrange(count: 16)
+; CHECK: [[DIASSIGNID18]] = distinct !DIAssignID()
+; CHECK: [[DBG19]] = !DILocation(line: 0, scope: !9)
+; CHECK: [[META20]] = distinct !DIAssignID()
+; CHECK: [[DIASSIGNID21]] = distinct !DIAssignID()
+; CHECK: [[META22]] = distinct !DIAssignID()
+; CHECK: [[DBG23]] = !DILocation(line: 7, column: 3, scope: !9)
+; CHECK: [[DBG24]] = !DILocation(line: 8, column: 3, scope: !9)
+; CHECK: [[DBG25]] = !DILocation(line: 10, column: 3, scope: !9)
+; CHECK: [[DIASSIGNID26]] = distinct !DIAssignID()
+; CHECK: [[META27]] = distinct !DIAssignID()
+; CHECK: [[DBG28]] = !DILocation(line: 11, column: 3, scope: !9)
+; CHECK: [[DBG29]] = !DILocation(line: 13, column: 22, scope: !9)
+; CHECK: [[DBG30]] = !DILocation(line: 13, column: 3, scope: !9)
+; CHECK: [[DBG31]] = !DILocation(line: 14, column: 3, scope: !9)
+; CHECK: [[DBG32]] = !DILocation(line: 16, column: 3, scope: !9)
+; CHECK: [[DIASSIGNID33]] = distinct !DIAssignID()
+; CHECK: [[META34]] = distinct !DIAssignID()
+; CHECK: [[DBG35]] = !DILocation(line: 17, column: 3, scope: !9)
+; CHECK: [[DBG36]] = !DILocation(line: 18, column: 7, scope: !37)
+; CHECK: [[META37:![0-9]+]] = distinct !DILexicalBlock(scope: !9, file: !1, line: 18, column: 7)
+; CHECK: [[DBG38]] = !DILocation(line: 18, column: 7, scope: !9)
+; CHECK: [[DBG39]] = !DILocation(line: 20, column: 23, scope: !37)
+; CHECK: [[DBG40]] = !DILocation(line: 20, column: 5, scope: !37)
+; CHECK: [[DBG41]] = !DILocation(line: 23, column: 23, scope: !37)
+; CHECK: [[DBG42]] = !DILocation(line: 23, column: 27, scope: !37)
+; CHECK: [[DBG43]] = !DILocation(line: 23, column: 5, scope: !37)
+; CHECK: [[DBG44]] = !DILocation(line: 24, column: 1, scope: !9)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll
index ed4fb93e96ea..b9e4432058f3 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -passes=sroa,verify -S %s -experimental-assignment-tracking -o - \
 ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
 
@@ -41,20 +41,24 @@ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16
 @Cond = dso_local global i8 0, align 1, !dbg !6
 
 ; Function Attrs: nounwind uwtable mustprogress
+;.
+; CHECK: @[[GLOB:[a-zA-Z0-9_$"\\.-]+]] = dso_local global i32 0, align 4, !dbg [[DBG0:![0-9]+]]
+; CHECK: @[[COND:[a-zA-Z0-9_$"\\.-]+]] = dso_local global i8 0, align 1, !dbg [[DBG6:![0-9]+]]
+;.
 define dso_local i32 @_Z7examplev() #0 !dbg !14 {
 ; CHECK-LABEL: @_Z7examplev(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[S_SROA_0:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID !28
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META18:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[META28:![0-9]+]], metadata ptr [[S_SROA_0]], metadata !DIExpression()), !dbg [[DBG29:![0-9]+]]
-; CHECK-NEXT:    [[S_SROA_5:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID !30
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[META30:![0-9]+]], metadata ptr [[S_SROA_5]], metadata !DIExpression()), !dbg [[DBG29]]
+; CHECK-NEXT:    [[S_SROA_0:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID [[DIASSIGNID28:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META18:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[DIASSIGNID28]], metadata ptr [[S_SROA_0]], metadata !DIExpression()), !dbg [[DBG29:![0-9]+]]
+; CHECK-NEXT:    [[S_SROA_5:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID [[DIASSIGNID30:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[DIASSIGNID30]], metadata ptr [[S_SROA_5]], metadata !DIExpression()), !dbg [[DBG29]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 12, ptr [[S_SROA_0]]), !dbg [[DBG31:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 12, ptr [[S_SROA_5]]), !dbg [[DBG31]]
-; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 8 [[S_SROA_0]], i8 0, i64 12, i1 false), !dbg [[DBG32:![0-9]+]], !DIAssignID !33
-; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 8 [[S_SROA_5]], i8 0, i64 12, i1 false), !dbg [[DBG32]], !DIAssignID !34
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i8 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[META33:![0-9]+]], metadata ptr [[S_SROA_0]], metadata !DIExpression()), !dbg [[DBG32]]
+; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 8 [[S_SROA_0]], i8 0, i64 12, i1 false), !dbg [[DBG32:![0-9]+]], !DIAssignID [[DIASSIGNID33:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 8 [[S_SROA_5]], i8 0, i64 12, i1 false), !dbg [[DBG32]], !DIAssignID [[DIASSIGNID34:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i8 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[DIASSIGNID33]], metadata ptr [[S_SROA_0]], metadata !DIExpression()), !dbg [[DBG32]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i32 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 96, 32), metadata [[META35:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG32]]
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i8 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[META34:![0-9]+]], metadata ptr [[S_SROA_5]], metadata !DIExpression()), !dbg [[DBG32]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i8 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[DIASSIGNID34]], metadata ptr [[S_SROA_5]], metadata !DIExpression()), !dbg [[DBG32]]
 ; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @Glob, align 4, !dbg [[DBG36:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i32 [[TMP0]], metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 96, 32), metadata [[META37:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG38:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 12, ptr [[S_SROA_0]]), !dbg [[DBG39:![0-9]+]]
@@ -136,3 +140,50 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !43 = !DILocation(line: 12, column: 12, scope: !14)
 !44 = !DILocation(line: 13, column: 1, scope: !14)
 !45 = !DILocation(line: 12, column: 3, scope: !14)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: write) }
+;.
+; CHECK: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; CHECK: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "Glob", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true)
+; CHECK: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META3:![0-9]+]] = !DIFile(filename: "test.cpp", directory: "/")
+; CHECK: [[META4:![0-9]+]] = !{}
+; CHECK: [[META5:![0-9]+]] = !{!0, !6}
+; CHECK: [[DBG6]] = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
+; CHECK: [[META7:![0-9]+]] = distinct !DIGlobalVariable(name: "Cond", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true)
+; CHECK: [[META8:![0-9]+]] = !DIBasicType(name: "bool", size: 8, encoding: DW_ATE_boolean)
+; CHECK: [[META9:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[META10:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META11:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META12:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META13:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META14:![0-9]+]] = distinct !DISubprogram(name: "example", linkageName: "_Z7examplev", scope: !3, file: !3, line: 9, type: !15, scopeLine: 9, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !17)
+; CHECK: [[META15:![0-9]+]] = !DISubroutineType(types: !16)
+; CHECK: [[META16:![0-9]+]] = !{!9}
+; CHECK: [[META17:![0-9]+]] = !{!18}
+; CHECK: [[META18]] = !DILocalVariable(name: "S", scope: !14, file: !3, line: 10, type: !19)
+; CHECK: [[META19:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "LargeStruct", file: !3, line: 2, size: 224, flags: DIFlagTypePassByValue, elements: !20, identifier: "_ZTS11LargeStruct")
+; CHECK: [[META20:![0-9]+]] = !{!21, !22, !23, !24, !25, !26, !27}
+; CHECK: [[META21:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !19, file: !3, line: 3, baseType: !9, size: 32)
+; CHECK: [[META22:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "B", scope: !19, file: !3, line: 3, baseType: !9, size: 32, offset: 32)
+; CHECK: [[META23:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "C", scope: !19, file: !3, line: 3, baseType: !9, size: 32, offset: 64)
+; CHECK: [[META24:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "Var", scope: !19, file: !3, line: 4, baseType: !9, size: 32, offset: 96)
+; CHECK: [[META25:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "D", scope: !19, file: !3, line: 5, baseType: !9, size: 32, offset: 128)
+; CHECK: [[META26:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "E", scope: !19, file: !3, line: 5, baseType: !9, size: 32, offset: 160)
+; CHECK: [[META27:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "F", scope: !19, file: !3, line: 5, baseType: !9, size: 32, offset: 192)
+; CHECK: [[DIASSIGNID28]] = distinct !DIAssignID()
+; CHECK: [[DBG29]] = !DILocation(line: 0, scope: !14)
+; CHECK: [[DIASSIGNID30]] = distinct !DIAssignID()
+; CHECK: [[DBG31]] = !DILocation(line: 10, column: 3, scope: !14)
+; CHECK: [[DBG32]] = !DILocation(line: 10, column: 15, scope: !14)
+; CHECK: [[DIASSIGNID33]] = distinct !DIAssignID()
+; CHECK: [[DIASSIGNID34]] = distinct !DIAssignID()
+; CHECK: [[META35]] = distinct !DIAssignID()
+; CHECK: [[DBG36]] = !DILocation(line: 11, column: 11, scope: !14)
+; CHECK: [[META37]] = distinct !DIAssignID()
+; CHECK: [[DBG38]] = !DILocation(line: 11, column: 9, scope: !14)
+; CHECK: [[DBG39]] = !DILocation(line: 13, column: 1, scope: !14)
+; CHECK: [[DBG40]] = !DILocation(line: 12, column: 3, scope: !14)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll
index ef48d054ad01..c4433cd2d29b 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -passes=sroa,verify -S %s -o - -experimental-assignment-tracking \
 ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
 
@@ -46,21 +46,25 @@ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16
 @Cond = dso_local global i8 0, align 1, !dbg !6
 
 ; Function Attrs: uwtable mustprogress
+;.
+; CHECK: @[[GLOB:[a-zA-Z0-9_$"\\.-]+]] = dso_local global i32 0, align 4, !dbg [[DBG0:![0-9]+]]
+; CHECK: @[[COND:[a-zA-Z0-9_$"\\.-]+]] = dso_local global i8 0, align 1, !dbg [[DBG6:![0-9]+]]
+;.
 define dso_local i32 @_Z7examplev() #0 !dbg !14 {
 ; CHECK-LABEL: @_Z7examplev(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[S_SROA_0:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID !28
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META18:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[META28:![0-9]+]], metadata ptr [[S_SROA_0]], metadata !DIExpression()), !dbg [[DBG29:![0-9]+]]
-; CHECK-NEXT:    [[S_SROA_6:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID !30
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[META30:![0-9]+]], metadata ptr [[S_SROA_6]], metadata !DIExpression()), !dbg [[DBG29]]
+; CHECK-NEXT:    [[S_SROA_0:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID [[DIASSIGNID28:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META18:![0-9]+]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[DIASSIGNID28]], metadata ptr [[S_SROA_0]], metadata !DIExpression()), !dbg [[DBG29:![0-9]+]]
+; CHECK-NEXT:    [[S_SROA_6:%.*]] = alloca { i32, i32, i32 }, align 8, !DIAssignID [[DIASSIGNID30:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i1 undef, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[DIASSIGNID30]], metadata ptr [[S_SROA_6]], metadata !DIExpression()), !dbg [[DBG29]]
 ; CHECK-NEXT:    [[AGG_TMP:%.*]] = alloca [[STRUCT_LARGESTRUCT:%.*]], align 8
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 12, ptr [[S_SROA_0]]), !dbg [[DBG31:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 12, ptr [[S_SROA_6]]), !dbg [[DBG31]]
-; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 8 [[S_SROA_0]], i8 0, i64 12, i1 false), !dbg [[DBG32:![0-9]+]], !DIAssignID !33
-; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 8 [[S_SROA_6]], i8 0, i64 12, i1 false), !dbg [[DBG32]], !DIAssignID !34
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i8 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[META33:![0-9]+]], metadata ptr [[S_SROA_0]], metadata !DIExpression()), !dbg [[DBG32]]
+; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 8 [[S_SROA_0]], i8 0, i64 12, i1 false), !dbg [[DBG32:![0-9]+]], !DIAssignID [[DIASSIGNID33:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.memset.p0.i64(ptr align 8 [[S_SROA_6]], i8 0, i64 12, i1 false), !dbg [[DBG32]], !DIAssignID [[DIASSIGNID34:![0-9]+]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i8 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 0, 96), metadata [[DIASSIGNID33]], metadata ptr [[S_SROA_0]], metadata !DIExpression()), !dbg [[DBG32]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i32 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 96, 32), metadata [[META35:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG32]]
-; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i8 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[META34:![0-9]+]], metadata ptr [[S_SROA_6]], metadata !DIExpression()), !dbg [[DBG32]]
+; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i8 0, metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 128, 96), metadata [[DIASSIGNID34]], metadata ptr [[S_SROA_6]], metadata !DIExpression()), !dbg [[DBG32]]
 ; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @Glob, align 4, !dbg [[DBG36:![0-9]+]]
 ; CHECK-NEXT:    call void @llvm.dbg.assign(metadata i32 [[TMP0]], metadata [[META18]], metadata !DIExpression(DW_OP_LLVM_fragment, 96, 32), metadata [[META37:![0-9]+]], metadata ptr undef, metadata !DIExpression()), !dbg [[DBG38:![0-9]+]]
 ; CHECK-NEXT:    [[TMP1:%.*]] = bitcast ptr [[AGG_TMP]] to ptr, !dbg [[DBG39:![0-9]+]]
@@ -164,3 +168,56 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !49 = !DISubprogram(name: "use", linkageName: "_Z3use11LargeStruct", scope: !3, file: !3, line: 9, type: !50, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !4)
 !50 = !DISubroutineType(types: !51)
 !51 = !{!9, !19}
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: write) }
+; CHECK: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; CHECK: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "Glob", scope: !2, file: !3, line: 7, type: !9, isLocal: false, isDefinition: true)
+; CHECK: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META3:![0-9]+]] = !DIFile(filename: "test.cpp", directory: "/")
+; CHECK: [[META4:![0-9]+]] = !{}
+; CHECK: [[META5:![0-9]+]] = !{!0, !6}
+; CHECK: [[DBG6]] = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())
+; CHECK: [[META7:![0-9]+]] = distinct !DIGlobalVariable(name: "Cond", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true)
+; CHECK: [[META8:![0-9]+]] = !DIBasicType(name: "bool", size: 8, encoding: DW_ATE_boolean)
+; CHECK: [[META9:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[META10:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META11:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META12:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META13:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META14:![0-9]+]] = distinct !DISubprogram(name: "example", linkageName: "_Z7examplev", scope: !3, file: !3, line: 10, type: !15, scopeLine: 10, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !17)
+; CHECK: [[META15:![0-9]+]] = !DISubroutineType(types: !16)
+; CHECK: [[META16:![0-9]+]] = !{!9}
+; CHECK: [[META17:![0-9]+]] = !{!18}
+; CHECK: [[META18]] = !DILocalVariable(name: "S", scope: !14, file: !3, line: 11, type: !19)
+; CHECK: [[META19:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "LargeStruct", file: !3, line: 2, size: 224, flags: DIFlagTypePassByValue, elements: !20, identifier: "_ZTS11LargeStruct")
+; CHECK: [[META20:![0-9]+]] = !{!21, !22, !23, !24, !25, !26, !27}
+; CHECK: [[META21:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !19, file: !3, line: 3, baseType: !9, size: 32)
+; CHECK: [[META22:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "B", scope: !19, file: !3, line: 3, baseType: !9, size: 32, offset: 32)
+; CHECK: [[META23:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "C", scope: !19, file: !3, line: 3, baseType: !9, size: 32, offset: 64)
+; CHECK: [[META24:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "Var", scope: !19, file: !3, line: 4, baseType: !9, size: 32, offset: 96)
+; CHECK: [[META25:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "D", scope: !19, file: !3, line: 5, baseType: !9, size: 32, offset: 128)
+; CHECK: [[META26:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "E", scope: !19, file: !3, line: 5, baseType: !9, size: 32, offset: 160)
+; CHECK: [[META27:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "F", scope: !19, file: !3, line: 5, baseType: !9, size: 32, offset: 192)
+; CHECK: [[DIASSIGNID28]] = distinct !DIAssignID()
+; CHECK: [[DBG29]] = !DILocation(line: 0, scope: !14)
+; CHECK: [[DIASSIGNID30]] = distinct !DIAssignID()
+; CHECK: [[DBG31]] = !DILocation(line: 11, column: 3, scope: !14)
+; CHECK: [[DBG32]] = !DILocation(line: 11, column: 15, scope: !14)
+; CHECK: [[DIASSIGNID33]] = distinct !DIAssignID()
+; CHECK: [[DIASSIGNID34]] = distinct !DIAssignID()
+; CHECK: [[META35]] = distinct !DIAssignID()
+; CHECK: [[DBG36]] = !DILocation(line: 12, column: 11, scope: !14)
+; CHECK: [[META37]] = distinct !DIAssignID()
+; CHECK: [[DBG38]] = !DILocation(line: 12, column: 9, scope: !14)
+; CHECK: [[DBG39]] = !DILocation(line: 13, column: 7, scope: !14)
+; CHECK: [[DBG40]] = !DILocation(line: 13, column: 3, scope: !14)
+; CHECK: [[DBG41]] = !DILocation(line: 15, column: 1, scope: !14)
+; CHECK: [[DBG42]] = !DILocation(line: 14, column: 3, scope: !14)
+; CHECK: [[META43:![0-9]+]] = !DISubprogram(name: "use", linkageName: "_Z3use11LargeStruct", scope: !3, file: !3, line: 9, type: !44, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !4)
+; CHECK: [[META44:![0-9]+]] = !DISubroutineType(types: !45)
+; CHECK: [[META45:![0-9]+]] = !{!9, !19}
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll
index cc2c8a30f723..165584b1b914 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -S %s -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s
 
 ;; $ cat test.cpp
@@ -57,3 +57,32 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !23 = !DILocation(line: 0, scope: !14)
 !28 = distinct !DIAssignID()
 !29 = !DILocation(line: 20, column: 27, scope: !14)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !3, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META1:![0-9]+]] = !DIFile(filename: "test.cpp", directory: "/")
+; CHECK: [[META2:![0-9]+]] = !{}
+; CHECK: [[META3:![0-9]+]] = !{!4}
+; CHECK: [[META4:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !6, file: !9, line: 56)
+; CHECK: [[META5:![0-9]+]] = !DINamespace(name: "std", scope: null)
+; CHECK: [[META6:![0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "max_align_t", file: !7, line: 24, baseType: !8)
+; CHECK: [[META7:![0-9]+]] = !DIFile(filename: "clang/12.0.0/include/__stddef_max_align_t.h", directory: "/")
+; CHECK: [[META8:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !7, line: 19, size: 256, flags: DIFlagFwdDecl, identifier: "_ZTS11max_align_t")
+; CHECK: [[META9:![0-9]+]] = !DIFile(filename: "include/c++/7.5.0/cstddef", directory: "")
+; CHECK: [[META10:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META11:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META12:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META13:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META14:![0-9]+]] = distinct !DISubprogram(name: "fun", linkageName: "_Z3funDn", scope: !1, file: !1, line: 20, type: !15, scopeLine: 20, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !20)
+; CHECK: [[META15:![0-9]+]] = !DISubroutineType(types: !16)
+; CHECK: [[META16:![0-9]+]] = !{null, !17}
+; CHECK: [[META17:![0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "nullptr_t", scope: !5, file: !18, line: 235, baseType: !19)
+; CHECK: [[META18:![0-9]+]] = !DIFile(filename: "include/x86_64-linux-gnu/c++/7.5.0/bits/c++config.h", directory: "")
+; CHECK: [[META19:![0-9]+]] = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
+; CHECK: [[META20:![0-9]+]] = !{!21}
+; CHECK: [[META21]] = !DILocalVariable(arg: 1, scope: !14, file: !1, line: 20, type: !17)
+; CHECK: [[META22]] = distinct !DIAssignID()
+; CHECK: [[DBG23]] = !DILocation(line: 0, scope: !14)
+; CHECK: [[DBG24]] = !DILocation(line: 20, column: 27, scope: !14)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll
index 2d5df04825d2..40aca21ec1c0 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt -passes=sroa -S %s -o - -experimental-assignment-tracking \
 ; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
 
@@ -48,6 +48,9 @@ target triple = "x86_64-unknown-linux-gnu"
 @__const._Z3funv.other = private unnamed_addr constant %struct.V3i { i64 10, i64 9, i64 8 }, align 8
 
 ; Function Attrs: nounwind uwtable mustprogress
+;.
+; CHECK: @[[__CONST__Z3FUNV_OTHER:[a-zA-Z0-9_$"\\.-]+]] = private unnamed_addr constant [[STRUCT_V3I:%.*]] { i64 10, i64 9, i64 8 }, align 8
+;.
 define dso_local void @_Z3funv() !dbg !100 {
 ; CHECK-LABEL: @_Z3funv(
 ; CHECK-NEXT:  entry:
@@ -235,3 +238,136 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !131 = !DILocation(line: 8, column: 32, scope: !100)
 !132 = distinct !DIAssignID()
 !133 = !DILocation(line: 9, column: 1, scope: !100)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: write) }
+; CHECK: attributes #[[ATTR3:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, imports: !3, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META1:![0-9]+]] = !DIFile(filename: "test.cpp", directory: "/")
+; CHECK: [[META2:![0-9]+]] = !{}
+; CHECK: [[META3:![0-9]+]] = !{!4, !18, !22, !28, !32, !36, !46, !50, !52, !54, !58, !62, !66, !70, !74, !76, !78, !80, !84, !88, !92, !94}
+; CHECK: [[META4:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !6, file: !17, line: 75)
+; CHECK: [[META5:![0-9]+]] = !DINamespace(name: "std", scope: null)
+; CHECK: [[META6:![0-9]+]] = !DISubprogram(name: "memchr", scope: !7, file: !7, line: 90, type: !8, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META7:![0-9]+]] = !DIFile(filename: "/usr/include/string.h", directory: "")
+; CHECK: [[META8:![0-9]+]] = !DISubroutineType(types: !9)
+; CHECK: [[META9:![0-9]+]] = !{!10, !11, !13, !14}
+; CHECK: [[META10:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
+; CHECK: [[META11:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64)
+; CHECK: [[META12:![0-9]+]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: null)
+; CHECK: [[META13:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; CHECK: [[META14:![0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "size_t", file: !15, line: 46, baseType: !16)
+; CHECK: [[META15:![0-9]+]] = !DIFile(filename: "lib/clang/12.0.0/include/stddef.h", directory: "/")
+; CHECK: [[META16:![0-9]+]] = !DIBasicType(name: "long unsigned int", size: 64, encoding: DW_ATE_unsigned)
+; CHECK: [[META17:![0-9]+]] = !DIFile(filename: "/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/cstring", directory: "")
+; CHECK: [[META18:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !19, file: !17, line: 76)
+; CHECK: [[META19:![0-9]+]] = !DISubprogram(name: "memcmp", scope: !7, file: !7, line: 63, type: !20, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META20:![0-9]+]] = !DISubroutineType(types: !21)
+; CHECK: [[META21:![0-9]+]] = !{!13, !11, !11, !14}
+; CHECK: [[META22:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !23, file: !17, line: 77)
+; CHECK: [[META23:![0-9]+]] = !DISubprogram(name: "memcpy", scope: !7, file: !7, line: 42, type: !24, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META24:![0-9]+]] = !DISubroutineType(types: !25)
+; CHECK: [[META25:![0-9]+]] = !{!10, !26, !27, !14}
+; CHECK: [[META26:![0-9]+]] = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !10)
+; CHECK: [[META27:![0-9]+]] = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !11)
+; CHECK: [[META28:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !29, file: !17, line: 78)
+; CHECK: [[META29:![0-9]+]] = !DISubprogram(name: "memmove", scope: !7, file: !7, line: 46, type: !30, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META30:![0-9]+]] = !DISubroutineType(types: !31)
+; CHECK: [[META31:![0-9]+]] = !{!10, !10, !11, !14}
+; CHECK: [[META32:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !33, file: !17, line: 79)
+; CHECK: [[META33:![0-9]+]] = !DISubprogram(name: "memset", scope: !7, file: !7, line: 60, type: !34, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META34:![0-9]+]] = !DISubroutineType(types: !35)
+; CHECK: [[META35:![0-9]+]] = !{!10, !10, !13, !14}
+; CHECK: [[META36:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !37, file: !17, line: 80)
+; CHECK: [[META37:![0-9]+]] = !DISubprogram(name: "strcat", scope: !7, file: !7, line: 129, type: !38, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META38:![0-9]+]] = !DISubroutineType(types: !39)
+; CHECK: [[META39:![0-9]+]] = !{!40, !42, !43}
+; CHECK: [[META40:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !41, size: 64)
+; CHECK: [[META41:![0-9]+]] = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)
+; CHECK: [[META42:![0-9]+]] = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !40)
+; CHECK: [[META43:![0-9]+]] = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !44)
+; CHECK: [[META44:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !45, size: 64)
+; CHECK: [[META45:![0-9]+]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: !41)
+; CHECK: [[META46:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !47, file: !17, line: 81)
+; CHECK: [[META47:![0-9]+]] = !DISubprogram(name: "strcmp", scope: !7, file: !7, line: 136, type: !48, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META48:![0-9]+]] = !DISubroutineType(types: !49)
+; CHECK: [[META49:![0-9]+]] = !{!13, !44, !44}
+; CHECK: [[META50:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !51, file: !17, line: 82)
+; CHECK: [[META51:![0-9]+]] = !DISubprogram(name: "strcoll", scope: !7, file: !7, line: 143, type: !48, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META52:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !53, file: !17, line: 83)
+; CHECK: [[META53:![0-9]+]] = !DISubprogram(name: "strcpy", scope: !7, file: !7, line: 121, type: !38, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META54:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !55, file: !17, line: 84)
+; CHECK: [[META55:![0-9]+]] = !DISubprogram(name: "strcspn", scope: !7, file: !7, line: 272, type: !56, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META56:![0-9]+]] = !DISubroutineType(types: !57)
+; CHECK: [[META57:![0-9]+]] = !{!14, !44, !44}
+; CHECK: [[META58:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !59, file: !17, line: 85)
+; CHECK: [[META59:![0-9]+]] = !DISubprogram(name: "strerror", scope: !7, file: !7, line: 396, type: !60, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META60:![0-9]+]] = !DISubroutineType(types: !61)
+; CHECK: [[META61:![0-9]+]] = !{!40, !13}
+; CHECK: [[META62:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !63, file: !17, line: 86)
+; CHECK: [[META63:![0-9]+]] = !DISubprogram(name: "strlen", scope: !7, file: !7, line: 384, type: !64, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META64:![0-9]+]] = !DISubroutineType(types: !65)
+; CHECK: [[META65:![0-9]+]] = !{!14, !44}
+; CHECK: [[META66:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !67, file: !17, line: 87)
+; CHECK: [[META67:![0-9]+]] = !DISubprogram(name: "strncat", scope: !7, file: !7, line: 132, type: !68, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META68:![0-9]+]] = !DISubroutineType(types: !69)
+; CHECK: [[META69:![0-9]+]] = !{!40, !42, !43, !14}
+; CHECK: [[META70:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !71, file: !17, line: 88)
+; CHECK: [[META71:![0-9]+]] = !DISubprogram(name: "strncmp", scope: !7, file: !7, line: 139, type: !72, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META72:![0-9]+]] = !DISubroutineType(types: !73)
+; CHECK: [[META73:![0-9]+]] = !{!13, !44, !44, !14}
+; CHECK: [[META74:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !75, file: !17, line: 89)
+; CHECK: [[META75:![0-9]+]] = !DISubprogram(name: "strncpy", scope: !7, file: !7, line: 124, type: !68, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META76:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !77, file: !17, line: 90)
+; CHECK: [[META77:![0-9]+]] = !DISubprogram(name: "strspn", scope: !7, file: !7, line: 276, type: !56, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META78:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !79, file: !17, line: 91)
+; CHECK: [[META79:![0-9]+]] = !DISubprogram(name: "strtok", scope: !7, file: !7, line: 335, type: !38, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META80:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !81, file: !17, line: 92)
+; CHECK: [[META81:![0-9]+]] = !DISubprogram(name: "strxfrm", scope: !7, file: !7, line: 146, type: !82, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META82:![0-9]+]] = !DISubroutineType(types: !83)
+; CHECK: [[META83:![0-9]+]] = !{!14, !42, !43, !14}
+; CHECK: [[META84:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !85, file: !17, line: 93)
+; CHECK: [[META85:![0-9]+]] = !DISubprogram(name: "strchr", scope: !7, file: !7, line: 225, type: !86, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META86:![0-9]+]] = !DISubroutineType(types: !87)
+; CHECK: [[META87:![0-9]+]] = !{!40, !44, !13}
+; CHECK: [[META88:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !89, file: !17, line: 94)
+; CHECK: [[META89:![0-9]+]] = !DISubprogram(name: "strpbrk", scope: !7, file: !7, line: 302, type: !90, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META90:![0-9]+]] = !DISubroutineType(types: !91)
+; CHECK: [[META91:![0-9]+]] = !{!40, !44, !44}
+; CHECK: [[META92:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !93, file: !17, line: 95)
+; CHECK: [[META93:![0-9]+]] = !DISubprogram(name: "strrchr", scope: !7, file: !7, line: 252, type: !86, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META94:![0-9]+]] = !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !5, entity: !95, file: !17, line: 96)
+; CHECK: [[META95:![0-9]+]] = !DISubprogram(name: "strstr", scope: !7, file: !7, line: 329, type: !90, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META96:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META97:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META98:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META99:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META100:![0-9]+]] = distinct !DISubprogram(name: "fun", linkageName: "_Z3funv", scope: !1, file: !1, line: 4, type: !101, scopeLine: 4, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !103)
+; CHECK: [[META101:![0-9]+]] = !DISubroutineType(types: !102)
+; CHECK: [[META102:![0-9]+]] = !{null}
+; CHECK: [[META103:![0-9]+]] = !{!104, !111}
+; CHECK: [[META104]] = !DILocalVariable(name: "point", scope: !100, file: !1, line: 5, type: !105)
+; CHECK: [[META105:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "V3i", file: !1, line: 3, size: 192, flags: DIFlagTypePassByValue, elements: !106, identifier: "_ZTS3V3i")
+; CHECK: [[META106:![0-9]+]] = !{!107, !109, !110}
+; CHECK: [[META107:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !105, file: !1, line: 3, baseType: !108, size: 64)
+; CHECK: [[META108:![0-9]+]] = !DIBasicType(name: "long int", size: 64, encoding: DW_ATE_signed)
+; CHECK: [[META109:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !105, file: !1, line: 3, baseType: !108, size: 64, offset: 64)
+; CHECK: [[META110:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "z", scope: !105, file: !1, line: 3, baseType: !108, size: 64, offset: 128)
+; CHECK: [[META111]] = !DILocalVariable(name: "other", scope: !100, file: !1, line: 7, type: !105)
+; CHECK: [[META112]] = distinct !DIAssignID()
+; CHECK: [[DBG113]] = !DILocation(line: 5, column: 7, scope: !100)
+; CHECK: [[META114]] = distinct !DIAssignID()
+; CHECK: [[META115]] = distinct !DIAssignID()
+; CHECK: [[META116]] = distinct !DIAssignID()
+; CHECK: [[DBG117]] = !DILocation(line: 6, column: 11, scope: !100)
+; CHECK: [[DBG118]] = !DILocation(line: 7, column: 7, scope: !100)
+; CHECK: [[META119]] = distinct !DIAssignID()
+; CHECK: [[META120]] = distinct !DIAssignID()
+; CHECK: [[META121]] = distinct !DIAssignID()
+; CHECK: [[META122]] = distinct !DIAssignID()
+; CHECK: [[DBG123]] = !DILocation(line: 8, column: 3, scope: !100)
+; CHECK: [[META124]] = distinct !DIAssignID()
+; CHECK: [[DBG125]] = !DILocation(line: 9, column: 1, scope: !100)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll
index ceedabd5a52f..11ed683f3e0f 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt %s -S -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s
 
 ;; Ensure that only the value-expression gets fragment info; that the
@@ -108,3 +108,43 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !39 = distinct !DIAssignID()
 !40 = distinct !DIAssignID()
 !41 = !DILocation(line: 8, column: 36, scope: !7)
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[META0:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META1:![0-9]+]] = !DIFile(filename: "test.cpp", directory: "/")
+; CHECK: [[META2:![0-9]+]] = !{}
+; CHECK: [[META3:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META4:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META5:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META6:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META7:![0-9]+]] = distinct !DISubprogram(name: "d", linkageName: "_ZNK1c1dEv", scope: !8, file: !1, line: 8, type: !23, scopeLine: 8, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !22, retainedNodes: !25)
+; CHECK: [[META8:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "c", file: !1, line: 4, size: 8, flags: DIFlagTypePassByValue, elements: !9, identifier: "_ZTS1c")
+; CHECK: [[META9:![0-9]+]] = !{!10, !22}
+; CHECK: [[META10:![0-9]+]] = !DISubprogram(name: "m_fn1", linkageName: "_ZNK1c5m_fn1Ev", scope: !8, file: !1, line: 5, type: !11, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META11:![0-9]+]] = !DISubroutineType(types: !12)
+; CHECK: [[META12:![0-9]+]] = !{!13, !20}
+; CHECK: [[META13:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "a", file: !1, line: 1, size: 128, flags: DIFlagTypePassByValue, elements: !14, identifier: "_ZTS1a")
+; CHECK: [[META14:![0-9]+]] = !{!15}
+; CHECK: [[META15:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !13, file: !1, line: 2, baseType: !16, size: 128)
+; CHECK: [[META16:![0-9]+]] = !DICompositeType(tag: DW_TAG_array_type, baseType: !17, size: 128, elements: !18)
+; CHECK: [[META17:![0-9]+]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
+; CHECK: [[META18:![0-9]+]] = !{!19}
+; CHECK: [[META19:![0-9]+]] = !DISubrange(count: 4)
+; CHECK: [[META20:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !21, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META21:![0-9]+]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: !8)
+; CHECK: [[META22:![0-9]+]] = !DISubprogram(name: "d", linkageName: "_ZNK1c1dEv", scope: !8, file: !1, line: 6, type: !23, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META23:![0-9]+]] = !DISubroutineType(types: !24)
+; CHECK: [[META24:![0-9]+]] = !{null, !20}
+; CHECK: [[META25:![0-9]+]] = !{!26, !28}
+; CHECK: [[META26]] = !DILocalVariable(name: "this", arg: 1, scope: !7, type: !27, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META27:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !21, size: 64)
+; CHECK: [[META28]] = !DILocalVariable(name: "e", scope: !7, file: !1, line: 8, type: !13)
+; CHECK: [[META29]] = distinct !DIAssignID()
+; CHECK: [[DBG30]] = !DILocation(line: 0, scope: !7)
+; CHECK: [[DBG31]] = !DILocation(line: 8, column: 27, scope: !7)
+; CHECK: [[META32]] = distinct !DIAssignID()
+; CHECK: [[META33]] = distinct !DIAssignID()
+; CHECK: [[DBG34]] = !DILocation(line: 8, column: 36, scope: !7)
+;.

diff  --git a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll
index e6d37c80ed0d..6c98f4c90222 100644
--- a/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll
+++ b/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll
@@ -1,4 +1,4 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals
 ; RUN: opt %s -S -passes=sroa -o - -experimental-assignment-tracking | FileCheck %s
 
 ;; $ cat test.cpp
@@ -39,6 +39,9 @@ $_ZN1dC2Ev = comdat any
 @c = dso_local local_unnamed_addr global float 0.000000e+00, align 4, !dbg !0
 
 ; Function Attrs: uwtable
+;.
+; CHECK: @[[C:[a-zA-Z0-9_$"\\.-]+]] = dso_local local_unnamed_addr global float 0.000000e+00, align 4, !dbg [[DBG0:![0-9]+]]
+;.
 define dso_local void @_Z1gv() local_unnamed_addr #0 !dbg !11 {
 ; CHECK-LABEL: @_Z1gv(
 ; CHECK-NEXT:  entry:
@@ -244,3 +247,89 @@ declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata,
 !87 = !DILocation(line: 8, column: 14, scope: !64)
 !88 = !DILocation(line: 8, column: 19, scope: !57)
 
+;.
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
+; CHECK: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
+; CHECK: attributes #[[ATTR2:[0-9]+]] = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
+;.
+; CHECK: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; CHECK: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "c", scope: !2, file: !3, line: 5, type: !6, isLocal: false, isDefinition: true)
+; CHECK: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 12.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, splitDebugInlining: false, nameTableKind: None)
+; CHECK: [[META3:![0-9]+]] = !DIFile(filename: "test.cpp", directory: "/")
+; CHECK: [[META4:![0-9]+]] = !{}
+; CHECK: [[META5:![0-9]+]] = !{!0}
+; CHECK: [[META6:![0-9]+]] = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
+; CHECK: [[META7:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 4}
+; CHECK: [[META8:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; CHECK: [[META9:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META10:![0-9]+]] = !{!"clang version 12.0.0"}
+; CHECK: [[META11:![0-9]+]] = distinct !DISubprogram(name: "g", linkageName: "_Z1gv", scope: !3, file: !3, line: 12, type: !12, scopeLine: 12, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !14)
+; CHECK: [[META12:![0-9]+]] = !DISubroutineType(types: !13)
+; CHECK: [[META13:![0-9]+]] = !{null}
+; CHECK: [[META14:![0-9]+]] = !{!15, !30, !31}
+; CHECK: [[META15]] = !DILocalVariable(name: "j", scope: !11, file: !3, line: 13, type: !16)
+; CHECK: [[META16:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "d", file: !3, line: 6, size: 128, flags: DIFlagTypePassByValue | DIFlagNonTrivial, elements: !17, identifier: "_ZTS1d")
+; CHECK: [[META17:![0-9]+]] = !{!18, !25, !29}
+; CHECK: [[META18:![0-9]+]] = !DIDerivedType(tag: DW_TAG_inheritance, scope: !16, baseType: !19, extraData: i32 0)
+; CHECK: [[META19:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "a", file: !3, line: 1, size: 128, flags: DIFlagTypePassByValue, elements: !20, identifier: "_ZTS1a")
+; CHECK: [[META20:![0-9]+]] = !{!21}
+; CHECK: [[META21:![0-9]+]] = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !19, file: !3, line: 3, baseType: !22, size: 128, flags: DIFlagProtected)
+; CHECK: [[META22:![0-9]+]] = !DICompositeType(tag: DW_TAG_array_type, baseType: !6, size: 128, elements: !23)
+; CHECK: [[META23:![0-9]+]] = !{!24}
+; CHECK: [[META24:![0-9]+]] = !DISubrange(count: 4)
+; CHECK: [[META25:![0-9]+]] = !DISubprogram(name: "d", scope: !16, file: !3, line: 8, type: !26, scopeLine: 8, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META26:![0-9]+]] = !DISubroutineType(types: !27)
+; CHECK: [[META27:![0-9]+]] = !{null, !28}
+; CHECK: [[META28:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !16, size: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META29:![0-9]+]] = !DISubprogram(name: "e", linkageName: "_ZN1d1eEv", scope: !16, file: !3, line: 9, type: !26, scopeLine: 9, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagOptimized)
+; CHECK: [[META30]] = !DILocalVariable(name: "h", scope: !11, file: !3, line: 13, type: !16)
+; CHECK: [[META31]] = !DILocalVariable(name: "i", scope: !11, file: !3, line: 13, type: !16)
+; CHECK: [[META32]] = distinct !DIAssignID()
+; CHECK: [[DBG33]] = !DILocation(line: 0, scope: !11)
+; CHECK: [[META34]] = distinct !DIAssignID()
+; CHECK: [[META35]] = distinct !DIAssignID()
+; CHECK: [[META36]] = distinct !DIAssignID()
+; CHECK: [[DBG37]] = !DILocation(line: 13, column: 9, scope: !11)
+; CHECK: [[META38]] = distinct !DIAssignID()
+; CHECK: [[META39]] = distinct !DIAssignID()
+; CHECK: [[META40]] = distinct !DIAssignID()
+; CHECK: [[META41]] = distinct !DIAssignID()
+; CHECK: [[META42]] = distinct !DIAssignID()
+; CHECK: [[META43]] = distinct !DIAssignID()
+; CHECK: [[META44]] = !DILocalVariable(name: "this", arg: 1, scope: !45, type: !47, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META45:![0-9]+]] = distinct !DISubprogram(name: "e", linkageName: "_ZN1d1eEv", scope: !16, file: !3, line: 9, type: !26, scopeLine: 9, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, declaration: !29, retainedNodes: !46)
+; CHECK: [[META46:![0-9]+]] = !{!44}
+; CHECK: [[META47:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !16, size: 64)
+; CHECK: [[META48]] = distinct !DIAssignID()
+; CHECK: [[DBG49]] = !DILocation(line: 0, scope: !45, inlinedAt: !50)
+; CHECK: [[META50:![0-9]+]] = distinct !DILocation(line: 14, column: 5, scope: !11)
+; CHECK: [[META51]] = distinct !DIAssignID()
+; CHECK: [[META52]] = !DILocalVariable(name: "this", arg: 1, scope: !53, type: !47, flags: DIFlagArtificial | DIFlagObjectPointer)
+; CHECK: [[META53:![0-9]+]] = distinct !DISubprogram(name: "d", linkageName: "_ZN1dC2Ev", scope: !16, file: !3, line: 8, type: !26, scopeLine: 8, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, declaration: !25, retainedNodes: !54)
+; CHECK: [[META54:![0-9]+]] = !{!52}
+; CHECK: [[META55]] = distinct !DIAssignID()
+; CHECK: [[DBG56]] = !DILocation(line: 0, scope: !53, inlinedAt: !57)
+; CHECK: [[META57:![0-9]+]] = distinct !DILocation(line: 15, column: 7, scope: !11)
+; CHECK: [[META58]] = distinct !DIAssignID()
+; CHECK: [[DBG59]] = !DILocation(line: 8, column: 16, scope: !60, inlinedAt: !57)
+; CHECK: [[META60:![0-9]+]] = distinct !DILexicalBlock(scope: !53, file: !3, line: 8, column: 7)
+; CHECK: [[DBG61]] = !DILocation(line: 15, column: 5, scope: !11)
+; CHECK: [[META62]] = distinct !DIAssignID()
+; CHECK: [[META63]] = distinct !DIAssignID()
+; CHECK: [[META64]] = distinct !DIAssignID()
+; CHECK: [[DBG65]] = !DILocation(line: 16, column: 1, scope: !11)
+; CHECK: [[META66:![0-9]+]] = !DISubprogram(name: "f", linkageName: "_Z1fv", scope: !3, file: !3, line: 11, type: !67, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !4)
+; CHECK: [[META67:![0-9]+]] = !DISubroutineType(types: !68)
+; CHECK: [[META68:![0-9]+]] = !{!16}
+; CHECK: [[META69]] = distinct !DIAssignID()
+; CHECK: [[DBG70]] = !DILocation(line: 0, scope: !45)
+; CHECK: [[META71]] = distinct !DIAssignID()
+; CHECK: [[DBG72]] = !DILocation(line: 9, column: 13, scope: !45)
+; CHECK: [[META73]] = distinct !DIAssignID()
+; CHECK: [[DBG74]] = !DILocation(line: 0, scope: !53)
+; CHECK: [[META75]] = distinct !DIAssignID()
+; CHECK: [[DBG76]] = !DILocation(line: 8, column: 16, scope: !60)
+; CHECK: [[DBG77]] = !DILocation(line: 8, column: 9, scope: !60)
+; CHECK: [[DBG78]] = !DILocation(line: 8, column: 14, scope: !60)
+; CHECK: [[DBG79]] = !DILocation(line: 8, column: 19, scope: !53)
+;.


        


More information about the llvm-commits mailing list