Landing: a190f057070e
Project / Subsystem
gcc / gcc/x86
Date
2026-05-18
Author
H.J. Lu
Commit
a190f057070e0487b65f1ff630c8aba26bbdf114
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/x86
- patch_id
- —
- commit_hash
- a190f057070e0487b65f1ff630c8aba26bbdf114
- source_type
- github
- headline
- x86: Avoid inlining cold memmove calls in size-optimised code.
- tldr
- GCC now avoids inlining calls to memmove when optimizing for size, for rarely-executed code paths on x86.
- author
- H.J. Lu
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • gcc
- • x86
- • optimization
- • code size
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-18T00:00:00.000Z
When compiling for size on x86, GCC was inlining calls to memmove even in rarely-executed code paths. This commit replaces optimize_function_for_size_p with optimize_insn_for_size_p in ix86_expand_movmem to prevent inlining of these cold memmove calls, reducing code size.