aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-12-01 10:32:37 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-12-01 10:32:37 +0100
commit84b978da3b80b986327a830c01e32f12cefe86b3 (patch)
treea56fd66a10bee32dad9cc5b75175388b11a45159 /llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
parent67704801c679a59c552dfade92a3d7c53979e2c8 (diff)
downloadllvm-84b978da3b80b986327a830c01e32f12cefe86b3.zip
llvm-84b978da3b80b986327a830c01e32f12cefe86b3.tar.gz
llvm-84b978da3b80b986327a830c01e32f12cefe86b3.tar.bz2
[LoopUnrollRuntime] Remove unnecessary pointer BECount check (NFC)
BECounts are guaranteed to be integers nowadays.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
index a92cb6a..bb719a4 100644
--- a/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -623,15 +623,13 @@ bool llvm::UnrollRuntimeLoopRemainder(
if (!SE)
return false;
- // Only unroll loops with a computable trip count, and the trip count needs
- // to be an int value (allowing a pointer type is a TODO item).
+ // Only unroll loops with a computable trip count.
// We calculate the backedge count by using getExitCount on the Latch block,
// which is proven to be the only exiting block in this loop. This is same as
// calculating getBackedgeTakenCount on the loop (which computes SCEV for all
// exiting blocks).
const SCEV *BECountSC = SE->getExitCount(L, Latch);
- if (isa<SCEVCouldNotCompute>(BECountSC) ||
- !BECountSC->getType()->isIntegerTy()) {
+ if (isa<SCEVCouldNotCompute>(BECountSC)) {
LLVM_DEBUG(dbgs() << "Could not compute exit block SCEV\n");
return false;
}