This is the 2nd patch of the two-patch series that fix PR56275 (https://github.com/llvm/llvm-project/issues/56275): D130188 D130189.
Following up on the dependence analysis (DA) patch D130188, in this patch we query DA with NeedsNormalize=true in loop interchange, such that the DA results queried by loop interchange are normalized. With a minor fix w.r.t. how loop interchange interpret dependence distances, all tests in PR56275 can get interchanged.
I've added the tests in PR56275 in lit test pr56275.ll for more details.
Before I can accept the patch, I would like to see D130188 to treat a Dependence object as immutable (modifying global state is incompatible with pass manager analysis caching)