https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125909
Bug ID: 125909
Summary: cselim should be removed
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: internal-improvement
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: pinskia at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
cselim-limited in phiopt handles most of what cs-elim would handle.
Currently the 2 cases which are not handled are:
```
*a = N; // store only
if (b)
{
.... // no other stores
*a = B;
}
```
This is needed for PR 27313 and PR 124405.
The other is:
```
t = local_nonescaping_var[k]; // a load
if (b < t) {
.... // no other stores
local_nonescaping_var[k] = b;
}
```
This is PR 89430.
Once those 2 cases are handled (and they should be handled together), I will do
some data collection and see if cselim can be removed; I suspect it can.