Landing: c8545a314333

Project / Subsystem

gcc / tree-optimization

Date

2026-08-14

Author

Richard Biener

Commit

c8545a3143330983e51d913f0a01187258b14510

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
tree-optimization
patch_id
—
commit_hash
c8545a3143330983e51d913f0a01187258b14510
source_type
github
headline
SLP optimization: Fix basic block constraint for trapping statements
tldr
Improves SIMD Local Search (SLP) optimization by correctly handling trapping statements within basic blocks.
author
Richard Biener
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • vectorization
  • • SLP
  • • tree-optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-08-14T00:00:00.000Z

This commit addresses an issue in the SLP (SIMD Local Search) optimization pass where the compiler failed to ensure that all statements within a node belonged to the same basic block when a trapping statement was present. The fix modifies vect_build_slp_tree_1 to track the common basic block and detect trapping statements. It then verifies that all statements in a potential SLP vectorization candidate reside in the same basic block after all statements have been processed, preventing incorrect vectorization that could lead to runtime errors.