aemerson added a comment. Can you not pass the `-loop-interchange-threshold` option to force the cost model to always interchange? If this isn't possible with the current code then it seems like a major oversight. https://reviews.llvm.org/D38682