mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[SCEV] Add a comment about invariant in howManyLessThans
This commit is contained in:
parent
18108c50ec
commit
b21820b66f
@ -11728,6 +11728,15 @@ ScalarEvolution::howManyLessThans(const SCEV *LHS, const SCEV *RHS,
|
||||
return getCouldNotCompute();
|
||||
}
|
||||
|
||||
// On all paths just preceeding, we established the following invariant:
|
||||
// IV can be assumed not to overflow up to and including the exiting
|
||||
// iteration. We proved this in one of two ways:
|
||||
// 1) We can show overflow doesn't occur before the exiting iteration
|
||||
// 1a) canIVOverflowOnLT, and b) step of one
|
||||
// 2) We can show that if overflow occurs, the loop must execute UB
|
||||
// before any possible exit.
|
||||
// Note that we have not yet proved RHS invariant (in general).
|
||||
|
||||
const SCEV *Start = IV->getStart();
|
||||
|
||||
// Preserve pointer-typed Start/RHS to pass to isLoopEntryGuardedByCond.
|
||||
|
Loading…
Reference in New Issue
Block a user