[SCEV] Don't verify dispositions of invalid loops

This should fix the expensive checks build. Ideally we would not
have invalid loops in LoopDispositions.
This commit is contained in:
Nikita Popov 2022-09-19 15:07:03 +02:00
parent d90a42d64c
commit 36f325413e
1 changed files with 3 additions and 0 deletions

View File

@ -13976,6 +13976,9 @@ void ScalarEvolution::verify() const {
for (auto &V : Values) {
auto CachedDisposition = V.getInt();
const auto *Loop = V.getPointer();
// TODO: Make sure LoopDispositions contains no invalid loops.
if (!ValidLoops.contains(Loop))
continue;
const auto RecomputedDisposition = SE2.getLoopDisposition(S, Loop);
if (CachedDisposition != RecomputedDisposition) {
dbgs() << "Cached disposition of " << *S << " for loop " << *Loop