sjoerdmeijer wrote: > I think we should modify LoopInterchangeProfitability and avoid to interchange the same pair of loops more than once. I completely agree with this and that sounds like a bug in the cost-model. https://github.com/llvm/llvm-project/pull/118267