[Bug middle-end/94787] Failure to detect single bit popcount pattern

2024-08-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94787 --- Comment #8 from Andrew Pinski --- Created attachment 59026 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59026&action=edit The (pop cmp 1) |& (a cmp 0) testcase This is the full one. Note `a ? 1 : b` is also reduced down to `a | b` (

[Bug middle-end/94787] Failure to detect single bit popcount pattern

2024-03-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94787 --- Comment #7 from Andrew Pinski --- And add: ``` int h(int a) { if (a == 0) return 0; return __builtin_popcount(a) == 1; } int h1(int a) { if (a == 0) return 1; return __builtin_popcount(a) == 1; } ``` h should

[Bug middle-end/94787] Failure to detect single bit popcount pattern

2024-03-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94787 --- Comment #6 from Andrew Pinski --- (In reply to Andrew Pinski from comment #5) > Note the expansion part is handled by r14-5612, r14-5613, and r14-6940 . > > So now we just need the match part which I will handle for 15. Actually the expansi

[Bug middle-end/94787] Failure to detect single bit popcount pattern

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

[Bug middle-end/94787] Failure to detect single bit popcount pattern

2023-11-15 Thread tavianator at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94787 Tavian Barnes changed: What|Removed |Added CC||tavianator at gmail dot com --- Comment

[Bug middle-end/94787] Failure to detect single bit popcount pattern

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