aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h5
-rw-r--r--lib/Analysis/ScalarEvolution.cpp1
2 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index 6e30b31..f249bcf 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -319,8 +319,9 @@ namespace llvm {
const SCEV *getExact(ScalarEvolution *SE) const;
/// getExact - Return the number of times this loop exit may fall through
- /// to the back edge. The loop is guaranteed not to exit via this block
- /// before this number of iterations, but may exit via another block.
+ /// to the back edge, or SCEVCouldNotCompute. The loop is guaranteed not
+ /// to exit via this block before this number of iterations, but may exit
+ /// via another block.
const SCEV *getExact(BasicBlock *ExitingBlock, ScalarEvolution *SE) const;
/// getMax - Get the max backedge taken count for the loop.
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 202e715..8859c3b 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -4090,6 +4090,7 @@ ScalarEvolution::BackedgeTakenInfo::getExact(ScalarEvolution *SE) const {
else
BECount = SE->getUMinFromMismatchedTypes(BECount, ENT->ExactNotTaken);
}
+ assert(BECount && "Invalid not taken count for loop exit");
return BECount;
}