1; RUN: llc %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s 2; This tests a fragment that partially covers subregister compositions. 3; 4; Our fragment is 96 bits long and lies in a 128-bit register, which 5; in turn has to be composed out of its two 64-bit subregisters. 6 7; CHECK: .debug_info 8; CHECK: DW_TAG_subprogram 9; CHECK: DW_AT_name {{.*}}"subscript.get" 10; CHECK: DW_TAG_formal_parameter 11; CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] (0x00000000) 12; CHECK: .debug_loc 13; CHECK: 0x00000000: Beginning address offset 14; CHECK-NEXT: Ending address offset 15; CHECK-NEXT: Location description: 90 90 02 93 08 90 91 02 93 04 16; d16, piece 0x00000008, d17, piece 0x00000004 17source_filename = "simd.ll" 18target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32" 19target triple = "armv7-apple-ios7.0" 20 21; Function Attrs: nounwind readnone 22declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #0 23 24define <3 x float> @_TFV4simd8float2x3g9subscriptFSiVS_6float3(i32, <3 x float>, <3 x float>) !dbg !5 { 25entry: 26 tail call void @llvm.dbg.value(metadata <3 x float> %1, i64 0, metadata !8, metadata !9), !dbg !10 27 tail call void @llvm.dbg.value(metadata <3 x float> %2, i64 0, metadata !8, metadata !11), !dbg !10 28 %3 = icmp eq i32 %0, 0, !dbg !12 29 br i1 %3, label %7, label %4, !dbg !12 30 31; <label>:4: ; preds = %entry 32 %5 = icmp eq i32 %0, 1, !dbg !15 33 br i1 %5, label %7, label %6, !dbg !15 34 35; <label>:6: ; preds = %4 36 unreachable, !dbg !17 37 38; <label>:7: ; preds = %4, %entry 39 %8 = phi <3 x float> [ %1, %entry ], [ %2, %4 ], !dbg !18 40 ret <3 x float> %8, !dbg !18 41} 42 43attributes #0 = { nounwind readnone } 44 45!llvm.dbg.cu = !{!0} 46!llvm.module.flags = !{!3, !4} 47 48!0 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !1, producer: "Swift", isOptimized: false, runtimeVersion: 3, emissionKind: FullDebug, enums: !2, imports: !2) 49!1 = !DIFile(filename: "simd.swift", directory: "/") 50!2 = !{} 51!3 = !{i32 2, !"Dwarf Version", i32 4} 52!4 = !{i32 2, !"Debug Info Version", i32 3} 53!5 = distinct !DISubprogram(name: "subscript.get", linkageName: "_TFV4simd8float2x3g9subscriptFSiVS_6float3", scope: !6, file: !1, type: !7, isLocal: false, isDefinition: true, isOptimized: true, unit: !0, variables: !2) 54!6 = !DICompositeType(tag: DW_TAG_structure_type, name: "float2x3", scope: !0, file: !1, line: 5824, size: 256, align: 128, elements: !2, runtimeLang: DW_LANG_Swift, identifier: "_TtV4simd8float2x3") 55!7 = !DISubroutineType(types: !2) 56!8 = !DILocalVariable(name: "self", arg: 2, scope: !5, file: !1, line: 5897, type: !6, flags: DIFlagArtificial) 57!9 = !DIExpression(DW_OP_LLVM_fragment, 0, 96) 58!10 = !DILocation(line: 5897, column: 5, scope: !5) 59!11 = !DIExpression(DW_OP_LLVM_fragment, 96, 96) 60!12 = !DILocation(line: 5900, column: 12, scope: !13) 61!13 = distinct !DILexicalBlock(scope: !14, file: !1, line: 5898, column: 7) 62!14 = distinct !DILexicalBlock(scope: !5, file: !1, line: 5897, column: 9) 63!15 = !DILocation(line: 5902, column: 12, scope: !16) 64!16 = distinct !DILexicalBlock(scope: !14, file: !1, line: 5898, column: 7) 65!17 = !DILocation(line: 0, scope: !5) 66!18 = !DILocation(line: 5906, column: 5, scope: !14) 67