Landing: 10f6223d8338

Project / Subsystem

gcc / middle-end

Date

2026-07-13

Author

Dylan Rees

Commit

10f6223d833874199e17226fbb0c562b69a1e72f

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
middle-end
patch_id
commit_hash
10f6223d833874199e17226fbb0c562b69a1e72f
source_type
github
headline
CSE eliminates redundant scalar duplication at different vector widths.
tldr
CSE pass now matches and optimizes redundant vector duplications of scalars across different vector widths.
author
Dylan Rees
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • CSE
  • vectorization
  • middle-end
discussion_id_link
bugzilla_pr
date
2026-07-13T00:00:00.000Z

GCC’s Common Subexpression Elimination (CSE) pass now eliminates redundant scalar duplication instructions that arise from low-to-highpart builtins. Previously, identical scalars duplicated into vectors of different widths were placed in separate registers, leading to inefficiency. This fix enables CSE to match these duplicates, emit a single wider vector, and use SUBREGs for narrower uses, optimizing instruction count and potentially enabling single load instructions.