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

Fix ICE with partly populated vectors in SLP scheduling.

Corrects an ICE by ensuring vector scheduling fails gracefully when constraints are not met.

This commit fixes an ICE (Internal Compiler Error) that occurred during SLP (Superword Level Parallelism) scheduling. The issue arose when constraints for potentially trapping statements could not be met. The fix modifies vect_schedule_slp_node to treat such unmet constraints as a scheduling failure instead of an assertion failure, thereby preventing the ICE and ensuring test coverage.

In Details

This patch addresses an ICE in vect_schedule_slp_node related to SLP scheduling of vector code. When the scheduler encounters a situation where it cannot place statements due to constraints (potentially trapping), it previously triggered an assertion. This commit changes the behavior to emit a scheduling failure, which is a more robust way to handle such cases and is now covered by a new testcase.

For Context
ICE
Internal Compiler Error. An unrecoverable error that occurs within the compiler itself, usually due to a bug in the compiler's logic.
SLP
Superword Level Parallelism. A type of instruction-level parallelism where multiple independent data elements within a vector are processed in parallel by a single instruction.
scheduling
The process of ordering instructions to maximize performance, often by minimizing dependencies and utilizing available execution units on the CPU.
trapping statements
Statements that may cause an exception or trap if certain conditions are met (e.g., division by zero, accessing invalid memory). Scheduling these requires careful consideration of their potential side effects.
Filed Under: tree-optimizationvectorizationcompiler