This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fixes tree-loop-distribute-patterns issues
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Roland McGrath <roland at hack dot frob dot com>, Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>, Carlos O'Donell <carlos at redhat dot com>, "GNU C. Library" <libc-alpha at sourceware dot org>, Siddhesh Poyarekar <siddhesh at redhat dot com>
- Date: Fri, 21 Jun 2013 04:00:11 +0200
- Subject: Re: [PATCH] Fixes tree-loop-distribute-patterns issues
- References: <20130618205608 dot 9CCE22C0AC at topped-with-meat dot com> <51C1BFE9 dot 4070805 at linux dot vnet dot ibm dot com> <51C1CEFC dot 9000100 at redhat dot com> <51C1FE4C dot 3020400 at linux dot vnet dot ibm dot com> <20130619221130 dot 7B91A2C10E at topped-with-meat dot com> <51C31177 dot 90303 at linux dot vnet dot ibm dot com> <20130620175832 dot 0E6FA2C133 at topped-with-meat dot com> <20130620213141 dot GA4833 at domone dot kolej dot mff dot cuni dot cz> <Pine dot LNX dot 4 dot 64 dot 1306202232290 dot 14606 at digraph dot polyomino dot org dot uk> <20130621004338 dot GA6306 at domone dot kolej dot mff dot cuni dot cz>
On Fri, Jun 21, 2013 at 02:43:38AM +0200, OndÅej BÃlka wrote:
> On Thu, Jun 20, 2013 at 10:33:21PM +0000, Joseph S. Myers wrote:
> > On Thu, 20 Jun 2013, Ondrej Bilka wrote:
> >
> > > Actually you should split simple_* to separate files and compile them with
> > > O0.
> > >
> > > Doing otherwise makes their performance dependent on gcc version and
> > > this makes results even more unreliable.
> >
> > I expect -O0 performance to depend a lot more on GCC version than -O2.
> >
> You expect but could you prove it? Please provide two versions of gcc
> where you get different simple-* function when compiling with -O0 -S
>
> Versions I checked are
> Debian 4.5.3-12
> Debian 4.7.1-2
> gcc version 4.9.0 20130516 (experimental) (GCC)
>
> Assemblies produced are same for following fragment:
>
> void
> *memset (char *s, int c, int n)
> {
> int i;
> for(i=0 ;i<n; i++) s[i] = c;
> return s;
> }
On second thought I realized it was bit wierd that I got empty diff for
first two. I rechecked if they differ and they do. Question is if
difference are more than O1
3c3
< .globl memset
---
> .globl memset
10d9
< movq %rsp, %rbp
11a11
> movq %rsp, %rbp
20,23c20,24
< cltq
< addq -24(%rbp), %rax
< movl -28(%rbp), %edx
< movb %dl, (%rax)
---
> movslq %eax, %rdx
> movq -24(%rbp), %rax
> addq %rax, %rdx
> movl -28(%rbp), %eax
> movb %al, (%rdx)
30c31
< leave
---
> popq %rbp
36c37
< .ident "GCC: (Debian 4.5.3-12) 4.5.3"
---
> .ident "GCC: (Debian 4.7.1-2) 4.7.1"