1; RUN: opt %s -verify-debuginfo-preserve -passes=instcombine -disable-output 2>&1 | FileCheck --check-prefix=VERIFY %s 2; RUN: opt --experimental-debuginfo-iterators=false %s -verify-debuginfo-preserve -passes=instcombine -disable-output 2>&1 | FileCheck --check-prefix=VERIFY %s 3 4; VERIFY: CheckModuleDebugify (original debuginfo): 5 6; RUN: opt %s -verify-each-debuginfo-preserve -O2 -disable-output 2>&1 | FileCheck --check-prefix=VERIFY-EACH %s 7; RUN: opt %s --experimental-debuginfo-iterators=false -verify-each-debuginfo-preserve -O2 -disable-output 2>&1 | FileCheck --check-prefix=VERIFY-EACH %s 8 9; VERIFY-EACH: DeadArgumentEliminationPass 10; VERIFY-EACH: GlobalDCEPass 11 12; ModuleID = 'm.c' 13source_filename = "m.c" 14target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 15target triple = "x86_64-unknown-linux-gnu" 16 17; Function Attrs: noinline nounwind optnone uwtable 18define dso_local i32 @foo(i32 %i) !dbg !8 { 19entry: 20 %i.addr = alloca i32, align 4 21 store i32 %i, ptr %i.addr, align 4 22 call void @llvm.dbg.declare(metadata ptr %i.addr, metadata !13, metadata !DIExpression()), !dbg !14 23 %0 = load i32, ptr %i.addr, align 4, !dbg !15 24 %call = call i32 @goo(i32 %0), !dbg !16 25 ret i32 %call, !dbg !17 26} 27 28; Function Attrs: nofree nosync nounwind readnone speculatable willreturn 29declare void @llvm.dbg.declare(metadata, metadata, metadata) 30 31declare dso_local i32 @goo(i32) 32 33!llvm.dbg.cu = !{!0} 34!llvm.module.flags = !{!2, !3, !4, !5, !6} 35!llvm.ident = !{!7} 36 37!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 14.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) 38!1 = !DIFile(filename: "m.c", directory: "/dir") 39!2 = !{i32 7, !"Dwarf Version", i32 4} 40!3 = !{i32 2, !"Debug Info Version", i32 3} 41!4 = !{i32 1, !"wchar_size", i32 4} 42!5 = !{i32 7, !"uwtable", i32 1} 43!6 = !{i32 7, !"frame-pointer", i32 2} 44!7 = !{!"clang version 14.0.0"} 45!8 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !9, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) 46!9 = !DISubroutineType(types: !10) 47!10 = !{!11, !11} 48!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 49!12 = !{} 50!13 = !DILocalVariable(name: "i", arg: 1, scope: !8, file: !1, line: 2, type: !11) 51!14 = !DILocation(line: 2, column: 13, scope: !8) 52!15 = !DILocation(line: 3, column: 14, scope: !8) 53!16 = !DILocation(line: 3, column: 10, scope: !8) 54!17 = !DILocation(line: 3, column: 3, scope: !8) 55