<font size="2"><font face="tahoma,sans-serif">This possibly fixed <a href="http://llvm.org/bugs/show_bug.cgi?id=8212">http://llvm.org/bugs/show_bug.cgi?id=8212</a> too .<br></font></font><br><div class="gmail_quote">On Thu, Sep 23, 2010 at 9:32 PM, Evan Cheng <span dir="ltr"><<a href="mailto:evan.cheng@apple.com">evan.cheng@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Author: evancheng<br>
Date: Thu Sep 23 13:32:19 2010<br>
New Revision: 114681<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=114681&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=114681&view=rev</a><br>
Log:<br>
Revert 114634 for now since buildbot claim it broke Clang self-hosting. I doubt it but it's possible it's exposing another bug somewhere.<br>
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=114681&r1=114680&r2=114681&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=114681&r1=114680&r2=114681&view=diff</a><br>


==============================================================================<br>
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Thu Sep 23 13:32:19 2010<br>
@@ -1617,8 +1617,9 @@<br>
                                 MVT::Other, CopyTo, RangeCmp,<br>
                                 DAG.getBasicBlock(B.Default));<br>
<br>
-  BrRange = DAG.getNode(ISD::BR, getCurDebugLoc(), MVT::Other, CopyTo,<br>
-                        DAG.getBasicBlock(MBB));<br>
+  if (MBB != NextBlock)<br>
+    BrRange = DAG.getNode(ISD::BR, getCurDebugLoc(), MVT::Other, CopyTo,<br>
+                          DAG.getBasicBlock(MBB));<br>
<br>
   DAG.setRoot(BrRange);<br>
 }<br>
@@ -1671,8 +1672,9 @@<br>
   if (++BBI != FuncInfo.MF->end())<br>
     NextBlock = BBI;<br>
<br>
-  BrAnd = DAG.getNode(ISD::BR, getCurDebugLoc(), MVT::Other, BrAnd,<br>
-                      DAG.getBasicBlock(NextMBB));<br>
+  if (NextMBB != NextBlock)<br>
+    BrAnd = DAG.getNode(ISD::BR, getCurDebugLoc(), MVT::Other, BrAnd,<br>
+                        DAG.getBasicBlock(NextMBB));<br>
<br>
   DAG.setRoot(BrAnd);<br>
 }<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>