[Bug rtl-optimization/46235] inefficient bittest code generation

2022-03-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46235 Bug 46235 depends on bug 104982, which changed state. Bug 104982 Summary: [12 Regression] FAIL: gcc.target/i386/bt-5.c by r12-7687 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104982 What|Removed |Added

[Bug rtl-optimization/46235] inefficient bittest code generation

2021-06-20 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46235 Roger Sayle changed: What|Removed |Added CC||roger at nextmovesoftware dot com

[Bug rtl-optimization/46235] inefficient bittest code generation

2021-06-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46235 --- Comment #6 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:3155d51bfd1de8b6c4645dcb2292248a8d7cc3c9 commit r12-1525-g3155d51bfd1de8b6c4645dcb2292248a8d7cc3c9 Author: Roger Sayle Date: Wed Ju

[Bug rtl-optimization/46235] inefficient bittest code generation

2014-06-03 Thread chris.a.ferguson at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46235 --- Comment #5 from chris.a.ferguson at gmail dot com --- This optimization opportunity is still being missed as of GCC 4.9. Test cases: bool IsBitSet1(unsigned char byte, int index) { return (byte & (1<> index) & 1; } >From GCC 4.9: IsBit

[Bug rtl-optimization/46235] inefficient bittest code generation

2011-01-28 Thread tony.poppleton at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46235 --- Comment #4 from Tony Poppleton 2011-01-28 18:08:15 UTC --- As a quick test, I commented out the block with the following comment in fold-const.c: /* If this is an EQ or NE comparison with zero and ARG0 is (1 << foo) & bar, conv

[Bug rtl-optimization/46235] inefficient bittest code generation

2011-01-28 Thread tony.poppleton at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46235 --- Comment #3 from Tony Poppleton 2011-01-28 17:02:50 UTC --- Actually what I said above isn't correct - had it compiled down to "bt $4, %al" then it would make sense to do that special case, but as it used "testb" it is inconclusive.

[Bug rtl-optimization/46235] inefficient bittest code generation

2011-01-28 Thread tony.poppleton at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46235 --- Comment #2 from Tony Poppleton 2011-01-28 16:55:48 UTC --- Based on Richard's comment, I tried a modified version of the code replacing the (1 << x) with just (16). This shows that GCC (4.6 & 4.5.2) does perform an optimization similar to ll

[Bug rtl-optimization/46235] inefficient bittest code generation

2010-10-30 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46235 --- Comment #1 from Richard Guenther 2010-10-30 18:21:48 UTC --- We canonicalize a & (1 << x) to (a >> x) & 1 very early.