FRIDAY, SEPTEMBER 18, 2026
gcc
Assert SLP discovery nodes are not soft-failed
Ensures SLP discovery does not incorrectly keep nodes that should have been marked as failed.
This commit adds an assertion in vect_build_slp_tree to verify that nodes discovered by SLP (Simultaneous Loop Parallelization) are not marked as needing to be split. This change ensures that the SLP discovery cache remains consistent and prevents issues arising from nodes that were not properly soft-failed during discovery.
In Details
Adds an assertion in tree-vect-slp.cc's vect_build_slp_tree to catch cases where SLP discovery might yield a node that still requires splitting (i.e., was not soft-failed correctly). This ensures the SLP cache integrity before further processing.
For Context
- SLP (Simultaneous Loop Parallelization)
- A compiler optimization technique that identifies opportunities to perform loop-independent operations in parallel, even within a single iteration.
- SLP discovery
- The phase within the SLP optimization where the compiler identifies potential parallelizable instruction patterns.
- soft-fail
- In the context of compiler optimizations, a mechanism to tentatively mark a node or pattern as unsuitable, allowing for later re-evaluation or alternative processing without immediately discarding it.
- tree-vect-slp.cc
- The GCC source file containing implementations for SLP vectorization.