Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s - | FileCheck %s
      2 ; Radar 9309221
      3 ; Test dwarf reg no for s16
      4 ;CHECK: DW_OP_regx for S register
      5 ;CHECK-NEXT: ascii
      6 ;CHECK-NEXT: DW_OP_bit_piece 32 0
      7 
      8 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
      9 target triple = "thumbv7-apple-macosx10.6.7"
     10 
     11 @.str = private unnamed_addr constant [11 x i8] c"%p %lf %c\0A\00"
     12 @.str1 = private unnamed_addr constant [6 x i8] c"point\00"
     13 
     14 define i32 @inlineprinter(i8* %ptr, float %val, i8 zeroext %c) nounwind optsize ssp {
     15 entry:
     16   tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 0, metadata !8), !dbg !24
     17   tail call void @llvm.dbg.value(metadata !{float %val}, i64 0, metadata !10), !dbg !25
     18   tail call void @llvm.dbg.value(metadata !{i8 %c}, i64 0, metadata !12), !dbg !26
     19   %conv = fpext float %val to double, !dbg !27
     20   %conv3 = zext i8 %c to i32, !dbg !27
     21   %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !27
     22   ret i32 0, !dbg !29
     23 }
     24 
     25 declare i32 @printf(i8* nocapture, ...) nounwind optsize
     26 
     27 define i32 @printer(i8* %ptr, float %val, i8 zeroext %c) nounwind optsize noinline ssp {
     28 entry:
     29   tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 0, metadata !14), !dbg !30
     30   tail call void @llvm.dbg.value(metadata !{float %val}, i64 0, metadata !15), !dbg !31
     31   tail call void @llvm.dbg.value(metadata !{i8 %c}, i64 0, metadata !16), !dbg !32
     32   %conv = fpext float %val to double, !dbg !33
     33   %conv3 = zext i8 %c to i32, !dbg !33
     34   %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !33
     35   ret i32 0, !dbg !35
     36 }
     37 
     38 define i32 @main(i32 %argc, i8** nocapture %argv) nounwind optsize ssp {
     39 entry:
     40   tail call void @llvm.dbg.value(metadata !{i32 %argc}, i64 0, metadata !17), !dbg !36
     41   tail call void @llvm.dbg.value(metadata !{i8** %argv}, i64 0, metadata !18), !dbg !37
     42   %conv = sitofp i32 %argc to double, !dbg !38
     43   %add = fadd double %conv, 5.555552e+05, !dbg !38
     44   %conv1 = fptrunc double %add to float, !dbg !38
     45   tail call void @llvm.dbg.value(metadata !{float %conv1}, i64 0, metadata !22), !dbg !38
     46   %call = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0)) nounwind optsize, !dbg !39
     47   %add.ptr = getelementptr i8* bitcast (i32 (i32, i8**)* @main to i8*), i32 %argc, !dbg !40
     48   %add5 = add nsw i32 %argc, 97, !dbg !40
     49   %conv6 = trunc i32 %add5 to i8, !dbg !40
     50   tail call void @llvm.dbg.value(metadata !{i8* %add.ptr}, i64 0, metadata !8) nounwind, !dbg !41
     51   tail call void @llvm.dbg.value(metadata !{float %conv1}, i64 0, metadata !10) nounwind, !dbg !42
     52   tail call void @llvm.dbg.value(metadata !{i8 %conv6}, i64 0, metadata !12) nounwind, !dbg !43
     53   %conv.i = fpext float %conv1 to double, !dbg !44
     54   %conv3.i = and i32 %add5, 255, !dbg !44
     55   %call.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %add.ptr, double %conv.i, i32 %conv3.i) nounwind optsize, !dbg !44
     56   %call14 = tail call i32 @printer(i8* %add.ptr, float %conv1, i8 zeroext %conv6) optsize, !dbg !45
     57   ret i32 0, !dbg !46
     58 }
     59 
     60 declare i32 @puts(i8* nocapture) nounwind optsize
     61 
     62 declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
     63 
     64 !llvm.dbg.cu = !{!2}
     65 
     66 !0 = metadata !{i32 786478, i32 0, metadata !1, metadata !"inlineprinter", metadata !"inlineprinter", metadata !"", metadata !1, i32 5, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i8*, float, i8)* @inlineprinter, null, null, metadata !48, i32 5} ; [ DW_TAG_subprogram ]
     67 !1 = metadata !{i32 786473, metadata !51} ; [ DW_TAG_file_type ]
     68 !2 = metadata !{i32 786449, i32 0, i32 12, metadata !1, metadata !"clang version 3.0 (trunk 129915)", i1 true, metadata !"", i32 0, null, null, metadata !47, null, null} ; [ DW_TAG_compile_unit ]
     69 !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 ]
     70 !4 = metadata !{metadata !5}
     71 !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 ]
     72 !6 = metadata !{i32 786478, i32 0, metadata !1, metadata !"printer", metadata !"printer", metadata !"", metadata !1, i32 12, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i8*, float, i8)* @printer, null, null, metadata !49, i32 12} ; [ DW_TAG_subprogram ]
     73 !7 = metadata !{i32 786478, i32 0, metadata !1, metadata !"main", metadata !"main", metadata !"", metadata !1, i32 18, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 256, i1 true, i32 (i32, i8**)* @main, null, null, metadata !50, i32 18} ; [ DW_TAG_subprogram ]
     74 !8 = metadata !{i32 786689, metadata !0, metadata !"ptr", metadata !1, i32 16777220, metadata !9, i32 0, null} ; [ DW_TAG_arg_variable ]
     75 !9 = metadata !{i32 786447, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ]
     76 !10 = metadata !{i32 786689, metadata !0, metadata !"val", metadata !1, i32 33554436, metadata !11, i32 0, null} ; [ DW_TAG_arg_variable ]
     77 !11 = metadata !{i32 786468, metadata !2, metadata !"float", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ]
     78 !12 = metadata !{i32 786689, metadata !0, metadata !"c", metadata !1, i32 50331652, metadata !13, i32 0, null} ; [ DW_TAG_arg_variable ]
     79 !13 = 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 ]
     80 !14 = metadata !{i32 786689, metadata !6, metadata !"ptr", metadata !1, i32 16777227, metadata !9, i32 0, null} ; [ DW_TAG_arg_variable ]
     81 !15 = metadata !{i32 786689, metadata !6, metadata !"val", metadata !1, i32 33554443, metadata !11, i32 0, null} ; [ DW_TAG_arg_variable ]
     82 !16 = metadata !{i32 786689, metadata !6, metadata !"c", metadata !1, i32 50331659, metadata !13, i32 0, null} ; [ DW_TAG_arg_variable ]
     83 !17 = metadata !{i32 786689, metadata !7, metadata !"argc", metadata !1, i32 16777233, metadata !5, i32 0, null} ; [ DW_TAG_arg_variable ]
     84 !18 = metadata !{i32 786689, metadata !7, metadata !"argv", metadata !1, i32 33554449, metadata !19, i32 0, null} ; [ DW_TAG_arg_variable ]
     85 !19 = metadata !{i32 786447, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !20} ; [ DW_TAG_pointer_type ]
     86 !20 = metadata !{i32 786447, metadata !2, metadata !"", null, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !21} ; [ DW_TAG_pointer_type ]
     87 !21 = metadata !{i32 786468, metadata !2, metadata !"char", null, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ]
     88 !22 = metadata !{i32 786688, metadata !23, metadata !"dval", metadata !1, i32 19, metadata !11, i32 0, null} ; [ DW_TAG_auto_variable ]
     89 !23 = metadata !{i32 786443, metadata !7, i32 18, i32 1, metadata !1, i32 2} ; [ DW_TAG_lexical_block ]
     90 !24 = metadata !{i32 4, i32 22, metadata !0, null}
     91 !25 = metadata !{i32 4, i32 33, metadata !0, null}
     92 !26 = metadata !{i32 4, i32 52, metadata !0, null}
     93 !27 = metadata !{i32 6, i32 3, metadata !28, null}
     94 !28 = metadata !{i32 786443, metadata !0, i32 5, i32 1, metadata !1, i32 0} ; [ DW_TAG_lexical_block ]
     95 !29 = metadata !{i32 7, i32 3, metadata !28, null}
     96 !30 = metadata !{i32 11, i32 42, metadata !6, null}
     97 !31 = metadata !{i32 11, i32 53, metadata !6, null}
     98 !32 = metadata !{i32 11, i32 72, metadata !6, null}
     99 !33 = metadata !{i32 13, i32 3, metadata !34, null}
    100 !34 = metadata !{i32 786443, metadata !6, i32 12, i32 1, metadata !1, i32 1} ; [ DW_TAG_lexical_block ]
    101 !35 = metadata !{i32 14, i32 3, metadata !34, null}
    102 !36 = metadata !{i32 17, i32 15, metadata !7, null}
    103 !37 = metadata !{i32 17, i32 28, metadata !7, null}
    104 !38 = metadata !{i32 19, i32 31, metadata !23, null}
    105 !39 = metadata !{i32 20, i32 3, metadata !23, null}
    106 !40 = metadata !{i32 21, i32 3, metadata !23, null}
    107 !41 = metadata !{i32 4, i32 22, metadata !0, metadata !40}
    108 !42 = metadata !{i32 4, i32 33, metadata !0, metadata !40}
    109 !43 = metadata !{i32 4, i32 52, metadata !0, metadata !40}
    110 !44 = metadata !{i32 6, i32 3, metadata !28, metadata !40}
    111 !45 = metadata !{i32 22, i32 3, metadata !23, null}
    112 !46 = metadata !{i32 23, i32 1, metadata !23, null}
    113 !47 = metadata !{metadata !0, metadata !6, metadata !7}
    114 !48 = metadata !{metadata !8, metadata !10, metadata !12}
    115 !49 = metadata !{metadata !14, metadata !15, metadata !16}
    116 !50 = metadata !{metadata !17, metadata !18, metadata !22}
    117 !51 = metadata !{metadata !"a.c", metadata !"/private/tmp"}
    118