[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().

llvm-svn: 260110
This commit is contained in:
Haicheng Wu 2016-02-08 17:00:39 +00:00
parent 2bba779272
commit b35f772b90
1 changed files with 1 additions and 1 deletions

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,