Landing: e35b8dad030b

Project / Subsystem

gcc / cselim

Date

2026-08-25

Author

Andrea Pinski

Commit

e35b8dad030bc4164fdaa81dc0a5bfca8c1bbfc3

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
cselim
patch_id
—
commit_hash
e35b8dad030bc4164fdaa81dc0a5bfca8c1bbfc3
source_type
github
headline
cselim: Improve conditional store replacement with skipping support
tldr
Enhances cselim's conditional store replacement to handle cases with stores on either side of a branch.
author
Andrea Pinski
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • cselim
  • • tree-ssa
  • • compiler
discussion_id_link
—
bugzilla_pr
—
date
2026-08-25T00:00:00.000Z

This commit improves the cond_if_else_store_replacement_limited optimization in GCC’s cselim pass. It now supports skipping the replacement when a store operation exists on either side of the conditional branch, provided these stores do not interfere with other operations. This change was motivated by code generation for std::optional::reset and adds new test cases.