[Bug tree-optimization/99918] [10/11/12/13 Regression] suboptimal code for bool bitfield tests
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99918 Franek Korta changed: What|Removed |Added CC||fkorta at gmail dot com --- Comment #9 from Franek Korta --- Another simple example: #include struct SomeClass { bool cfg1 : 1; bool cfg2 : 1; bool cfg3 : 1; bool check() const noexcept { return cfg1 || cfg2 || cfg3; } }; bool check(const SomeClass& rt) { return rt.check(); } Emits: check(SomeClass const&): movzx edx, BYTE PTR [rdi] mov eax, edx and eax, 1 jne .L1 mov eax, edx shr al and eax, 1 je .L4 .L1: ret .L4: mov eax, edx shr al, 2 and eax, 1 ret While it should: check(SomeClass const&): testbyte ptr [rdi], 7 setne al ret
[Bug tree-optimization/99918] [10/11/12/13 Regression] suboptimal code for bool bitfield tests
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99918 Jakub Jelinek changed: What|Removed |Added Target Milestone|10.4|10.5 --- Comment #8 from Jakub Jelinek --- GCC 10.4 is being released, retargeting bugs to GCC 10.5.
[Bug tree-optimization/99918] [10/11/12/13 Regression] suboptimal code for bool bitfield tests
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99918 Richard Biener changed: What|Removed |Added Target Milestone|9.5 |10.4 --- Comment #7 from Richard Biener --- GCC 9 branch is being closed