[Bug tree-optimization/113131] `((A&B)^C)|B` should be simplified to `C | B`
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jul 19 01:31:51 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113131
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
```
int f(int A, int B, int C)
{
return ((A&B)^C)|B; // C|B
}
int f1(int A, int B, int C)
{
return ((A|B)^C)|B; // (C^A)|B
}
int f2(int A, int B, int C)
{
return ((A^B)^C)|B; // (C^A)|B
}
int f3(int A, int B, int C)
{
return ((A&B)^C)&B; // (C^A)&B
}
```
More information about the Gcc-bugs
mailing list