Landing: 3e6ac9b8d877

Project / Subsystem

gcc / tree-optimization

Date

2026-07-29

Author

Richard Biener

Commit

3e6ac9b8d87704323df1f12214c29725c4e5eb9d

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
tree-optimization
patch_id
—
commit_hash
3e6ac9b8d87704323df1f12214c29725c4e5eb9d
source_type
github
headline
Robustify reduction analysis by handling unsupported operations early
tldr
Prevents compiler crashes by performing early checks for vectorizable reduction operations.
author
Richard Biener
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • vectorization
  • • compiler bug
  • • optimization
discussion_id_link
—
bugzilla_pr
—
date
2026-07-29T00:00:00.000Z

This commit improves the robustness of the vectorization reduction analysis by adding an early exit for unsupported reduction operations. The analysis previously assumed a direct correspondence between GIMPLE statement operands and SLP (Shortest-Length Processing) vectorization operands, which can break for operations like count-leading-zeros with multiple operands. By rejecting such cases upfront, the compiler avoids internal errors (ICEs) and provides better diagnostics.