GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
tree-optimization

tree-optimization/127705 - access violation with SCC copy

Fixes an access violation in the SLP vectorization pass when copying the Strongly Connected Component (SCC) for scheduling.

This commit addresses a bug in the SLP (Short-Loop Parallelism) vectorization pass that caused an access violation. The issue occurred during the process of saving the Strongly Connected Component (SCC) for later setting of the scheduling result across all components. The fix corrects how the SCC is copied, resolving the crash and ensuring proper scheduling of vectorized code.

In Details

This patch fixes PR tree-optimization/127705, related to the vect_schedule_scc function in tree-vect-slp.cc. The function is responsible for scheduling operations within a loop after SLP vectorization. The bug involved a botched attempt to save the SCC data structure for later use, leading to an access violation. The fix ensures that the SCC is correctly copied and preserved, allowing the scheduling of vectorized loop components to proceed without crashing.

For Context
SLP vectorization
Short-Loop Parallelism vectorization, an optimization technique in GCC that identifies and vectorizes loops consisting of straight-line code (superwords).
tree-optimization
The phase in GCC where optimizations are performed on the Tree Intermediate Representation (IR).
SCC
Strongly Connected Component, a part of a graph where every vertex is reachable from every other vertex. In optimization, it can represent a loop or a set of mutually dependent operations.
access violation
A runtime error that occurs when a program attempts to access a memory location that it is not allowed to access.
Filed Under: tree-optimizationvectorizationbugfix