Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-12-19 Thread Steven Bosscher
On Mon, Nov 30, 2009 at 12:10 PM, Steven Bosscher stevenb@gmail.com wrote: I'll see if I can make the intraprocedural version work again before Christmass. Well, it works, but then again it really does not. For example, the original implementation doesn't even look at the alignment of var.

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-12-19 Thread Daniel Berlin
On Sat, Dec 19, 2009 at 2:48 PM, Steven Bosscher stevenb@gmail.com wrote: On Mon, Nov 30, 2009 at 12:10 PM, Steven Bosscher stevenb@gmail.com wrote: I'll see if I can make the intraprocedural version work again before Christmass. Well, it works, but then again it really does not.

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-12-19 Thread Steven Bosscher
On Sat, Dec 19, 2009 at 11:43 PM, Daniel Berlin dber...@dberlin.org wrote: On Sat, Dec 19, 2009 at 2:48 PM, Steven Bosscher stevenb@gmail.com wrote: On Mon, Nov 30, 2009 at 12:10 PM, Steven Bosscher stevenb@gmail.com wrote: I'll see if I can make the intraprocedural version work

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-30 Thread Dorit Nuzman
Steven Bosscher stevenb@gmail.com Sent by: gcc-ow...@gcc.gnu.org 30/11/2009 09:01 To Daniel Berlin dber...@dberlin.org cc Richard Guenther richard.guent...@gmail.com, Toon Moene t...@moene.org, gcc mailing list gcc@gcc.gnu.org Subject Re: Caused by unknown alignment, was: Re:

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-30 Thread Toon Moene
Dorit Nuzman wrote: Steven Bosscher stevenb@gmail.com On Mon, Nov 30, 2009 at 12:40 AM, Daniel Berlin dber...@dberlin.org wrote: This pass may even be on the lno branch or something. It used to be, at least, see http://gcc.gnu.org/ml/gcc-cvs/2004-08/ msg00470.html Happy hacking,

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-30 Thread Steven Bosscher
On Mon, Nov 30, 2009 at 11:02 AM, Toon Moene t...@moene.org wrote: Maybe this is more/also relevant: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01405.html dorit Jeepers creepers - why has this never been included in the trunk (it might be quite a bit of work to get it going again, and I

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-30 Thread Toon Moene
Steven Bosscher wrote: I'll see if I can make the intraprocedural version work again before Christmass. It shouldn't be that much work, actually. But it's be nice to have some test cases to demonstrate that the intraprocedural version would do any good. That would be very nice ! To help to

Induction variable elimination, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-29 Thread Toon Moene
Toon Moene wrote: I wrote: OK, so it is an alignment issue (with -mtune=barcelona): .L6: movups 0(%rbp,%rax), %xmm0 movups (%rbx,%rax), %xmm1 incl%ecx addps %xmm1, %xmm0 movaps %xmm0, (%r8,%rax) addq$16, %rax cmpl

Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-29 Thread Toon Moene
Toon Moene wrote: Tim Prince wrote: If you want those, you must request them with -mtune=barcelona. OK, so it is an alignment issue (with -mtune=barcelona): .L6: movups 0(%rbp,%rax), %xmm0 movups (%rbx,%rax), %xmm1 incl%ecx addps %xmm1, %xmm0

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-29 Thread Toon Moene
Toon Moene wrote: This is where IPA could help. I created the following main program: real a(10), b(10), c(10) a = 0. b = 1. print '(3(1x,z16))', loc(a), loc(b), loc(c) call sum(a, b, c, 10) print *, c(5) end So the alignment of a, b and c is known

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-29 Thread Steven Bosscher
On Sun, Nov 29, 2009 at 7:12 PM, Toon Moene t...@moene.org wrote: Toon Moene wrote: This is where IPA could help.  I created the following main program:      real a(10), b(10), c(10)      a = 0.      b = 1.      print '(3(1x,z16))', loc(a), loc(b), loc(c)      call sum(a, b, c, 10)      

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-29 Thread Daniel Berlin
On Sun, Nov 29, 2009 at 3:33 PM, Richard Guenther richard.guent...@gmail.com wrote: On Sun, Nov 29, 2009 at 9:18 PM, Daniel Berlin dber...@dberlin.org wrote: Such a thing already existed a few years ago (IIRC Haifa had something that Dan picked up and passed on to me). But it never brought any

Re: Caused by unknown alignment, was: Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-29 Thread Steven Bosscher
On Mon, Nov 30, 2009 at 12:40 AM, Daniel Berlin dber...@dberlin.org wrote: This pass may even be on the lno branch or something. It used to be, at least, see http://gcc.gnu.org/ml/gcc-cvs/2004-08/msg00470.html Happy hacking, Toon :-) Ciao! Steven

On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Toon Moene
L.S., Due to the discussion on register allocation, I went back to a hobby of mine: Studying the assembly output of the compiler. For this Fortran subroutine (note: unless otherwise told to the Fortran front end, reals are 32 bit floating point numbers): subroutine sum(a, b, c, n)

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread H.J. Lu
On Sat, Nov 28, 2009 at 3:21 AM, Toon Moene t...@moene.org wrote: L.S., Due to the discussion on register allocation, I went back to a hobby of mine: Studying the assembly output of the compiler. For this Fortran subroutine (note: unless otherwise told to the Fortran front end, reals are 32

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Toon Moene
H.J. Lu wrote: On Sat, Nov 28, 2009 at 3:21 AM, Toon Moene t...@moene.org wrote: L.S., Due to the discussion on register allocation, I went back to a hobby of mine: Studying the assembly output of the compiler. For this Fortran subroutine (note: unless otherwise told to the Fortran front end,

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Tim Prince
Toon Moene wrote: H.J. Lu wrote: On Sat, Nov 28, 2009 at 3:21 AM, Toon Moene t...@moene.org wrote: L.S., Due to the discussion on register allocation, I went back to a hobby of mine: Studying the assembly output of the compiler. For this Fortran subroutine (note: unless otherwise told to the

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Richard Guenther
On Sat, Nov 28, 2009 at 4:26 PM, Tim Prince n...@aol.com wrote: Toon Moene wrote: H.J. Lu wrote: On Sat, Nov 28, 2009 at 3:21 AM, Toon Moene t...@moene.org wrote: L.S., Due to the discussion on register allocation, I went back to a hobby of mine: Studying the assembly output of the

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Tim Prince
Richard Guenther wrote: On Sat, Nov 28, 2009 at 4:26 PM, Tim Prince n...@aol.com wrote: Toon Moene wrote: H.J. Lu wrote: On Sat, Nov 28, 2009 at 3:21 AM, Toon Moene t...@moene.org wrote: L.S., Due to the discussion on register allocation, I went back to a hobby of mine: Studying the

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Richard Guenther
On Sat, Nov 28, 2009 at 5:31 PM, Tim Prince n...@aol.com wrote: Richard Guenther wrote: On Sat, Nov 28, 2009 at 4:26 PM, Tim Prince n...@aol.com wrote: Toon Moene wrote: H.J. Lu wrote: On Sat, Nov 28, 2009 at 3:21 AM, Toon Moene t...@moene.org wrote: L.S., Due to the discussion on

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Toon Moene
Tim Prince wrote: If you want those, you must request them with -mtune=barcelona. OK, so it is an alignment issue (with -mtune=barcelona): .L6: movups 0(%rbp,%rax), %xmm0 movups (%rbx,%rax), %xmm1 incl%ecx addps %xmm1, %xmm0 movaps %xmm0,

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Toon Moene
Toon Moene wrote: Tim Prince wrote: If you want those, you must request them with -mtune=barcelona. OK, so it is an alignment issue (with -mtune=barcelona): .L6: movups 0(%rbp,%rax), %xmm0 movups (%rbx,%rax), %xmm1 incl%ecx addps %xmm1, %xmm0

Re: On the x86_64, does one have to zero a vector register before filling it completely ?

2009-11-28 Thread Tim Prince
Toon Moene wrote: Toon Moene wrote: Tim Prince wrote: If you want those, you must request them with -mtune=barcelona. OK, so it is an alignment issue (with -mtune=barcelona): .L6: movups 0(%rbp,%rax), %xmm0 movups (%rbx,%rax), %xmm1 incl%ecx addps