[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2023-06-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 --- Comment #11 from Andrew Pinski --- Note the committed patch only fixes f in comment #1. g (Pointer plus) will need another change.

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2023-06-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 Bug 97711 depends on bug 110155, which changed state. Bug 110155 Summary: Missing if conversion https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110155 What|Removed |Added

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2023-06-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 --- Comment #10 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:55fcaa9a8bd9c8ce97ca929fc902c88cf92786a0 commit r14-1656-g55fcaa9a8bd9c8ce97ca929fc902c88cf92786a0 Author: Andrew Pinski Date:

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2023-06-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 Andrew Pinski changed: What|Removed |Added Keywords||patch URL|

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2023-06-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 --- Comment #8 from Andrew Pinski --- Well the patch for PR 110155 will fix f but not g. I will add the POINTER_PLUS pattern this weekend.

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2023-06-07 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 Andrew Pinski changed: What|Removed |Added Depends on|103216 |110155 --- Comment #7 from Andrew

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2021-12-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2021-12-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 Andrew Pinski changed: What|Removed |Added CC||jengelh at inai dot de --- Comment #6

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > (In reply to Andrew Pinski from comment #3) > > Mine, the patch which fixes PR 103216 fixes this too. > > Note it does not fix it fully on the gimple level, we

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 --- Comment #4 from Andrew Pinski --- (In reply to Andrew Pinski from comment #3) > Mine, the patch which fixes PR 103216 fixes this too. Note it does not fix it fullly on the gimple level, we are left with: _1 = x_3(D) & 1; _7 = _1 != 0;

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2021-11-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2021-07-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 --- Comment #2 from Andrew Pinski --- So GCC already converts the following two functions at the gimple level: int f1 (int x) { return x - (x & 1); } char *g1 (char *x) { return x - ((__UINTPTR_TYPE__) x & 1); } - CUT Even on the

[Bug tree-optimization/97711] Failure to optimise "x & 1 ? x - 1 : x" to "x & -2"

2020-11-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97711 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED