|
| 1 | +; RUN: llvm-as -disable-output < %s 2>&1 | FileCheck %s |
| 2 | + |
| 3 | +; CHECK: llvm.dbg.declare has larger fragment size than alloca size |
| 4 | +; CHECK-NEXT: call void @llvm.dbg.declare(metadata ptr %slice.dbg.spill, metadata !23, metadata !DIExpression()) |
| 5 | +; CHECK: llvm.dbg.declare has larger fragment size than alloca size |
| 6 | +; CHECK-NEXT: call void @llvm.dbg.declare(metadata ptr %slice.dbg.spill1, metadata !23, metadata !DIExpression()) |
| 7 | + |
| 8 | +%"EndianSlice<'_>" = type { { ptr, i64 }, i32, [1 x i32] } |
| 9 | + |
| 10 | +; example::test |
| 11 | +; Function Attrs: nonlazybind uwtable |
| 12 | +define void @_ZN7example4test17h64a501af0fe536ddE(ptr align 1 %s.0, i64 %s.1) unnamed_addr #0 !dbg !7 { |
| 13 | +start: |
| 14 | + %slice.dbg.spill1 = alloca i32, align 4 |
| 15 | + %slice.dbg.spill = alloca { ptr, i64 }, align 8 |
| 16 | + %s.dbg.spill = alloca { ptr, i64 }, align 8 |
| 17 | + %_2 = alloca %"EndianSlice<'_>", align 8 |
| 18 | + %0 = getelementptr inbounds { ptr, i64 }, ptr %s.dbg.spill, i32 0, i32 0 |
| 19 | + store ptr %s.0, ptr %0, align 8 |
| 20 | + %1 = getelementptr inbounds { ptr, i64 }, ptr %s.dbg.spill, i32 0, i32 1 |
| 21 | + store i64 %s.1, ptr %1, align 8 |
| 22 | + call void @llvm.dbg.declare(metadata ptr %s.dbg.spill, metadata !22, metadata !DIExpression()), !dbg !33 |
| 23 | + %2 = getelementptr inbounds { ptr, i64 }, ptr %slice.dbg.spill, i32 0, i32 0, !dbg !34 |
| 24 | + store ptr %s.0, ptr %2, align 8, !dbg !34 |
| 25 | + %3 = getelementptr inbounds { ptr, i64 }, ptr %slice.dbg.spill, i32 0, i32 1, !dbg !34 |
| 26 | + store i64 %s.1, ptr %3, align 8, !dbg !34 |
| 27 | + call void @llvm.dbg.declare(metadata ptr %slice.dbg.spill, metadata !23, metadata !DIExpression()), !dbg !35 |
| 28 | + store i32 1, ptr %slice.dbg.spill1, align 4, !dbg !34 |
| 29 | + call void @llvm.dbg.declare(metadata ptr %slice.dbg.spill1, metadata !23, metadata !DIExpression()), !dbg !35 |
| 30 | + ret void, !dbg !36 |
| 31 | +} |
| 32 | + |
| 33 | +; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) |
| 34 | +declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 |
| 35 | + |
| 36 | +attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" } |
| 37 | +attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } |
| 38 | + |
| 39 | +!llvm.module.flags = !{!0, !1, !2, !3} |
| 40 | +!llvm.ident = !{!4} |
| 41 | +!llvm.dbg.cu = !{!5} |
| 42 | + |
| 43 | +!0 = !{i32 8, !"PIC Level", i32 2} |
| 44 | +!1 = !{i32 2, !"RtLibUseGOT", i32 1} |
| 45 | +!2 = !{i32 2, !"Dwarf Version", i32 4} |
| 46 | +!3 = !{i32 2, !"Debug Info Version", i32 3} |
| 47 | +!4 = !{!"rustc version 1.74.0-nightly (5c6a7e71c 2023-08-20)"} |
| 48 | +!5 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !6, producer: "clang LLVM (rustc version 1.74.0-nightly (5c6a7e71c 2023-08-20))", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false) |
| 49 | +!6 = !DIFile(filename: "/app/example.rs/@/example.a6c375ed18e8f6d3-cgu.0", directory: "/app") |
| 50 | +!7 = distinct !DISubprogram(name: "test", linkageName: "_ZN7example4test17h64a501af0fe536ddE", scope: !9, file: !8, line: 9, type: !10, scopeLine: 9, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !5, templateParams: !20, retainedNodes: !21) |
| 51 | +!8 = !DIFile(filename: "example.rs", directory: "/app", checksumkind: CSK_MD5, checksum: "bd53c9e80c244adbeae5aa0d57de599d") |
| 52 | +!9 = !DINamespace(name: "example", scope: null) |
| 53 | +!10 = !DISubroutineType(types: !11) |
| 54 | +!11 = !{null, !12} |
| 55 | +!12 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[u8]", file: !13, size: 128, align: 64, elements: !14, templateParams: !20, identifier: "4f7d759e2003ffb713a77bd933fd0146") |
| 56 | +!13 = !DIFile(filename: "<unknown>", directory: "") |
| 57 | +!14 = !{!15, !18} |
| 58 | +!15 = !DIDerivedType(tag: DW_TAG_member, name: "data_ptr", scope: !12, file: !13, baseType: !16, size: 64, align: 64) |
| 59 | +!16 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !17, size: 64, align: 64, dwarfAddressSpace: 0) |
| 60 | +!17 = !DIBasicType(name: "u8", size: 8, encoding: DW_ATE_unsigned) |
| 61 | +!18 = !DIDerivedType(tag: DW_TAG_member, name: "length", scope: !12, file: !13, baseType: !19, size: 64, align: 64, offset: 64) |
| 62 | +!19 = !DIBasicType(name: "usize", size: 64, encoding: DW_ATE_unsigned) |
| 63 | +!20 = !{} |
| 64 | +!21 = !{!22, !23} |
| 65 | +!22 = !DILocalVariable(name: "s", arg: 1, scope: !7, file: !8, line: 9, type: !12) |
| 66 | +!23 = !DILocalVariable(name: "slice", scope: !24, file: !8, line: 10, type: !25, align: 8) |
| 67 | +!24 = distinct !DILexicalBlock(scope: !7, file: !8, line: 10, column: 5) |
| 68 | +!25 = !DICompositeType(tag: DW_TAG_structure_type, name: "EndianSlice", scope: !9, file: !13, size: 192, align: 64, elements: !26, templateParams: !20, identifier: "f1b6e593370159e9df4228aa26ace4b5") |
| 69 | +!26 = !{!27, !28} |
| 70 | +!27 = !DIDerivedType(tag: DW_TAG_member, name: "slice", scope: !25, file: !13, baseType: !12, size: 128, align: 64) |
| 71 | +!28 = !DIDerivedType(tag: DW_TAG_member, name: "endian", scope: !25, file: !13, baseType: !29, size: 32, align: 32, offset: 128) |
| 72 | +!29 = !DICompositeType(tag: DW_TAG_structure_type, name: "Endian", scope: !9, file: !13, size: 32, align: 32, elements: !30, templateParams: !20, identifier: "a76092aada82685a5b963f3da7ae1bd9") |
| 73 | +!30 = !{!31} |
| 74 | +!31 = !DIDerivedType(tag: DW_TAG_member, name: "__0", scope: !29, file: !13, baseType: !32, size: 32, align: 32) |
| 75 | +!32 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_signed) |
| 76 | +!33 = !DILocation(line: 9, column: 13, scope: !7) |
| 77 | +!34 = !DILocation(line: 10, column: 17, scope: !7) |
| 78 | +!35 = !DILocation(line: 10, column: 9, scope: !24) |
| 79 | +!36 = !DILocation(line: 11, column: 2, scope: !37) |
| 80 | +!37 = !DILexicalBlockFile(scope: !7, file: !8, discriminator: 0) |
0 commit comments