This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Speed Impact experiment on GCJ
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: tromey at redhat dot com
- Cc: aph at redhat dot com (Andrew Haley), thomas at tada dot se (Thomas Hallgren), Rui dot Wang at newcastle dot ac dot uk (Rui Wang), java at gcc dot gnu dot org
- Date: Wed, 15 Feb 2006 14:05:35 -0500 (EST)
- Subject: Re: Speed Impact experiment on GCJ
>
> >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
>
> Andrew> For what it's worth, I was quite suprised that gcj didn't spot the
> Andrew> same opportunity. Maybe this is part of the value range propagation
> Andrew> optimizations that aren't yet in core gcc.
>
> Yeah, I'm surprised too.
> Maybe file it in bugzilla for later testing?
Huh? It does produce good code on the mainline
without a loop:
_ZN4Impl4pingEJiii:
.LFB3:
.L4:
imull %esi, %edx
movl $0, %eax
testl %edx, %edx
cmovg %edx, %eax
ret
-----
_ZN4Impl4pingEJiii:
.LFB3:
.L4:
pushl %ebp
.LCFI3:
xorl %edx, %edx
movl %esp, %ebp
.LCFI4:
movl 16(%ebp), %eax
imull 12(%ebp), %eax
testl %eax, %eax
setle %dl
subl $1, %edx
andl %edx, %eax
popl %ebp
ret
But not on the 4.1 branch (at least in 20060208):
_ZN4Impl4pingEii:
.LFB3:
imull %esi, %edx
xorl %eax, %eax
testl %edx, %edx
jle .L4
.p2align 4,,7
.L5:
.L6:
incl %eax
cmpl %eax, %edx
jne .L5
.L4:
ret
-- Pinski