[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-08-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.0

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-01-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 Jakub Jelinek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-01-05 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 --- Comment #11 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5de7bf5bc98ec9edc6838a443521204d0eca7605 commit r11-6482-g5de7bf5bc98ec9edc6838a443521204d0eca7605 Author: Jakub Jelinek Date: T

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-01-05 Thread denis.campredon at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 denis.campredon at gmail dot com changed: What|Removed |Added CC||denis.campredon at gmai

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-01-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-01-05 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 Jakub Jelinek changed: What|Removed |Added CC||uros at gcc dot gnu.org --- Comment #8 f

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-01-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 --- Comment #7 from Richard Biener --- Which means it won't help for foo(): : if (b_2(D) >= a_3(D)) goto ; [INV] else goto ; [INV] : iftmp.0_5 = b_2(D) - a_3(D); : # iftmp.0_1 = PHI return iftmp.0_1;

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-01-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 --- Comment #6 from Richard Biener --- We can't really hash them the same but what is possible is at elimination time see whether x - y is available when x >= y is encountered and replace the latter with avail >= 0. If x - y is not available at

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2021-01-02 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 --- Comment #5 from Jakub Jelinek --- Even when the optimization is restricted to GIMPLE only, the single_use in there doesn't work really well before fre1 optimizes it, because the above mentioned testcase doesn't reuse the same expression, but

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2020-12-31 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 --- Comment #4 from Jakub Jelinek --- Not fixed completely yet, (a - b) < 0 is not optimized into a < b yet. The following patch does that, but it regresses --- gcc/match.pd.jj 2020-12-30 17:04:27.340815135 +0100 +++ gcc/match.pd2020

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2020-12-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 --- Comment #3 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:d2eb616a0f7bea78164912aa438c29fe1ef5774a commit r11-6378-gd2eb616a0f7bea78164912aa438c29fe1ef5774a Author: Jakub Jelinek Date: Th

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2020-04-27 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Keywords|

[Bug tree-optimization/94802] Failure to recognize identities with __builtin_clz

2020-04-27 Thread gabravier at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94802 --- Comment #1 from Gabriel Ravier --- Also, there are also patterns like `__builtin_clz(a - b) == 31`, which can be optimized to `(a - b) == 1`