<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi David,<div><br></div><div>Indeed, this has been brought up during the review.</div><div><br></div><div>Jonas hasn’t been able to find a test case for in-tree targets so far.</div><div>I’ve given him a few hints that may help him to reproduce the problem with in-tree targets, but the conditions to make that happen are quite difficult to have all lined up (that’s why it never occurred so far, whereas the bug was there forever).</div><div><br></div><div>Jonas may have additional comments.</div><div><br></div><div>Thanks,</div><div>-Quentin</div><div><br><div><div>On Dec 11, 2014, at 9:58 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Any chance of a test case? (I assume this was brought up in code review - but it's helpful to have the justification included in the commit message, ideally)</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 11, 2014 at 2:40 AM, Patrik Hagglund <span dir="ltr"><<a href="mailto:patrik.h.hagglund@ericsson.com" target="_blank">patrik.h.hagglund@ericsson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: patha<br>
Date: Thu Dec 11 04:40:17 2014<br>
New Revision: 224009<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=224009&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=224009&view=rev</a><br>
Log:<br>
Bugfix in InlineSpiller::traceSiblingValue().<br>
<br>
Properly determine whether or not a phi was added by splitting.<br>
Check against the current VNInfo of OrigLI instead of against the<br>
OrigVNI argument.<br>
<br>
Patch provided by Jonas Paulsson. Reviewed by Quentin Colombet.<br>
<br>
Modified:<br>
llvm/trunk/lib/CodeGen/InlineSpiller.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/InlineSpiller.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=224009&r1=224008&r2=224009&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/InlineSpiller.cpp?rev=224009&r1=224008&r2=224009&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/InlineSpiller.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/InlineSpiller.cpp Thu Dec 11 04:40:17 2014<br>
@@ -508,6 +508,7 @@ MachineInstr *InlineSpiller::traceSiblin<br>
SmallVector<std::pair<unsigned, VNInfo*>, 8> WorkList;<br>
WorkList.push_back(std::make_pair(UseReg, UseVNI));<br>
<br>
+ LiveInterval &OrigLI = LIS.getInterval(Original);<br>
do {<br>
unsigned Reg;<br>
VNInfo *VNI;<br>
@@ -521,8 +522,11 @@ MachineInstr *InlineSpiller::traceSiblin<br>
<br>
// Trace through PHI-defs created by live range splitting.<br>
if (VNI->isPHIDef()) {<br>
- // Stop at original PHIs. We don't know the value at the predecessors.<br>
- if (VNI->def == OrigVNI->def) {<br>
+ // Stop at original PHIs. We don't know the value at the<br>
+ // predecessors. Look up the VNInfo for the current definition<br>
+ // in OrigLI, to properly determine whether or not this phi was<br>
+ // added by splitting.<br>
+ if (VNI->def == OrigLI.getVNInfoAt(VNI->def)->def) {<br>
DEBUG(dbgs() << "orig phi value\n");<br>
SVI->second.DefByOrigPHI = true;<br>
SVI->second.AllDefsAreReloads = false;<br>
@@ -542,7 +546,6 @@ MachineInstr *InlineSpiller::traceSiblin<br>
// Separate all values dominated by OrigVNI into PHIs and non-PHIs.<br>
SmallVector<VNInfo*, 8> PHIs, NonPHIs;<br>
LiveInterval &LI = LIS.getInterval(Reg);<br>
- LiveInterval &OrigLI = LIS.getInterval(Original);<br>
<br>
for (LiveInterval::vni_iterator VI = LI.vni_begin(), VE = LI.vni_end();<br>
VI != VE; ++VI) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></div></body></html>