Renumber testcase metadata nodes after r290153.
This patch renumbers the metadata nodes in debug info testcases after
https://reviews.llvm.org/D26769. This is a separate patch because it
causes so much churn. This was implemented with a python script that
pipes the testcases through llvm-as - | llvm-dis - and then goes
through the original and new output side-by side to insert all
comments at a close-enough location.
Differential Revision: https://reviews.llvm.org/D27765
llvm-svn: 290292
diff --git a/llvm/test/Transforms/LoopVectorize/dbg.value.ll b/llvm/test/Transforms/LoopVectorize/dbg.value.ll
index b780f36..453f02b 100644
--- a/llvm/test/Transforms/LoopVectorize/dbg.value.ll
+++ b/llvm/test/Transforms/LoopVectorize/dbg.value.ll
@@ -1,68 +1,77 @@
; RUN: opt < %s -S -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine | FileCheck %s
; Make sure we vectorize with debugging turned on.
+source_filename = "test/Transforms/LoopVectorize/dbg.value.ll"
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
-@A = global [1024 x i32] zeroinitializer, align 16, !dbg !12
-@B = global [1024 x i32] zeroinitializer, align 16, !dbg !16
-@C = global [1024 x i32] zeroinitializer, align 16, !dbg !17
-
+@A = global [1024 x i32] zeroinitializer, align 16, !dbg !0
+@B = global [1024 x i32] zeroinitializer, align 16, !dbg !7
+@C = global [1024 x i32] zeroinitializer, align 16, !dbg !9
; CHECK-LABEL: @test(
-define i32 @test() #0 !dbg !3 {
-entry:
- tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !9, metadata !DIExpression()), !dbg !18
- br label %for.body, !dbg !18
-for.body:
+; Function Attrs: nounwind ssp uwtable
+define i32 @test() #0 !dbg !15 {
+entry:
+ tail call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !19, metadata !21), !dbg !22
+ br label %for.body, !dbg !22
+
+for.body: ; preds = %for.body, %entry
;CHECK: load <4 x i32>
%indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
- %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvars.iv, !dbg !19
- %0 = load i32, i32* %arrayidx, align 4, !dbg !19
- %arrayidx2 = getelementptr inbounds [1024 x i32], [1024 x i32]* @C, i64 0, i64 %indvars.iv, !dbg !19
- %1 = load i32, i32* %arrayidx2, align 4, !dbg !19
- %add = add nsw i32 %1, %0, !dbg !19
- %arrayidx4 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv, !dbg !19
- store i32 %add, i32* %arrayidx4, align 4, !dbg !19
- %indvars.iv.next = add i64 %indvars.iv, 1, !dbg !18
- tail call void @llvm.dbg.value(metadata !{null}, i64 0, metadata !9, metadata !DIExpression()), !dbg !18
- %lftr.wideiv = trunc i64 %indvars.iv.next to i32, !dbg !18
- %exitcond = icmp ne i32 %lftr.wideiv, 1024, !dbg !18
- br i1 %exitcond, label %for.body, label %for.end, !dbg !18
+ %arrayidx = getelementptr inbounds [1024 x i32], [1024 x i32]* @B, i64 0, i64 %indvars.iv, !dbg !23
+ %0 = load i32, i32* %arrayidx, align 4, !dbg !23
+ %arrayidx2 = getelementptr inbounds [1024 x i32], [1024 x i32]* @C, i64 0, i64 %indvars.iv, !dbg !23
+ %1 = load i32, i32* %arrayidx2, align 4, !dbg !23
+ %add = add nsw i32 %1, %0, !dbg !23
+ %arrayidx4 = getelementptr inbounds [1024 x i32], [1024 x i32]* @A, i64 0, i64 %indvars.iv, !dbg !23
+ store i32 %add, i32* %arrayidx4, align 4, !dbg !23
+ %indvars.iv.next = add i64 %indvars.iv, 1, !dbg !22
+ tail call void @llvm.dbg.value(metadata !12, i64 0, metadata !19, metadata !21), !dbg !22
+ %lftr.wideiv = trunc i64 %indvars.iv.next to i32, !dbg !22
+ %exitcond = icmp ne i32 %lftr.wideiv, 1024, !dbg !22
+ br i1 %exitcond, label %for.body, label %for.end, !dbg !22
-for.end:
- ret i32 0, !dbg !24
+for.end: ; preds = %for.body
+ ret i32 0, !dbg !25
}
+; Function Attrs: nounwind readnone
+
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
+; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #1
attributes #0 = { nounwind ssp uwtable "fp-contract-model"="standard" "no-frame-pointer-elim" "no-frame-pointer-elim-non-leaf" "relocation-model"="pic" "ssp-buffers-size"="8" }
attributes #1 = { nounwind readnone }
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!26}
+!llvm.dbg.cu = !{!11}
+!llvm.module.flags = !{!14}
-!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang", isOptimized: true, emissionKind: FullDebug, file: !25, enums: !1, retainedTypes: !1, globals: !11)
-!1 = !{}
-!3 = distinct !DISubprogram(name: "test", linkageName: "test", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 5, file: !25, scope: !4, type: !5, variables: !8)
-!4 = !DIFile(filename: "test", directory: "/path/to/somewhere")
-!5 = !DISubroutineType(types: !6)
-!6 = !{!7}
-!7 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = !{!9}
-!9 = !DILocalVariable(name: "i", line: 6, scope: !10, file: !4, type: !7)
-!10 = distinct !DILexicalBlock(line: 6, column: 0, file: !25, scope: !3)
-!11 = !{!12, !16, !17}
-!12 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "A", line: 1, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13))
-!13 = !DICompositeType(tag: DW_TAG_array_type, size: 32768, align: 32, baseType: !7, elements: !14)
-!14 = !{!15}
-!15 = !{i32 786465, i64 0, i64 1024}
-!16 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "B", line: 2, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13))
-!17 = !DIGlobalVariableExpression(var: !DIGlobalVariable(name: "C", line: 3, isLocal: false, isDefinition: true, scope: null, file: !4, type: !13))
-!18 = !DILocation(line: 6, scope: !10)
-!19 = !DILocation(line: 7, scope: !20)
-!20 = distinct !DILexicalBlock(line: 6, column: 0, file: !25, scope: !10)
-!24 = !DILocation(line: 9, scope: !3)
-!25 = !DIFile(filename: "test", directory: "/path/to/somewhere")
-!26 = !{i32 1, !"Debug Info Version", i32 3}
+!0 = !DIGlobalVariableExpression(var: !1)
+!1 = !DIGlobalVariable(name: "A", scope: null, file: !2, line: 1, type: !3, isLocal: false, isDefinition: true)
+!2 = !DIFile(filename: "test", directory: "/path/to/somewhere")
+!3 = !DICompositeType(tag: DW_TAG_array_type, baseType: !4, size: 32768, align: 32, elements: !5)
+!4 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!5 = !{!6}
+!6 = !{i32 786465, i64 0, i64 1024}
+!7 = !DIGlobalVariableExpression(var: !8)
+!8 = !DIGlobalVariable(name: "B", scope: null, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
+!9 = !DIGlobalVariableExpression(var: !10)
+!10 = !DIGlobalVariable(name: "C", scope: null, file: !2, line: 3, type: !3, isLocal: false, isDefinition: true)
+!11 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !2, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !12, retainedTypes: !12, globals: !13)
+!12 = !{}
+!13 = !{!0, !7, !9}
+!14 = !{i32 1, !"Debug Info Version", i32 3}
+!15 = distinct !DISubprogram(name: "test", linkageName: "test", scope: !2, file: !2, line: 5, type: !16, isLocal: false, isDefinition: true, scopeLine: 5, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !11, variables: !18)
+!16 = !DISubroutineType(types: !17)
+!17 = !{!4}
+!18 = !{!19}
+!19 = !DILocalVariable(name: "i", scope: !20, file: !2, line: 6, type: !4)
+!20 = distinct !DILexicalBlock(scope: !15, file: !2, line: 6)
+!21 = !DIExpression()
+!22 = !DILocation(line: 6, scope: !20)
+!23 = !DILocation(line: 7, scope: !24)
+!24 = distinct !DILexicalBlock(scope: !20, file: !2, line: 6)
+!25 = !DILocation(line: 9, scope: !15)
+