Landing: 8af2e8e49d6e
Project / Subsystem
gcc / vect
Date
2026-05-27
Author
Tamar Christina
Commit
8af2e8e49d6e5d33c01c2beaead4933bc286974c
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- vect
- patch_id
- —
- commit_hash
- 8af2e8e49d6e5d33c01c2beaead4933bc286974c
- source_type
- github
- headline
- Vectorization: Skip scalar epilogue when it's unnecessary.
- tldr
- The vectorizer now avoids generating a scalar epilogue for loops when it's not needed, improving performance.
- author
- Tamar Christina
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • vectorization
- • optimization
- • loop
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-27T00:00:00.000Z
This patch optimizes vectorized loops by preventing the generation of unnecessary scalar epilogues. Specifically, when a loop has no live-out values, only one exit point, and no side effects, the scalar epilogue is skipped. This avoids redundant scalar code execution, leading to improved performance. For example, loops that perform comparisons and return based on the results can now avoid the scalar epilogue.