From 657b75b9946eae763725b413841dfd01ed12a051 Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Sat, 1 Dec 2012 01:22:49 +0000 Subject: 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 --- test/CodeGen/X86/2012-11-30-regpres-dbg.ll | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 test/CodeGen/X86/2012-11-30-regpres-dbg.ll (limited to 'test/CodeGen/X86/2012-11-30-regpres-dbg.ll') 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 ] -- cgit v1.2.3