This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [EGCS] Does egcs do performance regression tests?
- To: Marc Lehmann <pcg at goof dot com>
- Subject: Re: [EGCS] Does egcs do performance regression tests?
- From: Iain McClatchie <iainmcc at ix dot netcom dot com>
- Date: Sat, 27 Dec 1997 11:15:18 -0500
- CC: egcs at cygnus dot com
- References: <34A017A1.15355643@ix.netcom.com> <19971224014846.35778@cerebro.laendle> <34A52807.1CFE92E0@ix.netcom.com>
Iain> The 23 line program at the end of this email compiles to different
Iain> assembly through gcc and g++, and demonstrates this problem.
Iain> I tested this code against gcc 2.7.2.
Excuse me for leaving out important information: the program was
compiled by the following two command lines:
gcc -m486 -O3 -S -c tmp.cc
gives this loop:
.L9:
testl %eax,%eax
je .L10
movl %edx,4(%eax)
movl (%eax),%eax
jmp .L9
gcc -m486 -O3 -S -c tmp2.c
gives this loop:
.L13:
movl %edx,4(%eax)
movl (%eax),%eax
testl %eax,%eax
jne .L13
The source code once again:
extern inline void *
stalloc( void *stack )
{
void *ret= stack;
return ret;
}
typedef struct net_list_t {
struct net_list_t *next;
void *net;
} net_list_t;
void
initialize_connectivity( void *temppool, net_list_t *list )
{
net_list_t *netp;
for( netp = list; netp != 0; netp = netp->next ) {
netp->net = stalloc( temppool );
}
}