[SCEV] Verify that all mapped SCEV AddRecs refer to valid loops.
authorFlorian Hahn <flo@fhahn.com>
Wed, 30 Sep 2020 11:39:30 +0000 (12:39 +0100)
committerFlorian Hahn <flo@fhahn.com>
Wed, 30 Sep 2020 11:46:55 +0000 (12:46 +0100)
commit0eab9d5823815c6520697f8d725c402c88e5d050
tree1d137d0ca3cdf30fbd54f3686bdbfd5fff791fdb
parent0b17d4754a94b7129c2483762acd586783802b12
[SCEV] Verify that all mapped SCEV AddRecs refer to valid loops.

This check helps to guard against cases where expressions referring to
invalidated/deleted loops are not properly invalidated.

The additional check is motivated by the reproducer shared for 8fdac7cb7abb
and I think in general make sense as a sanity check.

Reviewed By: reames

Differential Revision: https://reviews.llvm.org/D88166
llvm/lib/Analysis/ScalarEvolution.cpp