brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 46d1715 Raw
53 lines · plain
1; RUN: opt %s -verify-debuginfo-preserve -passes=instcombine -disable-output 2>&1 | FileCheck --check-prefix=VERIFY %s2 3; VERIFY: CheckModuleDebugify (original debuginfo):4 5; RUN: opt %s -verify-each-debuginfo-preserve -O2 -disable-output 2>&1 | FileCheck --check-prefix=VERIFY-EACH %s6 7; VERIFY-EACH: DeadArgumentEliminationPass8; VERIFY-EACH: GlobalDCEPass9 10; ModuleID = 'm.c'11source_filename = "m.c"12target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"13target triple = "x86_64-unknown-linux-gnu"14 15; Function Attrs: noinline nounwind optnone uwtable16define dso_local i32 @foo(i32 %i) !dbg !8 {17entry:18  %i.addr = alloca i32, align 419  store i32 %i, ptr %i.addr, align 420  call void @llvm.dbg.declare(metadata ptr %i.addr, metadata !13, metadata !DIExpression()), !dbg !1421  %0 = load i32, ptr %i.addr, align 4, !dbg !1522  %call = call i32 @goo(i32 %0), !dbg !1623  ret i32 %call, !dbg !1724}25 26; Function Attrs: nofree nosync nounwind readnone speculatable willreturn27declare void @llvm.dbg.declare(metadata, metadata, metadata)28 29declare dso_local i32 @goo(i32)30 31!llvm.dbg.cu = !{!0}32!llvm.module.flags = !{!2, !3, !4, !5, !6}33!llvm.ident = !{!7}34 35!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)36!1 = !DIFile(filename: "m.c", directory: "/dir")37!2 = !{i32 7, !"Dwarf Version", i32 4}38!3 = !{i32 2, !"Debug Info Version", i32 3}39!4 = !{i32 1, !"wchar_size", i32 4}40!5 = !{i32 7, !"uwtable", i32 1}41!6 = !{i32 7, !"frame-pointer", i32 2}42!7 = !{!"clang version 14.0.0"}43!8 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 2, type: !9, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)44!9 = !DISubroutineType(types: !10)45!10 = !{!11, !11}46!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)47!12 = !{}48!13 = !DILocalVariable(name: "i", arg: 1, scope: !8, file: !1, line: 2, type: !11)49!14 = !DILocation(line: 2, column: 13, scope: !8)50!15 = !DILocation(line: 3, column: 14, scope: !8)51!16 = !DILocation(line: 3, column: 10, scope: !8)52!17 = !DILocation(line: 3, column: 3, scope: !8)53