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">stoklund@2pi.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On Jan 18, 2012, at 2:08 PM, Bill Wendling wrote:<br>
<br>
</div><div><div class="h5">> 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 class="HOEnZb"><font color="#888888"><br>
/jakob<br>
<br>
</font></span></blockquote></div><br></div></div>