<div dir="ltr">There is no test case associated with this change, is this intentional?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 8, 2016 at 9:00 AM, Haicheng Wu via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: haicheng<br>
Date: Mon Feb  8 11:00:39 2016<br>
New Revision: 260110<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=260110&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=260110&view=rev</a><br>
Log:<br>
[JumpThreading] Change a return of ComputeValueKnownInPredecessors()<br>
<br>
Change a return statement of ComputeValueKnownInPredecessors() to be the same as<br>
the rest return statements of the function. Otherwise, it might return true with<br>
an empty Result when the current basic block has no predecessors and trigger the<br>
first assert of JumpThreading::ProcessThreadableEdges().<br>
<br>
Modified:<br>
    llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp<br>
<br>
Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=260110&r1=260109&r2=260110&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=260110&r1=260109&r2=260110&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Mon Feb  8 11:00:39 2016<br>
@@ -415,7 +415,7 @@ ComputeValueKnownInPredecessors(Value *V<br>
     for (BasicBlock *Pred : predecessors(BB))<br>
       Result.push_back(std::make_pair(KC, Pred));<br>
<br>
-    return true;<br>
+    return !Result.empty();<br>
   }<br>
<br>
   // If V is a non-instruction value, or an instruction in a different block,<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>