forked from OSchip/llvm-project
[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:
parent
2bba779272
commit
b35f772b90
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue