Landing: f87736236260
Project / Subsystem
gcc / gcc/vect
Date
2026-08-04
Author
Tamar Christina
Commit
f87736236260bee8512fbf2441494c71952da6ed
Source
github
Perf win
Yes
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/vect
- patch_id
- —
- commit_hash
- f87736236260bee8512fbf2441494c71952da6ed
- source_type
- github
- headline
- Correctly handle loop exit conditions for vectorized do-while loops
- tldr
- Fixes vectorized do-while loops that exit one iteration early due to incorrect loop edge handling.
- author
- Tamar Christina
- outcome
- committed
- performance_win
- true
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gcc/vect
- • vectorization
- • loop optimization
- • aarch64
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-08-04T00:00:00.000Z
This commit corrects an issue where vectorized loops with early exit conditions, specifically those resembling do-while loops (marked with LOOP_VINFO_EARLY_BREAKS_VECT_PEELED), were exiting one iteration prematurely. This occurred because the loop’s iteration variable check was incorrectly processed relative to the loop latch. The fix ensures the loop condition is checked correctly, preventing unnecessary early exits and ensuring all intended iterations are processed before termination or branching to scalar code. This resolves an issue seen in specific AArch64 code generation scenarios.