This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/16541] code quality issue for bit manipulations with 64bit
- From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2004 17:22:51 -0000
- Subject: [Bug rtl-optimization/16541] code quality issue for bit manipulations with 64bit
- References: <20040714161713.16541.dann@godzilla.ics.uci.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dann at godzilla dot ics dot uci dot edu 2004-08-31 17:22 -------
Using -fno-if-conversion when compiling to the code in comment #2 improves the
generated assembly a bit:
movl 8(%esp), %edx
movl %edx, %eax
xorl %edx, %edx
shrl $16, %eax
movl %edx, %ecx
orl %eax, %ecx
jne .L2
xorl %eax, %eax
ret
.p2align 4,,7
.L2:
movzbl first_one(%eax), %eax
ret
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16541