brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · caae683 Raw
85 lines · plain
1; PR31381: An assertion in the DWARF backend when fragments in MMI slots are2; sorted by largest offset first.3; RUN: llc -mtriple=x86_64-apple-darwin -filetype=obj < %s | llvm-dwarfdump -v -debug-info - | FileCheck %s4; CHECK: DW_TAG_formal_parameter5; CHECK: DW_TAG_formal_parameter6; CHECK-NEXT: DW_AT_location [DW_FORM_exprloc] (DW_OP_fbreg -8, DW_OP_piece 0x3, DW_OP_piece 0x6, DW_OP_fbreg -3, DW_OP_piece 0x3)7; CHECK-NEXT: DW_AT_abstract_origin {{.*}}"p"8source_filename = "bugpoint-reduced-simplified.ll"9target triple = "x86_64-apple-darwin"10 11@f = common local_unnamed_addr global i32 0, align 4, !dbg !012@h = common local_unnamed_addr global i32 0, align 4, !dbg !613 14; Function Attrs: nounwind readnone15declare void @llvm.dbg.declare(metadata, metadata, metadata) #016 17define void @fn4() local_unnamed_addr !dbg !12 {18entry:19  %l1.sroa.7.i = alloca [3 x i8], align 120  tail call void @llvm.dbg.declare(metadata ptr %l1.sroa.7.i, metadata !15, metadata !26), !dbg !2721  %i.sroa.4.i = alloca [3 x i8], align 822  tail call void @llvm.dbg.declare(metadata ptr %i.sroa.4.i, metadata !15, metadata !32), !dbg !2723  %0 = load i32, ptr @h, align 424  br label %while.body.i.i, !dbg !3325 26while.body.i.i:                                   ; preds = %while.body.i.i, %entry27  br label %while.body.i.i, !dbg !3428 29fn3.exit:                                         ; No predecessors!30  %1 = load i32, ptr @f, align 431  %tobool.i = icmp eq i32 %1, 032  br label %while.body.i33 34while.body.i:                                     ; preds = %if.end.i, %fn3.exit35  br i1 %tobool.i, label %if.end.i, label %if.then.i36 37if.then.i:                                        ; preds = %while.body.i38  br label %if.end.i39 40if.end.i:                                         ; preds = %if.then.i, %while.body.i41  br label %while.body.i42}43 44attributes #0 = { nounwind readnone }45 46!llvm.dbg.cu = !{!2}47!llvm.module.flags = !{!9, !10, !11}48 49!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())50!1 = distinct !DIGlobalVariable(name: "f", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true)51!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5)52!3 = !DIFile(filename: "PR31381.c", directory: "/")53!4 = !{}54!5 = !{!0, !6}55!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression())56!7 = distinct !DIGlobalVariable(name: "h", scope: !2, file: !3, line: 8, type: !8, isLocal: false, isDefinition: true)57!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)58!9 = !{i32 2, !"Dwarf Version", i32 4}59!10 = !{i32 2, !"Debug Info Version", i32 3}60!11 = !{i32 1, !"PIC Level", i32 2}61!12 = distinct !DISubprogram(name: "fn4", scope: !3, file: !3, line: 31, type: !13, isLocal: false, isDefinition: true, scopeLine: 32, isOptimized: true, unit: !2, retainedNodes: !4)62!13 = !DISubroutineType(types: !14)63!14 = !{null}64!15 = !DILocalVariable(name: "p", arg: 1, scope: !16, file: !3, line: 19, type: !19)65!16 = distinct !DISubprogram(name: "fn2", scope: !3, file: !3, line: 19, type: !17, isLocal: false, isDefinition: true, scopeLine: 20, flags: DIFlagPrototyped, isOptimized: true, unit: !2, retainedNodes: !25)66!17 = !DISubroutineType(types: !18)67!18 = !{null, !19}68!19 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "S", file: !3, line: 1, size: 96, elements: !20)69!20 = !{!21, !23, !24}70!21 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !19, file: !3, line: 4, baseType: !22, size: 8, offset: 24)71!22 = !DIBasicType(name: "char", size: 8, encoding: DW_ATE_signed_char)72!23 = !DIDerivedType(tag: DW_TAG_member, name: "c", scope: !19, file: !3, line: 5, baseType: !8, size: 32, offset: 32)73!24 = !DIDerivedType(tag: DW_TAG_member, name: "d", scope: !19, file: !3, line: 6, baseType: !8, size: 6, offset: 64, flags: DIFlagBitField, extraData: i64 64)74!25 = !{!15}75!26 = !DIExpression(DW_OP_LLVM_fragment, 72, 24)76!27 = !DILocation(line: 19, column: 20, scope: !16, inlinedAt: !28)77!28 = distinct !DILocation(line: 27, column: 3, scope: !29, inlinedAt: !30)78!29 = distinct !DISubprogram(name: "fn3", scope: !3, file: !3, line: 24, type: !13, isLocal: false, isDefinition: true, scopeLine: 25, isOptimized: true, unit: !2, retainedNodes: !4)79!30 = distinct !DILocation(line: 34, column: 7, scope: !31)80!31 = distinct !DILexicalBlock(scope: !12, file: !3, line: 33, column: 5)81!32 = !DIExpression(DW_OP_LLVM_fragment, 0, 24)82!33 = !DILocation(line: 22, column: 9, scope: !16, inlinedAt: !28)83!34 = !DILocation(line: 21, column: 3, scope: !35, inlinedAt: !28)84!35 = !DILexicalBlockFile(scope: !16, file: !3, discriminator: 2)85