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

Ryotaro Kasuga via All-commits all-commits at lists.llvm.org
Wed Apr 2 00:29:27 PDT 2025


  Branch: refs/heads/users/kasuga-fj/loop-interchange-fix-profitable-vectorization
  Home:   https://github.com/llvm/llvm-project
  Commit: bd84ddc9e4dc645e965b2a6dc535a3023e0d7e45
      https://github.com/llvm/llvm-project/commit/bd84ddc9e4dc645e965b2a6dc535a3023e0d7e45
  Author: Ryotaro Kasuga <kasuga.ryotaro at fujitsu.com>
  Date:   2025-04-02 (Wed, 02 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

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