Home | History | Annotate | Download | only in X86
      1 ; RUN: llc < %s | FileCheck %s
      2 ; This is mainly a crasher for the revert in r234717.  A debug info intrinsic
      3 ; that gets deleted can't have its bit piece expression verified after it's
      4 ; deleted.
      5 
      6 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
      7 target triple = "x86_64-apple-macosx10.8.0"
      8 
      9 ; CHECK: __Z3foov:
     10 ; CHECK: retq
     11 
     12 define void @_Z3foov() !dbg !12 {
     13 entry:
     14   br i1 undef, label %exit, label %bb
     15 
     16 bb:                                               ; preds = %entry
     17   call void @llvm.dbg.value(metadata i8* undef, i64 0, metadata !15, metadata !16), !dbg !17
     18   br label %exit
     19 
     20 exit:                                             ; preds = %bb, %entry
     21   ret void
     22 }
     23 
     24 declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
     25 
     26 !llvm.module.flags = !{!0, !1}
     27 !llvm.dbg.cu = !{!2}
     28 
     29 !0 = !{i32 2, !"Dwarf Version", i32 2}
     30 !1 = !{i32 2, !"Debug Info Version", i32 3}
     31 !2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !4, imports: !4)
     32 !3 = !DIFile(filename: "foo.cpp", directory: "/path/to/dir")
     33 !4 = !{}
     34 !5 = !{!6}
     35 !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "Class", size: 64, align: 64, elements: !7, identifier: "_ZT5Class")
     36 !7 = !{!8, !10}
     37 !8 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !6, baseType: !9, size: 32, align: 32)
     38 !9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
     39 !10 = !DIDerivedType(tag: DW_TAG_member, name: "b", scope: !6, baseType: !9, size: 32, align: 32)
     40 !12 = distinct !DISubprogram(name: "foo", scope: null, file: !3, type: !13, isLocal: false, isDefinition: true, isOptimized: false, unit: !2)
     41 !13 = !DISubroutineType(types: !14)
     42 !14 = !{null}
     43 !15 = !DILocalVariable(name: "v", scope: !12, type: !6)
     44 !16 = !DIExpression(DW_OP_bit_piece, 32, 32)
     45 !17 = !DILocation(line: 2755, column: 9, scope: !12)
     46