This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/12508] weak optimization for some constants < 2^16


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-24 22:03 -------
With the mainline with -march=i686, I get (which is not optimial):
        movl    4(%esp), %eax 
        andl    $-16, %eax
        testw   %ax, %ax
        setne   %al
        movzbl  %al, %eax
        ret

But with -march=i386, I get:
        xorl    %eax, %eax
        testl   $65520, 4(%esp)
        setne   %al
        ret

So it looks like the cost function gets causes this, somehow, again most likely the combine should 
be  doing more.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12508


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]