[all-commits] [llvm/llvm-project] 7bf820: [SLP] Fix crash in ordered reduction with loop-car...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Fri Jun 5 16:19:58 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7bf820c20f08a56eeef027838b992708e5654ff7
      https://github.com/llvm/llvm-project/commit/7bf820c20f08a56eeef027838b992708e5654ff7
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2026-06-05 (Fri, 05 Jun 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    A llvm/test/Transforms/SLPVectorizer/X86/ordered-reduction-root-deleted.ll

  Log Message:
  -----------
  [SLP] Fix crash in ordered reduction with loop-carried chain root

tryToReduceOrdered built the buildTree ignore list only from the current
window's reduced values, omitting the chain root when its leaf is a
trailing scalar outside the window.
buildTree then vectorized the root through the phi cycle,
vectorizeTree unlinked it, and emitReduction inserted at the dangling
insertion point.
Build the ignore list from the full ReductionOps chain, matching the
associative-reduction path, so the root stays scalar to fix a crash.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/201963



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