Manman Ren | e8064c9 | 2013-07-24 18:56:43 +0000 | [diff] [blame] | 1 | ; RUN: llc %s -mtriple=i386-apple-macosx10.6.7 -o /dev/null |
Rafael Espindola | fa384e6 | 2011-06-17 14:16:17 +0000 | [diff] [blame] | 2 | |
| 3 | ; This used to crash because early dup was not ignoring debug instructions. |
| 4 | |
| 5 | %struct.cpp_dir = type { %struct.cpp_dir*, i8*, i32, i8, i8**, i8*, i8* (i8*, %struct.cpp_dir*)*, i64, i32, i8 } |
| 6 | |
Adrian Prantl | 87b7eb9 | 2014-10-01 18:55:02 +0000 | [diff] [blame] | 7 | declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone |
Rafael Espindola | fa384e6 | 2011-06-17 14:16:17 +0000 | [diff] [blame] | 8 | |
Peter Collingbourne | d4bff30 | 2015-11-05 22:03:56 +0000 | [diff] [blame] | 9 | define internal i8* @framework_construct_pathname(i8* %fname, %struct.cpp_dir* %dir) nounwind ssp !dbg !2 { |
Rafael Espindola | fa384e6 | 2011-06-17 14:16:17 +0000 | [diff] [blame] | 10 | entry: |
| 11 | br i1 undef, label %bb33, label %bb |
| 12 | |
| 13 | bb: ; preds = %entry |
| 14 | %tmp = icmp eq i32 undef, 0 |
| 15 | %tmp1 = add i32 0, 11 |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 16 | call void @llvm.dbg.value(metadata i32 %tmp1, i64 0, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) |
Rafael Espindola | fa384e6 | 2011-06-17 14:16:17 +0000 | [diff] [blame] | 17 | br i1 undef, label %bb18, label %bb31.preheader |
| 18 | |
| 19 | bb31.preheader: ; preds = %bb19, %bb |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 20 | %tmp2 = getelementptr inbounds i8, i8* %fname, i32 0 |
Rafael Espindola | fa384e6 | 2011-06-17 14:16:17 +0000 | [diff] [blame] | 21 | br label %bb31 |
| 22 | |
| 23 | bb18: ; preds = %bb |
| 24 | %tmp3 = icmp eq i32 undef, 0 |
| 25 | br i1 %tmp3, label %bb19, label %bb33 |
| 26 | |
| 27 | bb19: ; preds = %bb18 |
| 28 | call void @foobar(i32 0) |
| 29 | br label %bb31.preheader |
| 30 | |
| 31 | bb22: ; preds = %bb31 |
| 32 | %tmp4 = add i32 0, %tmp1 |
| 33 | call void @foobar(i32 %tmp4) |
| 34 | br i1 undef, label %bb33, label %bb31 |
| 35 | |
| 36 | bb31: ; preds = %bb22, %bb31.preheader |
| 37 | br i1 false, label %bb33, label %bb22 |
| 38 | |
| 39 | bb33: ; preds = %bb31, %bb22, %bb18, %entry |
| 40 | ret i8* undef |
| 41 | } |
| 42 | |
| 43 | declare void @foobar(i32) |
| 44 | |
Manman Ren | e9a52e1 | 2013-07-29 18:12:58 +0000 | [diff] [blame] | 45 | !llvm.dbg.cu = !{!4} |
Manman Ren | 409558f | 2013-11-22 21:49:45 +0000 | [diff] [blame] | 46 | !llvm.module.flags = !{!47} |
Duncan P. N. Exon Smith | ed013cd | 2015-07-31 18:58:39 +0000 | [diff] [blame] | 47 | !0 = !DILocalVariable(name: "frname_len", line: 517, scope: !1, file: !3, type: !38) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 48 | !1 = distinct !DILexicalBlock(line: 515, column: 0, file: !44, scope: !2) |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 49 | !2 = distinct !DISubprogram(name: "framework_construct_pathname", line: 515, isLocal: true, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !4, file: !44, scope: null, type: !5) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 50 | !3 = !DIFile(filename: "darwin-c.c", directory: "/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config") |
Adrian Prantl | 75819ae | 2016-04-15 15:57:41 +0000 | [diff] [blame] | 51 | !4 = distinct !DICompileUnit(language: DW_LANG_C89, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, emissionKind: FullDebug, file: !44, enums: !46, retainedTypes: !46) |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 52 | !5 = !DISubroutineType(types: !6) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 53 | !6 = !{!7, !9, !11} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 54 | !7 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !44, scope: !3, baseType: !8) |
| 55 | !8 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char) |
| 56 | !9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !44, scope: !3, baseType: !10) |
| 57 | !10 = !DIDerivedType(tag: DW_TAG_const_type, size: 8, align: 8, file: !44, scope: !3, baseType: !8) |
| 58 | !11 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !44, scope: !3, baseType: !12) |
| 59 | !12 = !DIDerivedType(tag: DW_TAG_typedef, name: "cpp_dir", line: 45, file: !41, scope: !13, baseType: !14) |
| 60 | !13 = !DIFile(filename: "cpplib.h", directory: "/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/../libcpp/include") |
| 61 | !14 = !DICompositeType(tag: DW_TAG_structure_type, name: "cpp_dir", line: 43, size: 352, align: 32, file: !41, scope: !3, elements: !15) |
Duncan P. N. Exon Smith | be7ea19 | 2014-12-15 19:07:53 +0000 | [diff] [blame] | 62 | !15 = !{!16, !18, !19, !21, !23, !25, !27, !29, !33, !36} |
Duncan P. N. Exon Smith | a9308c4 | 2015-04-29 16:38:44 +0000 | [diff] [blame] | 63 | !16 = !DIDerivedType(tag: DW_TAG_member, name: "next", line: 572, size: 32, align: 32, file: !41, scope: !14, baseType: !17) |
| 64 | !17 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !44, scope: !3, baseType: !14) |
| 65 | !18 = !DIDerivedType(tag: DW_TAG_member, name: "name", line: 575, size: 32, align: 32, offset: 32, file: !41, scope: !14, baseType: !7) |
| 66 | !19 = !DIDerivedType(tag: DW_TAG_member, name: "len", line: 576, size: 32, align: 32, offset: 64, file: !41, scope: !14, baseType: !20) |
| 67 | !20 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) |
| 68 | !21 = !DIDerivedType(tag: DW_TAG_member, name: "sysp", line: 580, size: 8, align: 8, offset: 96, file: !41, scope: !14, baseType: !22) |
| 69 | !22 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char) |
| 70 | !23 = !DIDerivedType(tag: DW_TAG_member, name: "name_map", line: 584, size: 32, align: 32, offset: 128, file: !41, scope: !14, baseType: !24) |
| 71 | !24 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !44, scope: !3, baseType: !9) |
| 72 | !25 = !DIDerivedType(tag: DW_TAG_member, name: "header_map", line: 590, size: 32, align: 32, offset: 160, file: !41, scope: !14, baseType: !26) |
| 73 | !26 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !44, scope: !3, baseType: null) |
| 74 | !27 = !DIDerivedType(tag: DW_TAG_member, name: "construct", line: 597, size: 32, align: 32, offset: 192, file: !41, scope: !14, baseType: !28) |
| 75 | !28 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !44, scope: !3, baseType: !5) |
| 76 | !29 = !DIDerivedType(tag: DW_TAG_member, name: "ino", line: 601, size: 64, align: 64, offset: 224, file: !41, scope: !14, baseType: !30) |
| 77 | !30 = !DIDerivedType(tag: DW_TAG_typedef, name: "ino_t", line: 141, file: !42, scope: !31, baseType: !32) |
| 78 | !31 = !DIFile(filename: "types.h", directory: "/usr/include/sys") |
| 79 | !32 = !DIBasicType(tag: DW_TAG_base_type, name: "long long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned) |
| 80 | !33 = !DIDerivedType(tag: DW_TAG_member, name: "dev", line: 602, size: 32, align: 32, offset: 288, file: !41, scope: !14, baseType: !34) |
| 81 | !34 = !DIDerivedType(tag: DW_TAG_typedef, name: "dev_t", line: 107, file: !42, scope: !31, baseType: !35) |
| 82 | !35 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
| 83 | !36 = !DIDerivedType(tag: DW_TAG_member, name: "user_supplied_p", line: 605, size: 8, align: 8, offset: 320, file: !41, scope: !14, baseType: !37) |
| 84 | !37 = !DIBasicType(tag: DW_TAG_base_type, name: "_Bool", size: 8, align: 8, encoding: DW_ATE_boolean) |
| 85 | !38 = !DIDerivedType(tag: DW_TAG_typedef, name: "size_t", line: 326, file: !43, scope: !39, baseType: !40) |
| 86 | !39 = !DIFile(filename: "stddef.h", directory: "/Users/espindola/llvm/build-llvm-gcc/./prev-gcc/include") |
| 87 | !40 = !DIBasicType(tag: DW_TAG_base_type, name: "long unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned) |
| 88 | !41 = !DIFile(filename: "cpplib.h", directory: "/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/../libcpp/include") |
| 89 | !42 = !DIFile(filename: "types.h", directory: "/usr/include/sys") |
| 90 | !43 = !DIFile(filename: "stddef.h", directory: "/Users/espindola/llvm/build-llvm-gcc/./prev-gcc/include") |
| 91 | !44 = !DIFile(filename: "darwin-c.c", directory: "/Users/espindola/llvm/build-llvm-gcc/gcc/../../llvm-gcc-4.2/gcc/config") |
Duncan P. N. Exon Smith | 988a7f8 | 2015-03-27 20:46:33 +0000 | [diff] [blame] | 92 | !46 = !{} |
Duncan P. N. Exon Smith | e274180 | 2015-03-03 17:24:31 +0000 | [diff] [blame] | 93 | !47 = !{i32 1, !"Debug Info Version", i32 3} |