1 ; RUN: llc < %s | FileCheck %s 2 ; RUN: llc < %s -regalloc=basic | FileCheck %s 3 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" 4 target triple = "x86_64-apple-darwin10.0.0" 5 ;Radar 8950491 6 7 ;CHECK: .long Lset5 8 ;CHECK-NEXT: ## DW_AT_decl_file 9 ;CHECK-NEXT: ## DW_AT_decl_line 10 ;CHECK-NEXT: ## DW_AT_type 11 ;CHECK-NEXT: ## DW_AT_location 12 13 @dfm = external global i32, align 4 14 15 declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone 16 17 define i32 @foo(i32 %dev, i64 %cmd, i8* %data, i32 %data2) nounwind optsize ssp { 18 entry: 19 call void @llvm.dbg.value(metadata !{i32 %dev}, i64 0, metadata !12), !dbg !13 20 %tmp.i = load i32* @dfm, align 4, !dbg !14 21 %cmp.i = icmp eq i32 %tmp.i, 0, !dbg !14 22 br i1 %cmp.i, label %if.else, label %if.end.i, !dbg !14 23 24 if.end.i: ; preds = %entry 25 switch i64 %cmd, label %if.then [ 26 i64 2147772420, label %bb.i 27 i64 536897538, label %bb116.i 28 ], !dbg !22 29 30 bb.i: ; preds = %if.end.i 31 unreachable 32 33 bb116.i: ; preds = %if.end.i 34 unreachable 35 36 if.then: ; preds = %if.end.i 37 ret i32 undef, !dbg !23 38 39 if.else: ; preds = %entry 40 ret i32 0 41 } 42 43 declare hidden fastcc i32 @bar(i32, i32* nocapture) nounwind optsize ssp 44 declare hidden fastcc i32 @bar2(i32) nounwind optsize ssp 45 declare hidden fastcc i32 @bar3(i32) nounwind optsize ssp 46 declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone 47 48 !llvm.dbg.cu = !{!2} 49 50 !0 = metadata !{i32 786478, i32 0, metadata !1, metadata !"foo", metadata !"foo", metadata !"", metadata !1, i32 19510, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i32, i64, i8*, i32)* @foo, null, null, null, i32 19510} ; [ DW_TAG_subprogram ] 51 !1 = metadata !{i32 786473, metadata !26} ; [ DW_TAG_file_type ] 52 !2 = metadata !{i32 786449, i32 0, i32 12, metadata !25, metadata !"clang version 2.9 (trunk 124753)", i1 true, metadata !"", i32 0, null, null, metadata !24, null, null} ; [ DW_TAG_compile_unit ] 53 !3 = metadata !{i32 786453, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !4, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] 54 !4 = metadata !{metadata !5} 55 !5 = metadata !{i32 786468, metadata !2, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ] 56 !6 = metadata !{i32 786478, i32 0, metadata !1, metadata !"bar3", metadata !"bar3", metadata !"", metadata !1, i32 14827, metadata !3, i1 true, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i32)* @bar3} ; [ DW_TAG_subprogram ] 57 !7 = metadata !{i32 786478, i32 0, metadata !1, metadata !"bar2", metadata !"bar2", metadata !"", metadata !1, i32 15397, metadata !3, i1 true, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i32)* @bar2} ; [ DW_TAG_subprogram ] 58 !8 = metadata !{i32 786478, i32 0, metadata !1, metadata !"bar", metadata !"bar", metadata !"", metadata !1, i32 12382, metadata !9, i1 true, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i32, i32*)* @bar} ; [ DW_TAG_subprogram ] 59 !9 = metadata !{i32 786453, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !10, i32 0, i32 0} ; [ DW_TAG_subroutine_type ] 60 !10 = metadata !{metadata !11} 61 !11 = metadata !{i32 786468, metadata !2, metadata !"unsigned char", null, i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ] 62 !12 = metadata !{i32 786689, metadata !0, metadata !"var", metadata !1, i32 19509, metadata !5, i32 0, null} ; [ DW_TAG_arg_variable ] 63 !13 = metadata !{i32 19509, i32 20, metadata !0, null} 64 !14 = metadata !{i32 18091, i32 2, metadata !15, metadata !17} 65 !15 = metadata !{i32 786443, metadata !16, i32 18086, i32 1, metadata !1, i32 748} ; [ DW_TAG_lexical_block ] 66 !16 = metadata !{i32 786478, i32 0, metadata !1, metadata !"foo_bar", metadata !"foo_bar", metadata !"", metadata !1, i32 18086, metadata !3, i1 true, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, null} ; [ DW_TAG_subprogram ] 67 !17 = metadata !{i32 19514, i32 2, metadata !18, null} 68 !18 = metadata !{i32 786443, metadata !0, i32 19510, i32 1, metadata !1, i32 99} ; [ DW_TAG_lexical_block ] 69 !22 = metadata !{i32 18094, i32 2, metadata !15, metadata !17} 70 !23 = metadata !{i32 19524, i32 1, metadata !18, null} 71 !24 = metadata !{metadata !0, metadata !6, metadata !7, metadata !8} 72 !25 = metadata !{i32 786473, metadata !27} ; [ DW_TAG_file_type ] 73 !26 = metadata !{metadata !"/tmp/f.c", metadata !"/tmp"} 74 !27 = metadata !{metadata !"f.i", metadata !"/tmp"} 75