brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 7afb393 Raw
49 lines · plain
1; RUN: llvm-reduce --abort-on-invalid-reduction --test FileCheck --test-arg --check-prefixes=CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t2; RUN: FileCheck --check-prefixes=CHECK-FINAL --input-file=%t %s --implicit-check-not=#dbg_value3 4; Test that we can, in RemoveDIs mode / DbgVariableRecords mode (where variable location5; information isn't an instruction), remove one variable location assignment6; but not another.7 8; CHECK-INTERESTINGNESS:     #dbg_value(i32 %added,9 10; CHECK-FINAL:      %added = add11; CHECK-FINAL-NEXT: #dbg_value(i32 %added,12 13define i32 @main() !dbg !7 {14entry:15  %uninteresting1 = alloca i32, align 416  %interesting = alloca i32, align 417  %uninteresting2 = alloca i32, align 418  store i32 0, ptr %uninteresting1, align 419  store i32 0, ptr %interesting, align 420  %0 = load i32, ptr %interesting, align 421  %added = add nsw i32 %0, 122    #dbg_value(i32 %added, !13, !DIExpression(), !14)23  store i32 %added, ptr %interesting, align 424  %alsoloaded = load i32, ptr %interesting, align 425    #dbg_value(i32 %alsoloaded, !13, !DIExpression(), !14)26  store i32 %alsoloaded, ptr %uninteresting2, align 427  ret i32 028}29 30!llvm.dbg.cu = !{!0}31!llvm.module.flags = !{!2, !3, !4, !5, !6}32 33!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)34!1 = !DIFile(filename: "/tmp/a.c", directory: "/")35!2 = !{i32 7, !"Dwarf Version", i32 4}36!3 = !{i32 2, !"Debug Info Version", i32 3}37!4 = !{i32 1, !"wchar_size", i32 4}38!5 = !{i32 7, !"uwtable", i32 1}39!6 = !{i32 7, !"frame-pointer", i32 2}40!7 = distinct !DISubprogram(name: "main", scope: !8, file: !8, line: 1, type: !9, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)41!8 = !DIFile(filename: "/tmp/a.c", directory: "")42!9 = !DISubroutineType(types: !10)43!10 = !{!11}44!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)45!12 = !{}46!13 = !DILocalVariable(name: "a", scope: !7, file: !8, line: 2, type: !11)47!14 = !DILocation(line: 2, column: 7, scope: !7)48 49