[all-commits] [llvm/llvm-project] dc6825: [SLP] Limit second pass to register VF in vectoriz...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Sep 11 01:58:21 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc6825047c42442c5e18dd09d260bee983bc5712
      https://github.com/llvm/llvm-project/commit/dc6825047c42442c5e18dd09d260bee983bc5712
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    A llvm/test/Transforms/SLPVectorizer/AArch64/operand-chains-max-reg-vf.ll

  Log Message:
  -----------
  [SLP] Limit second pass to register VF in vectorizeNonVectorizableInsts. (#222755)

The second tryToVectorizeList pass in vectorizeNonVectorizableInsts
would try all roots for each possible VF between 1 and the number of
entries in the list.

This can cause super-linear compile-time, for example when there are
basic blocks with calls taking a large number of loads as arguments.

For example, running SLPVectorizer on a block with 1024 loads passed to
calls (https://llvm.godbolt.org/z/8M53G6WzW) will take a large amount of
time (timeout on godbolt, locally on Apple M1 it takes ~30s). With the
fix, it only takes 0.01s.

On large IR corpus, I did not see any difference in vectorization
decisions on AArch64.

PR: https://github.com/llvm/llvm-project/pull/222755



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