Landing: 12e4a2acda8d

Project / Subsystem

gcc / x86_cse

Date

2026-04-30

Author

H.J. Lu

Commit

12e4a2acda8da558010c9962f96b3167aee21072

Source

github

Perf win

Yes

Breaking

No

All attributes

project
gcc
subsystem
x86_cse
patch_id
commit_hash
12e4a2acda8da558010c9962f96b3167aee21072
source_type
github
headline
x86_cse: Add X86_CSE_CONST_VECTOR for native CONST_VECTOR.
tldr
GCC's x86 common subexpression elimination (CSE) now handles CONST_VECTOR and constant integer loads more efficiently.
author
H.J. Lu
outcome
committed
performance_win
true
breaking_change
false
series_id
series_parts
[]
tags
  • x86
  • optimization
  • cse
  • vectorization
discussion_id_link
bugzilla_pr
date
2026-04-30T00:00:00.000Z

This commit enhances GCC’s x86 common subexpression elimination (CSE) pass to better handle CONST_VECTORs. It introduces X86_CSE_CONST_VECTOR for native CONST_VECTORs, avoids dataflow (DF) chains by using CONST_VECTOR in REG_EQUAL notes, and preserves constant integer loads across function calls when beneficial. Additionally, it converts CONST_VECTOR loads (no larger than an integer register) to constant integer loads.