gcc 4.1.1 poor optimization

Ian Lance Taylor iant@google.com
Wed Jan 10 23:31:00 GMT 2007


Greg Smith <gsmith@nc.rr.com> writes:

> [ 7]    movl    %edx, 24(%esp)
> [ 8]    movl    %eax, 28(%esp)
> #APP
>         bswap %eax
> #NO_APP

This makes it look like the bswap asm clobbered %edx.

Can you post a small complete standalone preprocessed test case?  It's
quite difficult to analyze an incomplete one.  Thanks.

> Lines 41..45 all deal with trying to figure out if the low-order 2 bits
> of effective_addr2 are zero.  All I can say is, WTF?  I can get around
> this one by casting effective_addr2 to U32 and then testl/jne is
> emitted, but I shouldn't have to do this??

This is most likely fixed by the lower-subreg patch I have been
working on.  Latest version here:

http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01858.html

Ian



More information about the Gcc-help mailing list