llvm.org GIT mirror llvm / 8859df5
Test case for r129922 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129934 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 8 years ago
1 changed file(s) with 105 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llc < %s - | FileCheck %s
1 ; Radar 9309221
2 ; Test dwarf reg no for d16
3 ;CHECK: DW_OP_regx
4 ;CHECK-NEXT: 272
5
6 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32"
7 target triple = "thumbv7-apple-darwin10"
8
9 @.str = private unnamed_addr constant [11 x i8] c"%p %lf %c\0A\00", align 4
10 @.str1 = private unnamed_addr constant [6 x i8] c"point\00", align 4
11
12 define i32 @inlineprinter(i8* %ptr, double %val, i8 zeroext %c) nounwind optsize {
13 entry:
14 tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 0, metadata !19), !dbg !26
15 tail call void @llvm.dbg.value(metadata !{double %val}, i64 0, metadata !20), !dbg !26
16 tail call void @llvm.dbg.value(metadata !{i8 %c}, i64 0, metadata !21), !dbg !26
17 %0 = zext i8 %c to i32, !dbg !27
18 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %val, i32 %0) nounwind, !dbg !27
19 ret i32 0, !dbg !29
20 }
21
22 define i32 @printer(i8* %ptr, double %val, i8 zeroext %c) nounwind optsize noinline {
23 entry:
24 tail call void @llvm.dbg.value(metadata !{i8* %ptr}, i64 0, metadata !16), !dbg !30
25 tail call void @llvm.dbg.value(metadata !{double %val}, i64 0, metadata !17), !dbg !30
26 tail call void @llvm.dbg.value(metadata !{i8 %c}, i64 0, metadata !18), !dbg !30
27 %0 = zext i8 %c to i32, !dbg !31
28 %1 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %ptr, double %val, i32 %0) nounwind, !dbg !31
29 ret i32 0, !dbg !33
30 }
31
32 declare i32 @printf(i8* nocapture, ...) nounwind
33
34 declare void @llvm.dbg.value(metadata, i64, metadata) nounwind readnone
35
36 define i32 @main(i32 %argc, i8** nocapture %argv) nounwind optsize {
37 entry:
38 tail call void @llvm.dbg.value(metadata !{i32 %argc}, i64 0, metadata !22), !dbg !34
39 tail call void @llvm.dbg.value(metadata !{i8** %argv}, i64 0, metadata !23), !dbg !34
40 %0 = sitofp i32 %argc to double, !dbg !35
41 %1 = fadd double %0, 5.555552e+05, !dbg !35
42 tail call void @llvm.dbg.value(metadata !{double %1}, i64 0, metadata !24), !dbg !35
43 %2 = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8]* @.str1, i32 0, i32 0)) nounwind, !dbg !36
44 %3 = getelementptr inbounds i8* bitcast (i32 (i32, i8**)* @main to i8*), i32 %argc, !dbg !37
45 %4 = trunc i32 %argc to i8, !dbg !37
46 %5 = add i8 %4, 97, !dbg !37
47 tail call void @llvm.dbg.value(metadata !{i8* %3}, i64 0, metadata !19) nounwind, !dbg !38
48 tail call void @llvm.dbg.value(metadata !{double %1}, i64 0, metadata !20) nounwind, !dbg !38
49 tail call void @llvm.dbg.value(metadata !{i8 %5}, i64 0, metadata !21) nounwind, !dbg !38
50 %6 = zext i8 %5 to i32, !dbg !39
51 %7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @.str, i32 0, i32 0), i8* %3, double %1, i32 %6) nounwind, !dbg !39
52 %8 = tail call i32 @printer(i8* %3, double %1, i8 zeroext %5) nounwind, !dbg !40
53 ret i32 0, !dbg !41
54 }
55
56 declare i32 @puts(i8* nocapture) nounwind
57
58 !llvm.dbg.sp = !{!0, !9, !10}
59 !llvm.dbg.lv.printer = !{!16, !17, !18}
60 !llvm.dbg.lv.inlineprinter = !{!19, !20, !21}
61 !llvm.dbg.lv.main = !{!22, !23, !24}
62
63 !0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"printer", metadata !"printer", metadata !"printer", metadata !1, i32 12, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 true, i32 (i8*, double, i8)* @printer} ; [ DW_TAG_subprogram ]
64 !1 = metadata !{i32 589865, metadata !"a.c", metadata !"/tmp/", metadata !2} ; [ DW_TAG_file_type ]
65 !2 = metadata !{i32 589841, i32 0, i32 1, metadata !"/tmp/a.c", metadata !"/tmp", metadata !"(LLVM build 00)", i1 true, i1 true, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
66 !3 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !4, i32 0, null} ; [ DW_TAG_subroutine_type ]
67 !4 = metadata !{metadata !5, metadata !6, metadata !7, metadata !8}
68 !5 = metadata !{i32 589860, metadata !1, metadata !"int", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
69 !6 = metadata !{i32 589839, metadata !1, metadata !"", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, null} ; [ DW_TAG_pointer_type ]
70 !7 = metadata !{i32 589860, metadata !1, metadata !"double", metadata !1, i32 0, i64 64, i64 32, i64 0, i32 0, i32 4} ; [ DW_TAG_base_type ]
71 !8 = metadata !{i32 589860, metadata !1, metadata !"unsigned char", metadata !1, i32 0, i64 8, i64 8, i64 0, i32 0, i32 8} ; [ DW_TAG_base_type ]
72 !9 = metadata !{i32 589870, i32 0, metadata !1, metadata !"inlineprinter", metadata !"inlineprinter", metadata !"inlineprinter", metadata !1, i32 5, metadata !3, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 true, i32 (i8*, double, i8)* @inlineprinter} ; [ DW_TAG_subprogram ]
73 !10 = metadata !{i32 589870, i32 0, metadata !1, metadata !"main", metadata !"main", metadata !"main", metadata !1, i32 18, metadata !11, i1 false, i1 true, i32 0, i32 0, null, i32 256, i1 true, i32 (i32, i8**)* @main} ; [ DW_TAG_subprogram ]
74 !11 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !12, i32 0, null} ; [ DW_TAG_subroutine_type ]
75 !12 = metadata !{metadata !5, metadata !5, metadata !13}
76 !13 = metadata !{i32 589839, metadata !1, metadata !"", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !14} ; [ DW_TAG_pointer_type ]
77 !14 = metadata !{i32 589839, metadata !1, metadata !"", metadata !1, i32 0, i64 32, i64 32, i64 0, i32 0, metadata !15} ; [ DW_TAG_pointer_type ]
78 !15 = metadata !{i32 589860, metadata !1, metadata !"char", metadata !1, i32 0, i64 8, i64 8, i64 0, i32 0, i32 6} ; [ DW_TAG_base_type ]
79 !16 = metadata !{i32 590081, metadata !0, metadata !"ptr", metadata !1, i32 11, metadata !6, i32 0} ; [ DW_TAG_arg_variable ]
80 !17 = metadata !{i32 590081, metadata !0, metadata !"val", metadata !1, i32 11, metadata !7, i32 0} ; [ DW_TAG_arg_variable ]
81 !18 = metadata !{i32 590081, metadata !0, metadata !"c", metadata !1, i32 11, metadata !8, i32 0} ; [ DW_TAG_arg_variable ]
82 !19 = metadata !{i32 590081, metadata !9, metadata !"ptr", metadata !1, i32 4, metadata !6, i32 0} ; [ DW_TAG_arg_variable ]
83 !20 = metadata !{i32 590081, metadata !9, metadata !"val", metadata !1, i32 4, metadata !7, i32 0} ; [ DW_TAG_arg_variable ]
84 !21 = metadata !{i32 590081, metadata !9, metadata !"c", metadata !1, i32 4, metadata !8, i32 0} ; [ DW_TAG_arg_variable ]
85 !22 = metadata !{i32 590081, metadata !10, metadata !"argc", metadata !1, i32 17, metadata !5, i32 0} ; [ DW_TAG_arg_variable ]
86 !23 = metadata !{i32 590081, metadata !10, metadata !"argv", metadata !1, i32 17, metadata !13, i32 0} ; [ DW_TAG_arg_variable ]
87 !24 = metadata !{i32 590080, metadata !25, metadata !"dval", metadata !1, i32 19, metadata !7, i32 0} ; [ DW_TAG_auto_variable ]
88 !25 = metadata !{i32 589835, metadata !10, i32 18, i32 0, metadata !1, i32 2} ; [ DW_TAG_lexical_block ]
89 !26 = metadata !{i32 4, i32 0, metadata !9, null}
90 !27 = metadata !{i32 6, i32 0, metadata !28, null}
91 !28 = metadata !{i32 589835, metadata !9, i32 5, i32 0, metadata !1, i32 1} ; [ DW_TAG_lexical_block ]
92 !29 = metadata !{i32 7, i32 0, metadata !28, null}
93 !30 = metadata !{i32 11, i32 0, metadata !0, null}
94 !31 = metadata !{i32 13, i32 0, metadata !32, null}
95 !32 = metadata !{i32 589835, metadata !0, i32 12, i32 0, metadata !1, i32 0} ; [ DW_TAG_lexical_block ]
96 !33 = metadata !{i32 14, i32 0, metadata !32, null}
97 !34 = metadata !{i32 17, i32 0, metadata !10, null}
98 !35 = metadata !{i32 19, i32 0, metadata !25, null}
99 !36 = metadata !{i32 20, i32 0, metadata !25, null}
100 !37 = metadata !{i32 21, i32 0, metadata !25, null}
101 !38 = metadata !{i32 4, i32 0, metadata !9, metadata !37}
102 !39 = metadata !{i32 6, i32 0, metadata !28, metadata !37}
103 !40 = metadata !{i32 22, i32 0, metadata !25, null}
104 !41 = metadata !{i32 23, i32 0, metadata !25, null}