On Jakob's suggestion I've made the break unconditional and removed the assert in r148984. <br><br><div>- Lang.</div><div><br><div class="gmail_quote">On Wed, Jan 25, 2012 at 12:57 PM, Chad Rosier <span dir="ltr"><<a href="mailto:mcrosier@apple.com">mcrosier@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Lang,<div>I believe the change is correct.  Per Jakob's comment, would you mind adding a comment to the source?</div>
<span class="HOEnZb"><font color="#888888"><div><br></div><div> Chad</div></font></span><div><br><div><div><div class="h5"><div>On Jan 25, 2012, at 12:34 PM, Lang Hames wrote:</div><br></div></div><blockquote type="cite">
<div><div class="h5">Oops - this slipped through the cracks. Sorry about the late reply.<div><br></div><div>Jakob nailed it (mostly) - you'd only want to continue the loop to trigger the assert.<div><br></div><div>The change is correct though. Beware the double negative: The original, "#ifndef NDEBUG", reads as "if not not debugging", so the break only went in in debug mode. :)</div>

<div><br></div><div>- Lang.<br><br><div class="gmail_quote">On Wed, Jan 18, 2012 at 5:46 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><br>
On Jan 18, 2012, at 2:08 PM, Bill Wendling wrote:<br>
<br>
</div><div><div>> On Jan 18, 2012, at 11:48 AM, Lang Hames wrote:<br>
><br>
>> Author: lhames<br>
>> Date: Wed Jan 18 13:48:31 2012<br>
>> New Revision: 148408<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=148408&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=148408&view=rev</a><br>
>> Log:<br>
>> Fixed macro condition.<br>
>><br>
>> Modified:<br>
>>   llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp<br>
>><br>
>> Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=148408&r1=148407&r2=148408&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=148408&r1=148407&r2=148408&view=diff</a><br>


>> ==============================================================================<br>
>> --- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)<br>
>> +++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Jan 18 13:48:31 2012<br>
>> @@ -823,7 +823,7 @@<br>
>>    assert(!RegOp &&<br>
>>           "Can't rematerialize instruction with multiple register operand!");<br>
>>    RegOp = MO.getReg();<br>
>> -#ifndef NDEBUG<br>
>> +#ifdef NDEBUG<br>
>>    break;<br>
>> #endif<br>
>>  }<br>
>><br>
> What's the purpose of having this 'break' statement only in release mode? That would appear to cause possible different behavior between release and debug modes...<br>
<br>
</div></div>The only purpose of continuing the loop would be to fire the assertion above, so I actually think Lang's change is wrong.<br>
<br>
It's pretty gross, particularly without a comment.<br>
<span><font color="#888888"><br>
/jakob<br>
<br>
</font></span></blockquote></div><br></div></div></div></div><div class="im">
_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">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>
</div></blockquote></div><br></div></div>
</blockquote></div><br></div>