124 lines · plain
1; RUN: llc < %s - | FileCheck %s2; Radar 93092213; Test dwarf reg no for s164;CHECK: super-register DW_OP_regx5;CHECK-NEXT: 2646 7target 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"8target triple = "thumbv7-apple-macosx10.6.7"9 10@.str = private unnamed_addr constant [11 x i8] c"%p %lf %c\0A\00"11@.str1 = private unnamed_addr constant [6 x i8] c"point\00"12 13define i32 @inlineprinter(ptr %ptr, float %val, i8 zeroext %c) nounwind optsize ssp !dbg !0 {14entry:15 tail call void @llvm.dbg.value(metadata ptr %ptr, metadata !8, metadata !DIExpression()), !dbg !2416 tail call void @llvm.dbg.value(metadata float %val, metadata !10, metadata !DIExpression()), !dbg !2517 tail call void @llvm.dbg.value(metadata i8 %c, metadata !12, metadata !DIExpression()), !dbg !2618 %conv = fpext float %val to double, !dbg !2719 %conv3 = zext i8 %c to i32, !dbg !2720 %call = tail call i32 (ptr, ...) @printf(ptr @.str, ptr %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !2721 ret i32 0, !dbg !2922}23 24declare i32 @printf(ptr nocapture, ...) nounwind optsize25 26define i32 @printer(ptr %ptr, float %val, i8 zeroext %c) nounwind optsize noinline ssp !dbg !6 {27entry:28 tail call void @llvm.dbg.value(metadata ptr %ptr, metadata !14, metadata !DIExpression()), !dbg !3029 tail call void @llvm.dbg.value(metadata float %val, metadata !15, metadata !DIExpression()), !dbg !3130 tail call void @llvm.dbg.value(metadata i8 %c, metadata !16, metadata !DIExpression()), !dbg !3231 %conv = fpext float %val to double, !dbg !3332 %conv3 = zext i8 %c to i32, !dbg !3333 %call = tail call i32 (ptr, ...) @printf(ptr @.str, ptr %ptr, double %conv, i32 %conv3) nounwind optsize, !dbg !3334 ret i32 0, !dbg !3535}36 37define i32 @main(i32 %argc, ptr nocapture %argv) nounwind optsize ssp !dbg !7 {38entry:39 tail call void @llvm.dbg.value(metadata i32 %argc, metadata !17, metadata !DIExpression()), !dbg !3640 tail call void @llvm.dbg.value(metadata ptr %argv, metadata !18, metadata !DIExpression()), !dbg !3741 %conv = sitofp i32 %argc to double, !dbg !3842 %add = fadd double %conv, 5.555552e+05, !dbg !3843 %conv1 = fptrunc double %add to float, !dbg !3844 tail call void @llvm.dbg.value(metadata float %conv1, metadata !22, metadata !DIExpression()), !dbg !3845 %call = tail call i32 @puts(ptr @.str1) nounwind optsize, !dbg !3946 %add.ptr = getelementptr i8, ptr @main, i32 %argc, !dbg !4047 %add5 = add nsw i32 %argc, 97, !dbg !4048 %conv6 = trunc i32 %add5 to i8, !dbg !4049 tail call void @llvm.dbg.value(metadata ptr %add.ptr, metadata !58, metadata !DIExpression()) nounwind, !dbg !4150 tail call void @llvm.dbg.value(metadata float %conv1, metadata !60, metadata !DIExpression()) nounwind, !dbg !4251 tail call void @llvm.dbg.value(metadata i8 %conv6, metadata !62, metadata !DIExpression()) nounwind, !dbg !4352 %conv.i = fpext float %conv1 to double, !dbg !4453 %conv3.i = and i32 %add5, 255, !dbg !4454 %call.i = tail call i32 (ptr, ...) @printf(ptr @.str, ptr %add.ptr, double %conv.i, i32 %conv3.i) nounwind optsize, !dbg !4455 %call14 = tail call i32 @printer(ptr %add.ptr, float %conv1, i8 zeroext %conv6) optsize, !dbg !4556 ret i32 0, !dbg !4657}58 59declare i32 @puts(ptr nocapture) nounwind optsize60 61declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone62 63!llvm.dbg.cu = !{!2}64!llvm.module.flags = !{!53}65 66!0 = distinct !DISubprogram(name: "inlineprinter", line: 5, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 5, file: !51, scope: !1, type: !3, retainedNodes: !48)67!1 = !DIFile(filename: "a.c", directory: "/private/tmp")68!2 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.0 (trunk 129915)", isOptimized: true, emissionKind: FullDebug, file: !51, enums: !52, retainedTypes: !52, imports: null)69!3 = !DISubroutineType(types: !4)70!4 = !{!5}71!5 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)72!6 = distinct !DISubprogram(name: "printer", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 12, file: !51, scope: !1, type: !3, retainedNodes: !49)73!7 = distinct !DISubprogram(name: "main", line: 18, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !2, scopeLine: 18, file: !51, scope: !1, type: !3, retainedNodes: !50)74!8 = !DILocalVariable(name: "ptr", line: 4, arg: 1, scope: !0, file: !1, type: !9)75!9 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, scope: !2, baseType: null)76!10 = !DILocalVariable(name: "val", line: 4, arg: 2, scope: !0, file: !1, type: !11)77!11 = !DIBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)78!12 = !DILocalVariable(name: "c", line: 4, arg: 3, scope: !0, file: !1, type: !13)79!13 = !DIBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char)80 81!58 = !DILocalVariable(name: "ptr", line: 4, arg: 1, scope: !0, file: !1, type: !9)82!60 = !DILocalVariable(name: "val", line: 4, arg: 2, scope: !0, file: !1, type: !11)83!62 = !DILocalVariable(name: "c", line: 4, arg: 3, scope: !0, file: !1, type: !13)84 85!14 = !DILocalVariable(name: "ptr", line: 11, arg: 1, scope: !6, file: !1, type: !9)86!15 = !DILocalVariable(name: "val", line: 11, arg: 2, scope: !6, file: !1, type: !11)87!16 = !DILocalVariable(name: "c", line: 11, arg: 3, scope: !6, file: !1, type: !13)88!17 = !DILocalVariable(name: "argc", line: 17, arg: 1, scope: !7, file: !1, type: !5)89!18 = !DILocalVariable(name: "argv", line: 17, arg: 2, scope: !7, file: !1, type: !19)90!19 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, scope: !2, baseType: !20)91!20 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, scope: !2, baseType: !21)92!21 = !DIBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)93!22 = !DILocalVariable(name: "dval", line: 19, scope: !23, file: !1, type: !11)94!23 = distinct !DILexicalBlock(line: 18, column: 1, file: !51, scope: !7)95!24 = !DILocation(line: 4, column: 22, scope: !0)96!25 = !DILocation(line: 4, column: 33, scope: !0)97!26 = !DILocation(line: 4, column: 52, scope: !0)98!27 = !DILocation(line: 6, column: 3, scope: !28)99!28 = distinct !DILexicalBlock(line: 5, column: 1, file: !51, scope: !0)100!29 = !DILocation(line: 7, column: 3, scope: !28)101!30 = !DILocation(line: 11, column: 42, scope: !6)102!31 = !DILocation(line: 11, column: 53, scope: !6)103!32 = !DILocation(line: 11, column: 72, scope: !6)104!33 = !DILocation(line: 13, column: 3, scope: !34)105!34 = distinct !DILexicalBlock(line: 12, column: 1, file: !51, scope: !6)106!35 = !DILocation(line: 14, column: 3, scope: !34)107!36 = !DILocation(line: 17, column: 15, scope: !7)108!37 = !DILocation(line: 17, column: 28, scope: !7)109!38 = !DILocation(line: 19, column: 31, scope: !23)110!39 = !DILocation(line: 20, column: 3, scope: !23)111!40 = !DILocation(line: 21, column: 3, scope: !23)112!41 = !DILocation(line: 4, column: 22, scope: !0, inlinedAt: !40)113!42 = !DILocation(line: 4, column: 33, scope: !0, inlinedAt: !40)114!43 = !DILocation(line: 4, column: 52, scope: !0, inlinedAt: !40)115!44 = !DILocation(line: 6, column: 3, scope: !28, inlinedAt: !40)116!45 = !DILocation(line: 22, column: 3, scope: !23)117!46 = !DILocation(line: 23, column: 1, scope: !23)118!48 = !{!8, !10, !12}119!49 = !{!14, !15, !16}120!50 = !{!17, !18, !22}121!51 = !DIFile(filename: "a.c", directory: "/private/tmp")122!52 = !{}123!53 = !{i32 1, !"Debug Info Version", i32 3}124