https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122616
Bug ID: 122616
Summary: `x&1 ? (x-1): (x|1)` -> x^1
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
```
int f1(int x)
{
return x&1 ? (x-1): (x|1);
}
```
Should optimize to x^1.
This shows up in Linux kernel in nhmex_rbox_hw_config.
