Landing: 765ef64246da

Project / Subsystem

gcc / vect

Date

2026-09-01

Author

liuhongt

Commit

765ef64246da4b65ca394b29095cbf891006977d

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
vect
patch_id
—
commit_hash
765ef64246da4b65ca394b29095cbf891006977d
source_type
github
headline
Allow signed types in average vectorization fallback
tldr
GCC's vectorization now supports signed types for average calculations, expanding optimization possibilities.
author
liuhongt
outcome
committed
performance_win
true
breaking_change
false
series_id
—
series_parts
[]
tags
  • • vectorization
  • • optimization
  • • signed integers
discussion_id_link
—
bugzilla_pr
—
date
2026-09-01T00:00:00.000Z

The vectorizer’s fallback mechanism for average calculations previously only supported unsigned types. This change removes that restriction, allowing signed integer types to be vectorized. The core logic remains the same, as arithmetic right shifts and subsequent adjustments work identically for both signed and unsigned types. The implementation now uses target_supports_op_p for better portability in checking operation support.