https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110269
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Target Milestone|--- |13.2
Ever confirmed|0 |1
Keywords| |missed-optimization
Last reconfirmed| |2023-06-15
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC 12.3 ccp2:
```
Folding statement: _20 = _15;
Queued stmt for removal. Folds to: _15
Folding statement: _1 = _20;
Queued stmt for removal. Folds to: _15
Folding statement: if (_1 != 0)
Matching expression match.pd:2119, gimple-match.cc:819
Matching expression match.pd:2122, gimple-match.cc:892
Matching expression match.pd:2129, gimple-match.cc:952
which is likely CONSTANT
Matching expression match.pd:2119, generic-match.cc:693
Matching expression match.pd:2122, generic-match.cc:753
Matching expression match.pd:2129, generic-match.cc:776
Folding predicate _15 != 0 to 1
Folded into: if (1 != 0)
```
GCC 13+ ccp2:
```
Folding statement: _20 = _15;
Queued stmt for removal. Folds to: _15
Folding statement: _1 = _20;
Queued stmt for removal. Folds to: _15
Folding statement: if (_1 != 0)
Matching expression match.pd:2404, gimple-match.cc:852
Matching expression match.pd:2407, gimple-match.cc:925
Matching expression match.pd:2414, gimple-match.cc:985
which is likely CONSTANT
Matching expression match.pd:2404, gimple-match.cc:852
Matching expression match.pd:2407, gimple-match.cc:925
Matching expression match.pd:2414, gimple-match.cc:985
Folded into: if (_15 != 0)
```
oh it was the ccp_fold change that misses it ...
But why I have not looked.