summaryrefslogtreecommitdiff
path: root/test/DebugInfo/X86/dbg-value-const-byref.ll
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2014-04-25 20:49:25 +0000
committerAdrian Prantl <aprantl@apple.com>2014-04-25 20:49:25 +0000
commit988b78a8463130318956cbdcbf1f5f4e338f36eb (patch)
tree74f704d159ffea525dd44b77b03ce4637ba937bc /test/DebugInfo/X86/dbg-value-const-byref.ll
parent31494cb6c4172e97027aa31ed1f9c78754422111 (diff)
downloadllvm-988b78a8463130318956cbdcbf1f5f4e338f36eb.tar.gz
llvm-988b78a8463130318956cbdcbf1f5f4e338f36eb.tar.bz2
llvm-988b78a8463130318956cbdcbf1f5f4e338f36eb.tar.xz
This reapplies r207235 with an additional bugfixes caught by the msan
buildbot - do not insert debug intrinsics before phi nodes. Debug info for optimized code: Support variables that are on the stack and described by DBG_VALUEs during their lifetime. Previously, when a variable was at a FrameIndex for any part of its lifetime, this would shadow all other DBG_VALUEs and only a single fbreg location would be emitted, which in fact is only valid for a small range and not the entire lexical scope of the variable. The included dbg-value-const-byref testcase demonstrates this. This patch fixes this by Local - emitting dbg.value intrinsics for allocas that are passed by reference - dropping all dbg.declares (they are now fully lowered to dbg.values) SelectionDAG - renamed constructors for SDDbgValue for better readability. - fix UserValue::match() to handle indirect values correctly - not inserting an MMI table entries for dbg.values that describe allocas. - lowering dbg.values that describe allocas into *indirect* DBG_VALUEs. CodeGenPrepare - leaving dbg.values for an alloca were they are (see comment) Other - regenerated/updated instcombine.ll testcase and included source rdar://problem/16679879 http://reviews.llvm.org/D3374 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo/X86/dbg-value-const-byref.ll')
-rw-r--r--test/DebugInfo/X86/dbg-value-const-byref.ll5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/DebugInfo/X86/dbg-value-const-byref.ll b/test/DebugInfo/X86/dbg-value-const-byref.ll
index 2f808786a8..baba0cdb31 100644
--- a/test/DebugInfo/X86/dbg-value-const-byref.ll
+++ b/test/DebugInfo/X86/dbg-value-const-byref.ll
@@ -37,6 +37,10 @@
; CHECK: Beginning address offset: [[C2]]
; CHECK: Ending address offset: [[R1:.*]]
; CHECK: Location description: 50 93 04
+; rdi+0
+; CHECK: Beginning address offset: [[R1]]
+; CHECK: Ending address offset: [[R2:.*]]
+; CHECK: Location description: 75 00
;
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.9.0"
@@ -51,6 +55,7 @@ entry:
%call1 = call i32 (...)* @f1() #3, !dbg !19
call void @llvm.dbg.value(metadata !{i32 %call1}, i64 0, metadata !10), !dbg !19
store i32 %call1, i32* %i, align 4, !dbg !19, !tbaa !20
+ call void @llvm.dbg.value(metadata !{i32* %i}, i64 0, metadata !10), !dbg !24
call void @f2(i32* %i) #3, !dbg !24
ret i32 0, !dbg !25
}