summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/2012-11-30-regpres-dbg.ll
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-12-01 01:22:49 +0000
committerAndrew Trick <atrick@apple.com>2012-12-01 01:22:49 +0000
commit657b75b9946eae763725b413841dfd01ed12a051 (patch)
treede81df33e6e9512eaac94317366c09e0dbc883d8 /test/CodeGen/X86/2012-11-30-regpres-dbg.ll
parent177d87ac8d974529b07430b2088f699ed279cd1d (diff)
downloadllvm-657b75b9946eae763725b413841dfd01ed12a051.tar.gz
llvm-657b75b9946eae763725b413841dfd01ed12a051.tar.bz2
llvm-657b75b9946eae763725b413841dfd01ed12a051.tar.xz
misched: Fix RegisterPressureTracker handling of DebugVals.
Assertion failed: (TopRPTracker.getPos() == RegionBegin && "bad initial Top tracker"). rdar://12790302. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2012-11-30-regpres-dbg.ll')
-rw-r--r--test/CodeGen/X86/2012-11-30-regpres-dbg.ll43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2012-11-30-regpres-dbg.ll b/test/CodeGen/X86/2012-11-30-regpres-dbg.ll
new file mode 100644
index 0000000000..d290d514cc
--- /dev/null
+++ b/test/CodeGen/X86/2012-11-30-regpres-dbg.ll
@@ -0,0 +1,43 @@
+; RUN: llc < %s -mtriple=x86_64-apple-macosx -enable-misched \
+; RUN: -verify-machineinstrs | FileCheck %s
+;
+; Test RegisterPressure handling of DBG_VALUE.
+;
+; CHECK: %entry
+; CHECK: DEBUG_VALUE: callback
+; CHECK: ret
+
+%struct.btCompoundLeafCallback = type { i32, i32 }
+
+declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
+
+define void @test() unnamed_addr uwtable ssp align 2 {
+entry:
+ %callback = alloca %struct.btCompoundLeafCallback, align 8
+ br i1 undef, label %if.end, label %if.then
+
+if.then: ; preds = %entry
+ unreachable
+
+if.end: ; preds = %entry
+ call void @llvm.dbg.declare(metadata !{%struct.btCompoundLeafCallback* %callback}, metadata !3)
+ %m = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i64 0, i32 1
+ store i32 0, i32* undef, align 8
+ %cmp12447 = icmp sgt i32 undef, 0
+ br i1 %cmp12447, label %for.body.lr.ph, label %invoke.cont44
+
+for.body.lr.ph: ; preds = %if.end
+ unreachable
+
+invoke.cont44: ; preds = %if.end
+ ret void
+}
+
+!llvm.dbg.cu = !{!0}
+
+!0 = metadata !{i32 786449, i32 0, i32 4, metadata !"MultiSource/Benchmarks/Bullet/btCompoundCollisionAlgorithm.cpp", metadata !"MultiSource/Benchmarks/Bullet", metadata !"clang version 3.3 (trunk 168984) (llvm/trunk 168983)", i1 true, i1 true, metadata !"", i32 0, metadata !1, null, null, null} ; [ DW_TAG_compile_unit ] [MultiSource/Benchmarks/Bullet/MultiSource/Benchmarks/Bullet/btCompoundCollisionAlgorithm.cpp] [DW_LANG_C_plus_plus]
+!1 = metadata !{metadata !2}
+!2 = metadata !{null, null}
+!3 = metadata !{i32 786688, null, metadata !"callback", null, i32 214, metadata !4, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [callback] [line 214]
+!4 = metadata !{i32 786451, null, metadata !"btCompoundLeafCallback", metadata !5, i32 90, i64 512, i64 64, i32 0, i32 0, null, null, i32 0, null, null} ; [ DW_TAG_structure_type ] [btCompoundLeafCallback] [line 90, size 512, align 64, offset 0] [from ]
+!5 = metadata !{i32 786473, metadata !"MultiSource/Benchmarks/Bullet/btCompoundCollisionAlgorithm.cpp", metadata !"MultiSource/Benchmarks/Bullet", null} ; [ DW_TAG_file_type ]