diff options
author | Haicheng Wu <haicheng@codeaurora.org> | 2016-02-08 17:00:39 +0000 |
---|---|---|
committer | Haicheng Wu <haicheng@codeaurora.org> | 2016-02-08 17:00:39 +0000 |
commit | b35f772b904cae91dc5845c35171fab46415972d (patch) | |
tree | a1de8b1c1238cc85fddb72fa9aeb670568d0bbd8 /llvm/lib/Transforms/Scalar/JumpThreading.cpp | |
parent | 2bba779272a23094b3a1ff7b3c56259d51f457df (diff) | |
download | bcm5719-llvm-b35f772b904cae91dc5845c35171fab46415972d.tar.gz bcm5719-llvm-b35f772b904cae91dc5845c35171fab46415972d.zip |
[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
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 3a4c19a16c6..928fa3b1c6a 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -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, |