[JumpThreading] Change a return of ComputeValueKnownInPredecessors()

Change a return statement of ComputeValueKnownInPredecessors() to be the same as
the rest return statements of the function. Otherwise, it might return true with
an empty Result when the current basic block has no predecessors and trigger the
first assert of JumpThreading::ProcessThreadableEdges().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260110 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Haicheng Wu 2016-02-08 17:00:39 +00:00
parent 98d69cc318
commit b21e2903ef

View File

@ -415,7 +415,7 @@ ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB, PredValueInfo &Result,
for (BasicBlock *Pred : predecessors(BB))
Result.push_back(std::make_pair(KC, Pred));
return true;
return !Result.empty();
}
// If V is a non-instruction value, or an instruction in a different block,