mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[NFCI][LoopDeletion] Do not call complex analysis for known non-zero BTC
This commit is contained in:
parent
8529f1644f
commit
fb6b06d635
@ -343,6 +343,8 @@ breakBackedgeIfNotTaken(Loop *L, DominatorTree &DT, ScalarEvolution &SE,
|
||||
return LoopDeletionResult::Unmodified;
|
||||
|
||||
auto *BTC = SE.getBackedgeTakenCount(L);
|
||||
if (!isa<SCEVCouldNotCompute>(BTC) && SE.isKnownNonZero(BTC))
|
||||
return LoopDeletionResult::Unmodified;
|
||||
if (!BTC->isZero() && !canProveExitOnFirstIteration(L, DT, SE, LI))
|
||||
return LoopDeletionResult::Unmodified;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user