[Bug tree-optimization/120032] Fails to pattern match clz from DeBruijn

2025-06-06 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120032 Richard Biener changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/120032] Fails to pattern match clz from DeBruijn

2025-06-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120032 --- Comment #5 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:c6eb92973ea308e248ce23927a9ac58ef81ee7a2 commit r16-1201-gc6eb92973ea308e248ce23927a9ac58ef81ee7a2 Author: Richard Biener Date:

[Bug tree-optimization/120032] Fails to pattern match clz from DeBruijn

2025-06-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120032 --- Comment #6 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:4a80eaefd93c2f1f7c9b71dbc1b97783214b7b2f commit r16-1202-g4a80eaefd93c2f1f7c9b71dbc1b97783214b7b2f Author: Richard Biener Date:

[Bug tree-optimization/120032] Fails to pattern match clz from DeBruijn

2025-05-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120032 --- Comment #4 from Richard Biener --- I'll also note that as written the table-based lookup has a value of 31 for zero input but lzcnt will get you 32. So unless you make the input of zero undefined by guarding the code (thus provide a value-r

[Bug tree-optimization/120032] Fails to pattern match clz from DeBruijn

2025-05-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120032 --- Comment #3 from Richard Biener --- And to avoid repeated scanning of DECL_INITIAL when we add more of these patterns we could record classification of the table in a custom internal decl attribute we add, __attribute__(("table kind"(int))) w

[Bug tree-optimization/120032] Fails to pattern match clz from DeBruijn

2025-05-07 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120032 Richard Biener changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org

[Bug tree-optimization/120032] Fails to pattern match clz from DeBruijn

2025-05-06 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120032 --- Comment #2 from Richard Biener --- I'll note that we might want to match 31 - clz (val) aka the table lookup, not 31 - table_lookup, as that will better in case the result is offset by a constant or a variable where the latter would even

[Bug tree-optimization/120032] Fails to pattern match clz from DeBruijn

2025-05-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120032 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Severity|normal