1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-macosx -enable-misched \ 2*9880d681SAndroid Build Coastguard Worker; RUN: -verify-machineinstrs | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker; 4*9880d681SAndroid Build Coastguard Worker; Test LiveInterval update handling of DBG_VALUE. 5*9880d681SAndroid Build Coastguard Worker; rdar://12777252. 6*9880d681SAndroid Build Coastguard Worker; 7*9880d681SAndroid Build Coastguard Worker; CHECK: %entry 8*9880d681SAndroid Build Coastguard Worker; CHECK: DEBUG_VALUE: subdivp:hg 9*9880d681SAndroid Build Coastguard Worker; CHECK: j 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Worker%struct.node.0.27 = type { i16, double, [3 x double], i32, i32 } 12*9880d681SAndroid Build Coastguard Worker%struct.hgstruct.2.29 = type { %struct.bnode.1.28*, [3 x double], double, [3 x double] } 13*9880d681SAndroid Build Coastguard Worker%struct.bnode.1.28 = type { i16, double, [3 x double], i32, i32, [3 x double], [3 x double], [3 x double], double, %struct.bnode.1.28*, %struct.bnode.1.28* } 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Workerdefine signext i16 @subdivp(%struct.node.0.27* nocapture %p, double %dsq, double %tolsq, %struct.hgstruct.2.29* nocapture byval align 8 %hg) nounwind uwtable readonly ssp !dbg !14 { 18*9880d681SAndroid Build Coastguard Workerentry: 19*9880d681SAndroid Build Coastguard Worker call void @llvm.dbg.declare(metadata %struct.hgstruct.2.29* %hg, metadata !4, metadata !DIExpression()), !dbg !DILocation(scope: !14) 20*9880d681SAndroid Build Coastguard Worker %type = getelementptr inbounds %struct.node.0.27, %struct.node.0.27* %p, i64 0, i32 0 21*9880d681SAndroid Build Coastguard Worker %0 = load i16, i16* %type, align 2 22*9880d681SAndroid Build Coastguard Worker %cmp = icmp eq i16 %0, 1 23*9880d681SAndroid Build Coastguard Worker br i1 %cmp, label %return, label %for.cond.preheader 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workerfor.cond.preheader: ; preds = %entry 26*9880d681SAndroid Build Coastguard Worker %arrayidx6.1 = getelementptr inbounds %struct.hgstruct.2.29, %struct.hgstruct.2.29* %hg, i64 0, i32 1, i64 1 27*9880d681SAndroid Build Coastguard Worker %cmp22 = fcmp olt double 0.000000e+00, %dsq 28*9880d681SAndroid Build Coastguard Worker %conv24 = zext i1 %cmp22 to i16 29*9880d681SAndroid Build Coastguard Worker br label %return 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Workerreturn: ; preds = %for.cond.preheader, %entry 32*9880d681SAndroid Build Coastguard Worker %retval.0 = phi i16 [ %conv24, %for.cond.preheader ], [ 0, %entry ] 33*9880d681SAndroid Build Coastguard Worker ret i16 %retval.0 34*9880d681SAndroid Build Coastguard Worker} 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone 37*9880d681SAndroid Build Coastguard Worker 38*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0} 39*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!12} 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.3 (trunk 168918) (llvm/trunk 168920)", isOptimized: true, emissionKind: FullDebug, file: !11, enums: !2, retainedTypes: !2, globals: !2) 42*9880d681SAndroid Build Coastguard Worker!2 = !{} 43*9880d681SAndroid Build Coastguard Worker!4 = !DILocalVariable(name: "hg", line: 725, arg: 4, scope: !14, file: !5, type: !6) 44*9880d681SAndroid Build Coastguard Worker!5 = !DIFile(filename: "MultiSource/Benchmarks/Olden/bh/newbh.c", directory: "MultiSource/Benchmarks/Olden/bh") 45*9880d681SAndroid Build Coastguard Worker!6 = !DIDerivedType(tag: DW_TAG_typedef, name: "hgstruct", line: 492, file: !11, baseType: !7) 46*9880d681SAndroid Build Coastguard Worker!7 = !DICompositeType(tag: DW_TAG_structure_type, line: 487, size: 512, align: 64, file: !11) 47*9880d681SAndroid Build Coastguard Worker!11 = !DIFile(filename: "MultiSource/Benchmarks/Olden/bh/newbh.c", directory: "MultiSource/Benchmarks/Olden/bh") 48*9880d681SAndroid Build Coastguard Worker!12 = !{i32 1, !"Debug Info Version", i32 3} 49*9880d681SAndroid Build Coastguard Worker!14 = distinct !DISubprogram(name: "subdivp", isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !11, scope: !5, type: !15) 50*9880d681SAndroid Build Coastguard Worker!15 = !DISubroutineType(types: !16) 51*9880d681SAndroid Build Coastguard Worker!16 = !{null} 52