[all-commits] [llvm/llvm-project] 642bde: [SLP] Fix infinite loop in ordered reduction workl...

Jinsong Ji via All-commits all-commits at lists.llvm.org
Tue Mar 24 14:20:16 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 642bde76c32e38457a0b30644763f1447523cff5
      https://github.com/llvm/llvm-project/commit/642bde76c32e38457a0b30644763f1447523cff5
  Author: Jinsong Ji <jinsong.ji at intel.com>
  Date:   2026-03-24 (Tue, 24 Mar 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    A llvm/test/Transforms/SLPVectorizer/order-reduction-infinite-loop.ll

  Log Message:
  -----------
  [SLP] Fix infinite loop in ordered reduction worklist processing (#188342)

The ordered reduction support introduced in 94e366ef2060 can cause an
infinite loop when processing complex reduction chains. The worklist
algorithm re-adds instructions from PossibleOrderedReductionOps when
switching to ordered mode, but doesn't track which instructions have
already been processed. This allows instructions to be re-added and
processed multiple times, creating cycles.

Add a Visited set to track processed instructions and skip any that
have already been handled, preventing the infinite loop.



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