[llvm] [LoopInterchange] Ignore the cost-model, force interchange if legal (PR #148858)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 15 09:21:29 PDT 2025


================
@@ -2,6 +2,10 @@
 ; RUN:     -pass-remarks-output=%t -disable-output
 ; RUN: FileCheck -input-file %t --check-prefix=PROFIT-CACHE %s
 
+; RUN: opt < %s -passes=loop-interchange -cache-line-size=64 \
+; RUN:     -pass-remarks-output=%t -disable-output -loop-interchange-force=true
+; RUN: FileCheck -input-file %t --check-prefix=PROFIT-VEC %s
----------------
kasuga-fj wrote:

Could you please add another test case? Interchanging the loops in this test would be beneficial in perspective of vectorizatoin (i.e., `isProfitableForVectorization` returns true in this case) because it makes the innermost loop vectorizable. It would be ideal to add a case where interchanging is *definitely* unprofitable.

https://github.com/llvm/llvm-project/pull/148858


More information about the llvm-commits mailing list