1; RUN: llc < %s -mtriple=x86_64-apple-macosx -enable-misched \
2; RUN:          -verify-machineinstrs | FileCheck %s
3;
4; Test RegisterPressure handling of DBG_VALUE.
5;
6; CHECK: %entry
7; CHECK: DEBUG_VALUE: callback
8; CHECK: ret
9
10%struct.btCompoundLeafCallback = type { i32, i32 }
11
12declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
13
14define void @test() unnamed_addr uwtable ssp align 2 {
15entry:
16  %callback = alloca %struct.btCompoundLeafCallback, align 8
17  br i1 undef, label %if.end, label %if.then
18
19if.then:                                          ; preds = %entry
20  unreachable
21
22if.end:                                           ; preds = %entry
23  call void @llvm.dbg.declare(metadata %struct.btCompoundLeafCallback* %callback, metadata !3, metadata !{!"0x102"})
24  %m = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i64 0, i32 1
25  store i32 0, i32* undef, align 8
26  %cmp12447 = icmp sgt i32 undef, 0
27  br i1 %cmp12447, label %for.body.lr.ph, label %invoke.cont44
28
29for.body.lr.ph:                                   ; preds = %if.end
30  unreachable
31
32invoke.cont44:                                    ; preds = %if.end
33  ret void
34}
35
36!llvm.dbg.cu = !{!0}
37!llvm.module.flags = !{!8}
38
39!0 = !{!"0x11\004\00clang version 3.3 (trunk 168984) (llvm/trunk 168983)\001\00\000\00\000", !6, null, null, !1, null, null} ; [ DW_TAG_compile_unit ] [MultiSource/Benchmarks/Bullet/MultiSource/Benchmarks/Bullet/btCompoundCollisionAlgorithm.cpp] [DW_LANG_C_plus_plus]
40!1 = !{!2}
41!2 = !{!"0x2e\00test\00test\00\000\000\001\000\006\00256\001\001", !6, !5, !7, null, void ()* @test, null, null, null} ; [ DW_TAG_subprogram ] [def] [test]
42!3 = !{!"0x100\00callback\00214\000", null, null, !4} ; [ DW_TAG_auto_variable ] [callback] [line 214]
43!4 = !{!"0x13\00btCompoundLeafCallback\0090\00512\0064\000\000\000", !6, null, null, null, null, null, null} ; [ DW_TAG_structure_type ] [btCompoundLeafCallback] [line 90, size 512, align 64, offset 0] [def] [from ]
44!5 = !{!"0x29", !6} ; [ DW_TAG_file_type ]
45!6 = !{!"MultiSource/Benchmarks/Bullet/btCompoundCollisionAlgorithm.cpp", !"MultiSource/Benchmarks/Bullet"}
46!7 = !{!"0x15\00\000\000\000\000\000\000", i32 0, null, null, !9, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
47!8 = !{i32 1, !"Debug Info Version", i32 2}
48!9 = !{null}
49