<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr">On Sat, Dec 8, 2012 at 1:30 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div dir="ltr">
<div class="im">On Fri, Dec 7, 2012 at 8:17 PM, Shuxin Yang <span dir="ltr"><<a href="mailto:shuxin.llvm@gmail.com" target="_blank">shuxin.llvm@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi, Chandler:<br>
    <br>
      Thank you for pointing out the problem. Yes, the "&&"
    should be replaced with "||".<br>
    I will commit the fix after some tests.  I don't feel like to
    include a testing case for <br>
    such inadvertent bug.  <br></div></blockquote><div><br></div></div><div>No, it is really important that we include just such test cases. See Duncan's email.</div><div><br></div><div><br></div><div>You also ignored the other bug I pointed out. It only required changing two lines of one your test cases to reproduce the crash:</div>

<div><br></div><div><div>define i32 @popcount(i64 %a, i32 %b) nounwind uwtable readnone ssp {</div><div class="im"><div>entry:</div><div>  %tobool3 = icmp eq i64 %a, 0</div><div>  br i1 %tobool3, label %while.end, label %while.body</div>

<div><br></div><div>while.body:                                       ; preds = %entry, %while.body</div></div><div>  %c.05 = phi i32 [ %inc, %while.body ], [ %b, %entry ]</div><div class="im"><div>  %a.addr.04 = phi i64 [ %and, %while.body ], [ %a, %entry ]</div>

</div><div>  %inc = add nsw i32 %c.05, 1</div><div class="im"><div>  %sub = add i64 %a.addr.04, -1</div><div>  %and = and i64 %sub, %a.addr.04</div><div>  %tobool = icmp eq i64 %and, 0</div><div>  br i1 %tobool, label %while.end, label %while.body</div>

<div><br></div><div>while.end:                                        ; preds = %while.body, %entry</div><div>  %c.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ]</div><div>  ret i32 %c.0.lcssa</div><div>}</div><div>

<br></div></div><div>I'm going to revert this patch while you fix it so that I can compile code again targeting corei7.</div></div></div></div></div></div>
</blockquote></div><br></div><div class="gmail_extra" style>FYI, reverted temporarily in r169683 to unbreak corei7 stuff... Resubmit when things are fixed, preferably with additional test cases etc.</div></div></div>