Landing: cd65161b78ec

Project / Subsystem

gcc / phiopt/cselim

Date

2026-08-02

Author

Andrea Pinski

Commit

cd65161b78ececc629183d210b56142c6653c092

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
phiopt/cselim
patch_id
—
commit_hash
cd65161b78ececc629183d210b56142c6653c092
source_type
github
headline
phiopt/cselim: Allow load between conditional store replacement.
tldr
Enables conditional store replacement even with a load between the store and the condition.
author
Andrea Pinski
outcome
committed
performance_win
false
breaking_change
false
series_id
—
series_parts
[]
tags
  • • optimization
  • • phiopt
  • • cselim
  • • conditional store
discussion_id_link
—
bugzilla_pr
—
date
2026-08-02T00:00:00.000Z

This commit enhances the cond_store_replacement_limited pass in GCC’s phiopt/cselim optimization. It now allows a load instruction to exist between a conditional store and the condition that guards it. Previously, such loads were rejected, preventing the optimization. The change enables more aggressive conditional store elimination, potentially reducing code size by replacing conditional stores with unconditional ones, with Dead Store Elimination (DSE) handling further cleanup.