[all-commits] [llvm/llvm-project] 91f396: [LoopInterchange] Fix the vectorizable check for a...

Ryotaro Kasuga via All-commits all-commits at lists.llvm.org
Thu Apr 3 00:21:41 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 91f3965be43ccb5291fcb5578b62648a1ece17bc
      https://github.com/llvm/llvm-project/commit/91f3965be43ccb5291fcb5578b62648a1ece17bc
  Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
  Date:   2025-04-03 (Thu, 03 Apr 2025)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    M llvm/test/Transforms/LoopInterchange/profitability-vectorization-heuristic.ll

  Log Message:
  -----------
  [LoopInterchange] Fix the vectorizable check for a loop (#133667)

In the profitability check for vectorization, the dependency matrix was
not handled correctly. This can result to make a wrong decision: It may
say "this loop can be vectorized" when in fact it cannot. The root cause
of this is that the check process early returns when it finds '=' or 'I'
in the dependency matrix. To make sure that we can actually vectorize
the loop, we need to check all the rows of the matrix. This patch fixes
the process of checking whether we can vectorize the loop or not. Now it
won't make a wrong decision for a loop that cannot be vectorized.

Related: #131130



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list