<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div>Ok, I see. The instruction it falls over on is an IMPLICT_DEF and also the only one in its scope and therefore the LexicalScope has never been created because its range is empty. We can skip meta-instructions as an even more targeted fix. I should be able to create a tiny MIR test for this. If I don't have that within the next 30min I will land a revert.<br class=""><div><blockquote type="cite" class=""></blockquote></div></div><div><br class=""></div><div>-- adrian</div><div><br class=""><blockquote type="cite" class=""><div class="">On Jun 20, 2017, at 1:09 PM, Eric Christopher <<a href="mailto:echristo@gmail.com" class="">echristo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Adrian,<div class=""><br class=""></div><div class="">Would you mind reverting this in the meantime since you have a testcase and aren't sure what path you want to take for fixing it?</div><div class=""><br class=""></div><div class="">Thanks!</div><div class=""><br class=""></div><div class="">-eric</div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Jun 20, 2017 at 1:03 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Here's creduce's result. I'll do some manual reduction as well.</div><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Jun 20, 2017 at 10:24 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Jun 20, 2017 at 8:51 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 20, 2017, at 8:38 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Fri, Jun 16, 2017 at 3:40 PM Adrian Prantl via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Author: adrian<br class="">Date: Fri Jun 16 17:40:04 2017<br class="">New Revision: 305599<br class=""><br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=305599&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=305599&view=rev</a><br class="">Log:<br class="">Improve the accuracy of variable ranges .debug_loc location lists.<br class=""><br class="">For the following motivating example<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>bool c();<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>void f();<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>bool start() {<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>bool result = c();<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>if (!c()) {<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>result = false;<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>goto exit;<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>}<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>f();<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>result = true;<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>exit:<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>return result;<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>}<br class=""><br class="">we would previously generate a single DW_AT_const_value(1) because<br class="">only the DBG_VALUE in the second-to-last basic block survived<br class="">codegen. This patch improves the heuristic used to determine when a<br class="">DBG_VALUE is available at the beginning of its variable's enclosing<br class="">lexical scope:<br class=""><br class="">- Stop giving singular constants blanket permission to take over the<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>entire scope. There is still a special case for constants in the<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>function prologue that we also miight want to retire later.<br class=""><br class="">- Use the lexical scope information to determine available-at-entry<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>instead of proximity to the function prologue.<br class=""><br class="">After this patch we generate a location list with a more accurate<br class="">narrower availability for the constant true value. As a pleasant side<br class="">effect, we also generate inline locations instead of location lists<br class="">where a loacation covers the entire range of the enclosing lexical<br class="">scope.<br class=""><br class="">Measured on compiling llc with four targets this doesn't have an<br class="">effect on compile time and reduces the size of the debug info for llc<br class="">by ~600K.<br class=""><br class=""><a class="">rdar://problem/30286912</a><br class=""><br class="">Added:<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/Generic/partial-constant.ll<br class="">Modified:<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/Generic/sugared-constants.ll<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/MIR/X86/bit-piece-dh.mir<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/X86/dbg-merge-loc-entry.ll<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/X86/inlined-formal-parameter.ll<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/X86/parameters.ll<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/X86/pieces-3.ll<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/X86/reference-argument.ll<br class=""> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>llvm/trunk/test/DebugInfo/X86/this-stack_value.ll<br class=""><br class="">Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)<br class="">+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Jun 16 17:40:04 2017<br class="">@@ -972,16 +972,60 @@ DbgVariable *DwarfDebug::createConcreteV<br class=""> return ConcreteVariables.back().get();<br class=""> }<br class=""><br class="">-// Determine whether this DBG_VALUE is valid at the beginning of the function.<br class="">-static bool validAtEntry(const MachineInstr *MInsn) {<br class="">- auto MBB = MInsn->getParent();<br class="">- // Is it in the entry basic block?<br class="">- if (!MBB->pred_empty())<br class="">+/// Determine whether a *singular* DBG_VALUE is valid for the entirety of its<br class="">+/// enclosing lexical scope. The check ensures there are no other instructions<br class="">+/// in the same lexical scope preceding the DBG_VALUE and that its range is<br class="">+/// either open or otherwise rolls off the end of the scope.<br class="">+static bool validThroughout(LexicalScopes &LScopes,<br class="">+ const MachineInstr *DbgValue,<br class="">+ const MachineInstr *RangeEnd) {<br class="">+ assert(DbgValue->getDebugLoc() && "DBG_VALUE without a debug location");<br class="">+ auto MBB = DbgValue->getParent();<br class="">+ auto DL = DbgValue->getDebugLoc();<br class="">+ auto *LScope = LScopes.findLexicalScope(DL);<br class="">+ // Scope doesn't exist; this is a dead DBG_VALUE.<br class="">+ if (!LScope)<br class=""> return false;<br class="">- for (MachineBasicBlock::const_reverse_iterator I(MInsn); I != MBB->rend(); ++I)<br class="">- if (!(I->isDebugValue() || I->getFlag(MachineInstr::FrameSetup)))<br class="">+ auto &LSRange = LScope->getRanges();<br class="">+ if (LSRange.size() == 0)<br class="">+ return false;<br class="">+<br class="">+ // Determine if the DBG_VALUE is valid at the beginning of its lexical block.<br class="">+ const MachineInstr *LScopeBegin = LSRange.front().first;<br class="">+ // Early exit if the lexical scope begins outside of the current block.<br class="">+ if (LScopeBegin->getParent() != MBB)<br class="">+ return false;<br class="">+ MachineBasicBlock::const_reverse_iterator Pred(DbgValue);<br class="">+ for (++Pred; Pred != MBB->rend(); ++Pred) {<br class="">+ if (Pred->getFlag(MachineInstr::FrameSetup))<br class="">+ break;<br class="">+ auto PredDL = Pred->getDebugLoc();<br class="">+ if (!PredDL || Pred->isDebugValue())<br class="">+ continue;<br class="">+ // Check whether the instruction preceding the DBG_VALUE is in the same<br class="">+ // (sub)scope as the DBG_VALUE.<br class="">+ if (DL->getScope() == PredDL->getScope() ||<br class="">+ LScope->dominates(LScopes.findLexicalScope(PredDL)))<br class=""></blockquote><div class=""><br class="">Just a heads up, Google internal test infrastructure is seeing failures here ^ (well, inside 'dominates' actually) when findLexicalScope returns null on this line.<br class=""><br class="">The repro clang cc1 command is: <p class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461inbox-inbox-p1"><span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461inbox-inbox-s1">clang-tot -cc1 -triple aarch64-linux-gnu -emit-obj<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461inbox-inbox-Apple-converted-space"> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span></span>-relaxed-aliasing<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461inbox-inbox-Apple-converted-space"> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span></span>-debug-info-kind=limited<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461inbox-inbox-Apple-converted-space"> <span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span></span>-O2 -w -std=gnu++11 -o /tmp/x.o -x c++ crash.ii<br class=""><br class="">Though I don't have a public reduced test case yet - creduce uis working on it (~75% reduced overnight... but chugging along pretty slow now). I'll provide it when I've got something.<br class=""></span></p></div></div></div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap:break-word" class=""><div class=""><div class="">Thanks for the heads-up.! I'm assuming that </div><div class=""><br class=""></div><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp</b></span></div><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">index d392e372863..0830c78b6ed 100644</b></span></div><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp</b></span></div><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><b class="">+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp</b></span></div><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures;color:#33bbc8" class="">@@ -1004,8 +1004,10 @@</span><span style="font-variant-ligatures:no-common-ligatures" class=""> static bool validThroughout(LexicalScopes &LScopes,</span></div><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> continue;</span></div></div></div><div style="word-wrap:break-word" class=""><div class=""><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> // Check whether the instruction preceding the DBG_VALUE is in the same</span></div><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> // (sub)scope as the DBG_VALUE.</span></div></div></div><div style="word-wrap:break-word" class=""><div class=""><div style="margin:0px;line-height:normal;font-family:Menlo;color:rgb(195,55,32);background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">- if (DL->getScope() == PredDL->getScope() ||</span></div><div style="margin:0px;line-height:normal;font-family:Menlo;color:rgb(195,55,32);background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">- LScope->dominates(LScopes.findLexicalScope(PredDL)))</span></div><div style="margin:0px;line-height:normal;font-family:Menlo;color:rgb(52,188,38);background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">+ if (DL->getScope() == PredDL->getScope())</span></div><div style="margin:0px;line-height:normal;font-family:Menlo;color:rgb(52,188,38);background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">+ return false;</span></div><div style="margin:0px;line-height:normal;font-family:Menlo;color:rgb(52,188,38);background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">+ auto *PredScope = LScopes.findLexicalScope(PredDL);</span></div><div style="margin:0px;line-height:normal;font-family:Menlo;color:rgb(52,188,38);background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">+ if (!PredScope || LScope->dominates(PredScope))</span></div><div style="margin:0px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);font-size:11px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> return false;</span></div><div style="font-size:9px" class=""><span style="font-family:Menlo;font-size:11px;background-color:rgb(255,255,255)" class=""> </span><span style="font-family:Menlo;font-size:11px;background-color:rgb(255,255,255)" class="">}</span></div><div class=""><br class=""></div><div class="">fixes the crash?</div></div></div></blockquote></div></div><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class="">Haven't tried - I'd guess that'd probably silence the issue.<br class=""> </div></div></div><div dir="ltr" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class=""> This just adds a defensive check for nullptr here and add a safe 'return false' but I would like to understand how this is possible since we should have visited the previous scope before.</div></div></div></blockquote></div></div><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class="">Yeah, that'd be my concern - making sure the fix is principled.<br class=""> </div></div></div><div dir="ltr" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class=""> I assume that the previous instruction's scope has no variable in it?</div></div></div></blockquote></div></div><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class="">Haven't looked yet - just reducing for now.<br class=""><br class="">- Dave<br class=""> </div></div></div><div dir="ltr" class=""><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class=""><div class=""><br class=""></div><div class="">-- adrian</div></div></div><div style="word-wrap:break-word" class=""><div class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div class="gmail_quote"><div class=""><p class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461inbox-inbox-p1"><span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461inbox-inbox-s1">I mention it now in case you're seeing similar things or want to pre-emptively revert to avoid the possibility.</span></p> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> return false;<br class="">- return true;<br class="">+ }<br class="">+<br class="">+ // If the range of the DBG_VALUE is open-ended, report success.<br class="">+ if (!RangeEnd)<br class="">+ return true;<br class="">+<br class="">+ // Fail if there are instructions belonging to our scope in another block.<br class="">+ const MachineInstr *LScopeEnd = LSRange.back().second;<br class="">+ if (LScopeEnd->getParent() != MBB)<br class="">+ return false;<br class="">+<br class="">+ // Single, constant DBG_VALUEs in the prologue are promoted to be live<br class="">+ // throughout the function. This is a hack, presumably for DWARF v2 and not<br class="">+ // necessarily correct. It would be much better to use a dbg.declare instead<br class="">+ // if we know the constant is live throughout the scope.<br class="">+ if (DbgValue->getOperand(0).isImm() && MBB->pred_empty())<br class="">+ return true;<br class="">+<br class="">+ return false;<br class=""> }<br class=""><br class=""> // Find variables for each lexical scope.<br class="">@@ -1016,11 +1060,9 @@ void DwarfDebug::collectVariableInfo(Dwa<br class=""> const MachineInstr *MInsn = Ranges.front().first;<br class=""> assert(MInsn->isDebugValue() && "History must begin with debug value");<br class=""><br class="">- // Check if there is a single DBG_VALUE, valid throughout the function.<br class="">- // A single constant is also considered valid for the entire function.<br class="">+ // Check if there is a single DBG_VALUE, valid throughout the var's scope.<br class=""> if (Ranges.size() == 1 &&<br class="">- (MInsn->getOperand(0).isImm() ||<br class="">- (validAtEntry(MInsn) && Ranges.front().second == nullptr))) {<br class="">+ validThroughout(LScopes, MInsn, Ranges.front().second)) {<br class=""> RegVar->initializeDbgValue(MInsn);<br class=""> continue;<br class=""> }<br class=""><br class="">Added: llvm/trunk/test/DebugInfo/Generic/partial-constant.ll<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/partial-constant.ll?rev=305599&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/partial-constant.ll?rev=305599&view=auto</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/Generic/partial-constant.ll (added)<br class="">+++ llvm/trunk/test/DebugInfo/Generic/partial-constant.ll Fri Jun 16 17:40:04 2017<br class="">@@ -0,0 +1,82 @@<br class="">+; RUN: %llc_dwarf -filetype=obj < %s | llvm-dwarfdump - | FileCheck %s<br class="">+; Generated at -O2 from:<br class="">+; bool c();<br class="">+; void f();<br class="">+; bool start() {<br class="">+; bool result = c();<br class="">+; if (!c()) {<br class="">+; result = false;<br class="">+; goto exit;<br class="">+; }<br class="">+; f();<br class="">+; result = true;<br class="">+; exit:<br class="">+; return result;<br class="">+; }<br class="">+;<br class="">+; The constant should NOT be available for the entire function.<br class="">+; CHECK-NOT: DW_AT_const_value<br class="">+; CHECK: .debug_loc<br class="">+; CHECK: Location description: 10 01 9f<br class="">+; constu 0x00000001, stack-value<br class="">+source_filename = "test.ii"<br class="">+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"<br class="">+target triple = "x86_64-apple-macosx10.12.0"<br class="">+<br class="">+; Function Attrs: noimplicitfloat noredzone nounwind optsize<br class="">+define zeroext i1 @_Z5startv() local_unnamed_addr #0 !dbg !7 {<br class="">+entry:<br class="">+ %call = tail call zeroext i1 @_Z1cv() #3, !dbg !13<br class="">+ %call1 = tail call zeroext i1 @_Z1cv() #3, !dbg !14<br class="">+ br i1 %call1, label %if.end, label %exit, !dbg !16<br class="">+<br class="">+if.end: ; preds = %entry<br class="">+ tail call void @_Z1fv() #3, !dbg !17<br class="">+ tail call void @llvm.dbg.value(metadata i8 1, i64 0, metadata !12, metadata !18), !dbg !19<br class="">+ br label %exit, !dbg !20<br class="">+<br class="">+exit: ; preds = %entry, %if.end<br class="">+ %result.0 = phi i1 [ true, %if.end ], [ false, %entry ]<br class="">+ ret i1 %result.0, !dbg !21<br class="">+}<br class="">+<br class="">+; Function Attrs: noimplicitfloat noredzone optsize<br class="">+declare zeroext i1 @_Z1cv() local_unnamed_addr #1<br class="">+<br class="">+; Function Attrs: noimplicitfloat noredzone optsize<br class="">+declare void @_Z1fv() local_unnamed_addr #1<br class="">+<br class="">+; Function Attrs: nounwind readnone speculatable<br class="">+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2<br class="">+<br class="">+attributes #0 = { noimplicitfloat noredzone nounwind optsize }<br class="">+attributes #1 = { noimplicitfloat noredzone optsize }<br class="">+attributes #2 = { nounwind readnone speculatable }<br class="">+attributes #3 = { nobuiltin noimplicitfloat noredzone nounwind optsize }<br class="">+<br class="">+!<a href="http://llvm.dbg.cu/" rel="noreferrer" target="_blank" class="">llvm.dbg.cu</a><span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>= !{!0}<br class="">+!llvm.module.flags = !{!3, !4, !5}<br class="">+!llvm.ident = !{!6}<br class="">+<br class="">+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 5.0.0 (trunk 303873) (llvm/trunk 303897)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)<br class="">+!1 = !DIFile(filename: "test.ii", directory: "/")<br class="">+!2 = !{}<br class="">+!3 = !{i32 2, !"Dwarf Version", i32 4}<br class="">+!4 = !{i32 2, !"Debug Info Version", i32 3}<br class="">+!5 = !{i32 1, !"wchar_size", i32 4}<br class="">+!6 = !{!"clang version 5.0.0 (trunk 303873) (llvm/trunk 303897)"}<br class="">+!7 = distinct !DISubprogram(name: "start", linkageName: "_Z5startv", scope: !1, file: !1, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !11)<br class="">+!8 = !DISubroutineType(types: !9)<br class="">+!9 = !{!10}<br class="">+!10 = !DIBasicType(name: "bool", size: 8, encoding: DW_ATE_boolean)<br class="">+!11 = !{!12}<br class="">+!12 = !DILocalVariable(name: "result", scope: !7, file: !1, line: 4, type: !10)<br class="">+!13 = !DILocation(line: 4, column: 17, scope: !7)<br class="">+!14 = !DILocation(line: 5, column: 8, scope: !15)<br class="">+!15 = distinct !DILexicalBlock(scope: !7, file: !1, line: 5, column: 7)<br class="">+!16 = !DILocation(line: 5, column: 7, scope: !7)<br class="">+!17 = !DILocation(line: 9, column: 3, scope: !7)<br class="">+!18 = !DIExpression()<br class="">+!19 = !DILocation(line: 4, column: 8, scope: !7)<br class="">+!20 = !DILocation(line: 10, column: 3, scope: !7)<br class="">+!21 = !DILocation(line: 12, column: 3, scope: !7)<br class=""><br class="">Modified: llvm/trunk/test/DebugInfo/Generic/sugared-constants.ll<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/sugared-constants.ll?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/sugared-constants.ll?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/Generic/sugared-constants.ll (original)<br class="">+++ llvm/trunk/test/DebugInfo/Generic/sugared-constants.ll Fri Jun 16 17:40:04 2017<br class="">@@ -3,47 +3,23 @@<br class=""> ; RUN: %llc_dwarf -O0 -filetype=obj %s -o - | llvm-dwarfdump -debug-dump=info - | FileCheck %s<br class=""> ; Use correct signedness when emitting constants of derived (sugared) types.<br class=""><br class="">-; Test compiled to IR from clang with -O1 and the following source:<br class="">-<br class="">-; void func(int);<br class="">-; void func(unsigned);<br class="">-; void func(char16_t);<br class="">-; int main() {<br class="">-; const int i = 42;<br class="">-; func(i);<br class="">-; const unsigned j = 117;<br class="">-; func(j);<br class="">-; char16_t c = 7;<br class="">-; func(c);<br class="">-; }<br class="">-<br class=""> ; CHECK: DW_AT_const_value [DW_FORM_sdata] (42)<br class=""> ; CHECK: DW_AT_const_value [DW_FORM_udata] (117)<br class=""> ; CHECK: DW_AT_const_value [DW_FORM_udata] (7)<br class=""><br class=""> ; Function Attrs: uwtable<br class="">-define i32 @main() #0 !dbg !4 {<br class="">+define void @main() #0 !dbg !4 {<br class=""> entry:<br class=""> tail call void @llvm.dbg.value(metadata i32 42, i64 0, metadata !10, metadata !DIExpression()), !dbg !21<br class="">- tail call void @_Z4funci(i32 42), !dbg !22<br class=""> tail call void @llvm.dbg.value(metadata i32 117, i64 0, metadata !12, metadata !DIExpression()), !dbg !24<br class="">- tail call void @_Z4funcj(i32 117), !dbg !25<br class=""> tail call void @llvm.dbg.value(metadata i16 7, i64 0, metadata !15, metadata !DIExpression()), !dbg !27<br class="">- tail call void @_Z4funcDs(i16 zeroext 7), !dbg !28<br class="">- ret i32 0, !dbg !29<br class="">+ ret void, !dbg !29<br class=""> }<br class=""><br class="">-declare void @_Z4funci(i32) #1<br class="">-<br class="">-declare void @_Z4funcj(i32) #1<br class="">-<br class="">-declare void @_Z4funcDs(i16 zeroext) #1<br class="">-<br class=""> ; Function Attrs: nounwind readnone<br class=""> declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2<br class=""><br class="">-attributes #0 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }<br class="">-attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }<br class="">+attributes #0 = { uwtable }<br class=""> attributes #2 = { nounwind readnone }<br class=""><br class=""> !<a href="http://llvm.dbg.cu/" rel="noreferrer" target="_blank" class="">llvm.dbg.cu</a><span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>= !{!0}<br class=""><br class="">Modified: llvm/trunk/test/DebugInfo/MIR/X86/bit-piece-dh.mir<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/MIR/X86/bit-piece-dh.mir?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/MIR/X86/bit-piece-dh.mir?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/MIR/X86/bit-piece-dh.mir (original)<br class="">+++ llvm/trunk/test/DebugInfo/MIR/X86/bit-piece-dh.mir Fri Jun 16 17:40:04 2017<br class="">@@ -1,13 +1,9 @@<br class="">-# RUN: llc -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br class="">+# RUN: llc -filetype=obj -o - %s | llvm-dwarfdump --debug-dump=info - | FileCheck %s<br class=""> # CHECK: .debug_info contents:<br class=""> # CHECK: DW_TAG_variable<br class="">-# CHECK-NEXT: DW_AT_location [DW_FORM_sec_offset] ([[OFS:.*]])<br class="">-# CHECK-NEXT: DW_AT_name {{.*}}"dh"<br class="">-# CHECK: .debug_loc contents:<br class="">-# CHECK: [[OFS]]: Beginning address offset: 0x0000000000000002<br class="">-# CHECK: Ending address offset: 0x000000000000000c<br class="">-# CHECK: Location description: 51 9d 08 08<br class=""> # rdx, bit-piece 8 8<br class="">+# CHECK-NEXT: DW_AT_location {{.*}} 51 9d 08 08<br class="">+# CHECK-NEXT: DW_AT_name {{.*}}"dh"<br class=""> --- |<br class=""> ; Manually created after:<br class=""> ; char f(int i) {<br class=""><br class="">Modified: llvm/trunk/test/DebugInfo/X86/dbg-merge-loc-entry.ll<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dbg-merge-loc-entry.ll?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dbg-merge-loc-entry.ll?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/X86/dbg-merge-loc-entry.ll (original)<br class="">+++ llvm/trunk/test/DebugInfo/X86/dbg-merge-loc-entry.ll Fri Jun 16 17:40:04 2017<br class="">@@ -6,6 +6,7 @@<br class=""> target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"<br class=""> target triple = "x86_64-apple-darwin8"<br class=""><br class="">+; Test that consecutive, identical DBG_VALUEs are merged.<br class=""> ;CHECK: DW_AT_location{{.*}}(<0x1> 55 )<br class=""><br class=""> %0 = type { i64, i1 }<br class="">@@ -19,6 +20,7 @@ entry:<br class=""> br i1 undef, label %bb2, label %bb4, !dbg !22<br class=""><br class=""> bb2: ; preds = %entry<br class="">+ tail call void @llvm.dbg.value(metadata i128 %u, i64 0, metadata !14, metadata !DIExpression()), !dbg !15<br class=""> br label %bb4, !dbg !23<br class=""><br class=""> bb4: ; preds = %bb2, %entry<br class=""><br class="">Modified: llvm/trunk/test/DebugInfo/X86/inlined-formal-parameter.ll<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/inlined-formal-parameter.ll?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/inlined-formal-parameter.ll?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/X86/inlined-formal-parameter.ll (original)<br class="">+++ llvm/trunk/test/DebugInfo/X86/inlined-formal-parameter.ll Fri Jun 16 17:40:04 2017<br class="">@@ -1,5 +1,5 @@<br class=""> ; RUN: llc -filetype=obj -o %t.o %s<br class="">-; RUN: llvm-dwarfdump -debug-dump=info %t.o | FileCheck %s<br class="">+; RUN: llvm-dwarfdump %t.o | FileCheck %s<br class=""><br class=""> ; Testcase generated using 'clang -g -O2 -S -emit-llvm' from the following:<br class=""> ;; void sink(void);<br class="">@@ -10,6 +10,7 @@<br class=""> ;; }<br class=""><br class=""> ; Check that we have formal parameters for 'a' in both inlined subroutines.<br class="">+; CHECK: .debug_info<br class=""> ; CHECK: DW_TAG_inlined_subroutine<br class=""> ; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "bar"<br class=""> ; CHECK: DW_TAG_formal_parameter<br class="">@@ -18,9 +19,11 @@<br class=""> ; CHECK: DW_TAG_inlined_subroutine<br class=""> ; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "bar"<br class=""> ; CHECK: DW_TAG_formal_parameter<br class="">-; CHECK-NEXT: DW_AT_const_value<br class="">+; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (0x00000000)<br class=""> ; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "a"<br class="">-<br class="">+;<br class="">+; CHECK: .debug_loc<br class="">+; CHECK: Location description: 11 00<br class=""> target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"<br class=""> target triple = "x86_64-apple-darwin"<br class=""><br class="">@@ -34,13 +37,12 @@ entry:<br class=""> ret void, !dbg !24<br class=""> }<br class=""><br class="">-declare void @sink() #1<br class="">+declare void @sink()<br class=""><br class=""> ; Function Attrs: nounwind readnone<br class=""> declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2<br class=""><br class="">-attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" }<br class="">-attributes #1 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="core2" "unsafe-fp-math"="false" "use-soft-float"="false" }<br class="">+attributes #0 = { nounwind ssp uwtable }<br class=""> attributes #2 = { nounwind readnone }<br class=""> attributes #3 = { nounwind }<br class=""><br class=""><br class="">Modified: llvm/trunk/test/DebugInfo/X86/parameters.ll<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/parameters.ll?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/parameters.ll?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/X86/parameters.ll (original)<br class="">+++ llvm/trunk/test/DebugInfo/X86/parameters.ll Fri Jun 16 17:40:04 2017<br class="">@@ -24,8 +24,9 @@<br class=""><br class=""> ; CHECK: debug_info contents<br class=""> ; 0x74 is DW_OP_breg4, showing that the parameter is accessed indirectly<br class="">-; (with a zero offset) from the register parameter<br class="">-; CHECK: DW_AT_location [DW_FORM_data4] ([[F_LOC:0x[0-9]*]])<br class="">+; (with a zero offset) from the register parameter.<br class="">+; CHECK: DW_AT_location {{.*}} 74 00 06<br class="">+<br class=""> ; CHECK-NOT: DW_TAG<br class=""> ; CHECK: DW_AT_name{{.*}} = "f"<br class=""> ;<br class="">@@ -34,9 +35,6 @@<br class=""> ; CHECK: DW_AT_name{{.*}} = "g"<br class=""> ;<br class=""> ; CHECK: debug_loc contents<br class="">-; CHECK: [[F_LOC]]: Beginning<br class="">-; CHECK-NEXT: Ending<br class="">-; CHECK-NEXT: Location description: 74 00<br class=""> ; CHECK: [[G_LOC]]: Beginning<br class=""> ; CHECK-NEXT: Ending<br class=""> ; CHECK-NEXT: Location description: 74 00<br class="">@@ -77,11 +75,10 @@ if.end:<br class=""> ret void, !dbg !32<br class=""> }<br class=""><br class="">-declare void @_ZN7pr147634sinkEPv(i8*) #2<br class="">+declare void @_ZN7pr147634sinkEPv(i8*)<br class=""><br class="">-attributes #0 = { uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }<br class="">+attributes #0 = { uwtable }<br class=""> attributes #1 = { nounwind readnone }<br class="">-attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf"="true" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false" "use-soft-float"="false" }<br class=""><br class=""> !<a href="http://llvm.dbg.cu/" rel="noreferrer" target="_blank" class="">llvm.dbg.cu</a><span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span>= !{!0}<br class=""> !llvm.module.flags = !{!21, !33}<br class=""><br class="">Modified: llvm/trunk/test/DebugInfo/X86/pieces-3.ll<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pieces-3.ll?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pieces-3.ll?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/X86/pieces-3.ll (original)<br class="">+++ llvm/trunk/test/DebugInfo/X86/pieces-3.ll Fri Jun 16 17:40:04 2017<br class="">@@ -19,7 +19,9 @@<br class=""> ; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ([[LOC1:.*]])<br class=""> ; CHECK-NEXT: DW_AT_name {{.*}}"outer"<br class=""> ; CHECK: DW_TAG_variable<br class="">-; CHECK-NEXT: DW_AT_location [DW_FORM_data4] ([[LOC2:.*]])<br class="">+; CHECK-NEXT: DW_AT_location<br class="">+; rsi, piece 0x00000004<br class="">+; CHECK-SAME: 54 93 04<br class=""> ; CHECK-NEXT: "i1"<br class=""> ;<br class=""> ; CHECK: .debug_loc<br class="">@@ -32,10 +34,6 @@<br class=""> ; CHECK: Beginning address offset: 0x0000000000000004<br class=""> ; CHECK-NEXT: Ending address offset: 0x0000000000000008<br class=""> ; CHECK-NEXT: Location description: 55 93 08 93 04 54 93 04<br class="">-; CHECK: [[LOC2]]: Beginning address offset: 0x0000000000000004<br class="">-; CHECK-NEXT: Ending address offset: 0x0000000000000008<br class="">-; rsi, piece 0x00000004<br class="">-; CHECK-NEXT: Location description: 54 93 04<br class=""><br class=""> ;<br class=""> ; ModuleID = '/Volumes/Data/llvm/test/DebugInfo/X86/sroasplit-2.ll'<br class="">@@ -48,6 +46,7 @@ define i32 @foo(i64 %outer.coerce0, i64<br class=""> call void @llvm.dbg.declare(metadata !{null}, metadata !27, metadata !28), !dbg !26<br class=""> call void @llvm.dbg.value(metadata i64 %outer.coerce1, i64 0, metadata !29, metadata !30), !dbg !26<br class=""> call void @llvm.dbg.declare(metadata !{null}, metadata !31, metadata !32), !dbg !26<br class="">+ ; The 'trunc' generates no extra code, thus i1 is visible throughout its scope.<br class=""> %outer.sroa.1.8.extract.trunc = trunc i64 %outer.coerce1 to i32, !dbg !33<br class=""> call void @llvm.dbg.value(metadata i32 %outer.sroa.1.8.extract.trunc, i64 0, metadata !34, metadata !35), !dbg !33<br class=""> %outer.sroa.1.12.extract.shift = lshr i64 %outer.coerce1, 32, !dbg !33<br class=""><br class="">Modified: llvm/trunk/test/DebugInfo/X86/reference-argument.ll<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/reference-argument.ll?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/reference-argument.ll?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/X86/reference-argument.ll (original)<br class="">+++ llvm/trunk/test/DebugInfo/X86/reference-argument.ll Fri Jun 16 17:40:04 2017<br class="">@@ -1,4 +1,5 @@<br class="">-; RUN: llc -mtriple=x86_64-apple-macosx10.9.0 -filetype=obj -O0 < %s | llvm-dwarfdump -debug-dump=all - | FileCheck %s<br class="">+; RUN: llc -mtriple=x86_64-apple-macosx10.9.0 -filetype=obj -O0 < %s \<br class="">+; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck %s<br class=""> ; ModuleID = 'aggregate-indirect-arg.cpp'<br class=""> ; extracted from debuginfo-tests/aggregate-indirect-arg.cpp<br class=""><br class="">@@ -11,11 +12,10 @@<br class=""> ; CHECK: DW_AT_name {{.*}} "this"<br class=""> ; CHECK-NOT: DW_TAG_subprogram<br class=""> ; CHECK: DW_TAG_formal_parameter<br class="">-; CHECK-NEXT: DW_AT_location [DW_FORM_data4] (0x00000000)<br class="">-; CHECK-NEXT: DW_AT_name {{.*}} "v"<br class="">-; CHECK: .debug_loc contents:<br class="">+; CHECK-NEXT: DW_AT_location<br class=""> ; rsi+0<br class="">-; CHECK: Location description: 74 00<br class="">+; CHECK-SAME: 74 00<br class="">+; CHECK-NEXT: DW_AT_name {{.*}} "v"<br class=""><br class=""> target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"<br class=""> target triple = "x86_64-apple-macosx10.9.0"<br class=""><br class="">Modified: llvm/trunk/test/DebugInfo/X86/this-stack_value.ll<br class="">URL:<span class="m_3940397167916384631m_5727533325716589789m_-5318965437009988461Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/this-stack_value.ll?rev=305599&r1=305598&r2=305599&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/this-stack_value.ll?rev=305599&r1=305598&r2=305599&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/DebugInfo/X86/this-stack_value.ll (original)<br class="">+++ llvm/trunk/test/DebugInfo/X86/this-stack_value.ll Fri Jun 16 17:40:04 2017<br class="">@@ -1,5 +1,5 @@<br class=""> ; RUN: llc -filetype=asm -o - %s | FileCheck %s --check-prefix=ASM<br class="">-; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump - | FileCheck %s<br class="">+; RUN: llc -filetype=obj -o - %s | llvm-dwarfdump --debug-dump=info - | FileCheck %s<br class=""> ;<br class=""> ; Generated at -O2 from:<br class=""> ; struct B;<br class="">@@ -18,7 +18,7 @@<br class=""> ; modified by the debugger.<br class=""> ;<br class=""> ; ASM: [DW_OP_stack_value]<br class="">-; CHECK: Location description: 70 00 9f<br class="">+; CHECK: DW_AT_location {{.*}} 70 00 9f<br class=""> ; rax+0, stack-value<br class=""> source_filename = "ab.cpp"<br class=""> target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></blockquote></div></div></div></blockquote></div></div></blockquote></div></div></blockquote></div></div></blockquote></div>
</div></blockquote></div><br class=""></body></html>