Landing: d0850a968d4e
Project / Subsystem
gcc / middle-end
Date
2026-08-12
Author
Kyrylo Tkachov
Commit
d0850a968d4e85b2d257b0e78fa61b1021137ede
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- middle-end
- patch_id
- —
- commit_hash
- d0850a968d4e85b2d257b0e78fa61b1021137ede
- source_type
- github
- headline
- middle-end: Try intermediate types for widening sums
- tldr
- Vectorizer now considers intermediate types for widening sum patterns, improving performance for reductions on AArch64 SVE.
- author
- Kyrylo Tkachov
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • vectorization
- • optimization
- • aarch64
- • SVE
- • reduction
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-12T00:00:00.000Z
The vectorizer’s widening sum pattern recognition has been improved to consider intermediate integer types, not just the scalar input type. This allows it to utilize target-specific instructions like AArch64 SVE’s VNx2DI <- VNx8HI widening sum, which were previously missed if the input was, for example, VNx8QI. The change enables more efficient code generation for reductions, converting operations that previously required multiple loop iterations into single dot product instructions.