brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · c28fde8 Raw
61 lines · plain
1; RUN: opt -S -passes=gvn-hoist < %s | FileCheck %s2 3; Check that the debug info is dropped as per the debug info update guide4 5@G = external global i32, align 46 7; CHECK-LABEL: @foo8; CHECK-NOT:  store {{.*}}dbg9define void @foo(i32 %c1) !dbg !6 {10entry:11  call void @llvm.dbg.value(metadata i32 0, metadata !9, metadata !DIExpression()), !dbg !1112  switch i32 %c1, label %exit1 [13    i32 0, label %sw014    i32 1, label %sw115  ], !dbg !1116 17sw0:                                              ; preds = %entry18  store i32 1, ptr @G, align 4, !dbg !1219  br label %exit, !dbg !1320 21sw1:                                              ; preds = %entry22  store i32 1, ptr @G, align 4, !dbg !1423  br label %exit, !dbg !1524 25exit1:                                            ; preds = %entry26  store i32 1, ptr @G, align 4, !dbg !1627  ret void, !dbg !1728 29exit:                                             ; preds = %sw1, %sw030  ret void, !dbg !1831}32 33; Function Attrs: nofree nosync nounwind readnone speculatable willreturn34declare void @llvm.dbg.value(metadata, metadata, metadata) #035 36attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }37 38!llvm.dbg.cu = !{!0}39!llvm.debugify = !{!3, !4}40!llvm.module.flags = !{!5}41 42!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)43!1 = !DIFile(filename: "abc.ll", directory: "/")44!2 = !{}45!3 = !{i32 8}46!4 = !{i32 1}47!5 = !{i32 2, !"Debug Info Version", i32 3}48!6 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 1, type: !7, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !8)49!7 = !DISubroutineType(types: !2)50!8 = !{!9}51!9 = !DILocalVariable(name: "1", scope: !6, file: !1, line: 1, type: !10)52!10 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)53!11 = !DILocation(line: 1, column: 1, scope: !6)54!12 = !DILocation(line: 2, column: 1, scope: !6)55!13 = !DILocation(line: 3, column: 1, scope: !6)56!14 = !DILocation(line: 4, column: 1, scope: !6)57!15 = !DILocation(line: 5, column: 1, scope: !6)58!16 = !DILocation(line: 6, column: 1, scope: !6)59!17 = !DILocation(line: 7, column: 1, scope: !6)60!18 = !DILocation(line: 8, column: 1, scope: !6)61