aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/LoopCacheAnalysis.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-07-29 20:15:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-07-29 20:15:26 +0000
commit344a3780b2e33f6ca763666c380202b18aab72a3 (patch)
treef0b203ee6eb71d7fdd792373e3c81eb18d6934dd /llvm/lib/Analysis/LoopCacheAnalysis.cpp
parentb60736ec1405bb0a8dd40989f67ef4c93da068ab (diff)
Diffstat (limited to 'llvm/lib/Analysis/LoopCacheAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/LoopCacheAnalysis.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LoopCacheAnalysis.cpp b/llvm/lib/Analysis/LoopCacheAnalysis.cpp
index cf68596bfbc3..8a613647bbea 100644
--- a/llvm/lib/Analysis/LoopCacheAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopCacheAnalysis.cpp
@@ -109,9 +109,7 @@ static const SCEV *computeTripCount(const Loop &L, ScalarEvolution &SE) {
if (isa<SCEVCouldNotCompute>(BackedgeTakenCount) ||
!isa<SCEVConstant>(BackedgeTakenCount))
return nullptr;
-
- return SE.getAddExpr(BackedgeTakenCount,
- SE.getOne(BackedgeTakenCount->getType()));
+ return SE.getTripCountFromExitCount(BackedgeTakenCount);
}
//===----------------------------------------------------------------------===//