The isOuterMostDepPositive() was there to check the negative dependency ('>') of outermost loop.This checking was there before https://github.com/llvm/llvm-project/issues/56275. In https://github.com/llvm/llvm-project/issues/56275 patch, DependenceInfo will make the negative dependency to non-negative (if NeedsNormalize is true). In LoopInterchange, DependenceInfo is used with NeedsNormalize as true. So there will not be any negative dependency in dependency matrix (DepMatrix). So checking the isOuterMostDepPositive is irrelevant (it returns true for negative dependency only).
With this patch all test cases can be passed with negative dependencies. Existing test cases with negative dependency listed below.
- pr56275.ll
- profitability.ll
- loop-interchange-optimization-remarks.ll
- interchangeable.ll