brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · ed89609 Raw
52 lines · plain
1# RUN: llc -O0 -mtriple x86_64-pc-linux-gnu -run-pass register-coalescer -verify-coalescing -o - %s | FileCheck %s2 3--- |4  define i16 @main() {5  entry:6    call void @llvm.dbg.value(metadata i8 0, metadata !11, metadata !DIExpression()), !dbg !137    ret i16 08  }9 10  ; Function Attrs: nounwind readnone speculatable11  declare void @llvm.dbg.value(metadata, metadata, metadata)12 13  !llvm.dbg.cu = !{!0}14  !llvm.module.flags = !{!3, !4, !5}15  !llvm.ident = !{!6}16 17  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)18  !1 = !DIFile(filename: "tmp.c", directory: "")19  !2 = !{}20  !3 = !{i32 2, !"Dwarf Version", i32 4}21  !4 = !{i32 2, !"Debug Info Version", i32 3}22  !5 = !{i32 1, !"wchar_size", i32 1}23  !6 = !{!"clang"}24  !7 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 4, type: !8, isLocal: false, isDefinition: true, scopeLine: 4, isOptimized: false, unit: !0, retainedNodes: !2)25  !8 = !DISubroutineType(types: !9)26  !9 = !{!10}27  !10 = !DIBasicType(name: "int", size: 16, encoding: DW_ATE_signed)28  !11 = !DILocalVariable(name: "c", scope: !7, file: !1, line: 5, type: !12)29  !12 = !DIBasicType(name: "mytype", size: 16)30  !13 = !DILocation(line: 5, column: 11, scope: !7)31 32...33---34name:            main35tracksRegLiveness: true36body:             |37  bb.0.entry:38    %0:gr16_abcd = MOV16ri 039    DBG_VALUE %0.sub_8bit:gr16_abcd, $noreg, !11, !DIExpression(), debug-location !1340    undef %6.sub_8bit:gr16_abcd = COPY killed %0.sub_8bit41    dead $dx = COPY killed %642 43...44 45# Verify that we get $dl in the DBG_VALUE (and not $dx.sub_8bit as we used to46# do before the bugfix, which resulted in "Bad machine code: Illegal47# subregister index for physical register").48#49# CHECK:      bb.0.entry:50# CHECK-NEXT:    $dx = MOV16ri 051# CHECK-NEXT:    DBG_VALUE $dl,52