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.
It would probably be even better to iterate over all unique SCEVs, but
that currently causes a few assertion in loop fusion, which I still need
to investigate.
IIUC expressions should be deleted from UniqueSCEVs as soon
as the last value handle to an expression is removed from
ValueExprMap.
clang-tidy: warning: 'auto &KV' can be declared as 'const auto &KV' [llvm-qualified-auto]
not useful