Re: [patch, libfortran] Add AVX-specific matmul

2016-11-27 Thread Jerry DeLisle
On 11/27/2016 08:50 AM, Thomas Koenig wrote: Hello world, here is another, much revised, update of the AVX-specific matmul patch. The processor-specific switching is now done directly, using the --- snip --- This comment not right: +/* Put exhaustive list of possible architectures here here

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-27 Thread Thomas Koenig
I wrote: As an added bonus, I added some m4 hacks to disable both AVX and AVX2 code generation for REAL. This should have read "I hadded some m4 hacks to disable the AVX2 code generation for REAL." Regards Thomas

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-27 Thread Thomas Koenig
Hello world, here is another, much revised, update of the AVX-specific matmul patch. The processor-specific switching is now done directly, using the machinery from gcclib. For this, I have moved information from the i386-specific cpuinfo.c file to a new header file cpuinfo.h, which is then acce

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-17 Thread Jakub Jelinek
On Thu, Nov 17, 2016 at 08:41:48AM +0100, Thomas Koenig wrote: > Am 17.11.2016 um 00:20 schrieb Jakub Jelinek: > >On Thu, Nov 17, 2016 at 12:03:18AM +0100, Thomas Koenig wrote: > >>>Don't you need to test in configure if the assembler supports AVX? > >>>Otherwise if somebody is bootstrapping gcc wi

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-17 Thread Thomas Koenig
Well, here is a newer version of the patch. I wrote a few configure tests to check for AVX. This version hast the advantage that, if anybody uses 32-bit programs with AVX, they would also benefit. Jakub, would you be OK with that patch? I do not yet want to commit this because it needs more tes

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-16 Thread Janne Blomqvist
On Thu, Nov 17, 2016 at 9:41 AM, Thomas Koenig wrote: > Am 17.11.2016 um 00:20 schrieb Jakub Jelinek: >> >> On Thu, Nov 17, 2016 at 12:03:18AM +0100, Thomas Koenig wrote: Don't you need to test in configure if the assembler supports AVX? Otherwise if somebody is bootstrapping gcc wi

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-16 Thread Thomas Koenig
Am 17.11.2016 um 00:20 schrieb Jakub Jelinek: On Thu, Nov 17, 2016 at 12:03:18AM +0100, Thomas Koenig wrote: Don't you need to test in configure if the assembler supports AVX? Otherwise if somebody is bootstrapping gcc with older assembler, it will just fail to bootstrap. That's a good point.

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-16 Thread Jakub Jelinek
On Thu, Nov 17, 2016 at 12:03:18AM +0100, Thomas Koenig wrote: > >Don't you need to test in configure if the assembler supports AVX? > >Otherwise if somebody is bootstrapping gcc with older assembler, it will > >just fail to bootstrap. > > That's a good point. The AVX instructions were added in b

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-16 Thread Jerry DeLisle
On 11/16/2016 01:30 PM, Thomas Koenig wrote: Hello world, the attached patch adds an AVX-specific version of the matmul intrinsic to the Fortran library. This works by using the target_clones attribute. For testing, I compiled this on powerpc64-unknown-linux-gnu, without any ill effects. Also

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-16 Thread Thomas Koenig
Am 16.11.2016 um 23:01 schrieb Jakub Jelinek: On Wed, Nov 16, 2016 at 10:30:03PM +0100, Thomas Koenig wrote: the attached patch adds an AVX-specific version of the matmul intrinsic to the Fortran library. This works by using the target_clones attribute. Don't you need to test in configure if

Re: [patch, libfortran] Add AVX-specific matmul

2016-11-16 Thread Jakub Jelinek
On Wed, Nov 16, 2016 at 10:30:03PM +0100, Thomas Koenig wrote: > the attached patch adds an AVX-specific version of the matmul > intrinsic to the Fortran library. This works by using the target_clones > attribute. Don't you need to test in configure if the assembler supports AVX? Otherwise if som

[patch, libfortran] Add AVX-specific matmul

2016-11-16 Thread Thomas Koenig
Hello world, the attached patch adds an AVX-specific version of the matmul intrinsic to the Fortran library. This works by using the target_clones attribute. For testing, I compiled this on powerpc64-unknown-linux-gnu, without any ill effects. Also, a resulting binary reached around 15 GFlops