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 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 binutils 2.19,
which was released in 2011. This could be put in the prerequisites.

What should the test do?  Fail with an error message "you need newer
binutils" or simply (and silently) not compile the AVX vesion?

For matmul_i*, wouldn't it make more sense to use avx2 instead of avx,
or both avx and avx2 and maybe avx512f?

I did a vdiff of the disassembled code generated or avx and avx2, and
(somewhat to my surprise) there was no difference.  Maybe, with more
unrolling, something more might have happened. I didn't check for
AVX512f, but I can do that.

2016-11-16  Thomas Koenig  <tkoe...@gcc.gnu.org>

        PR fortran/78379
        * m4/matmul.m4:  For x86_64, make the work function for matmul

Why the extra space before For?

Will be removed.

        static with target_clones for AVX and default, and create
        a wrapper function to call it.
        * generated/matmul_c10.c

Missing : Regenerated.

Will be added.

Regards

        Thomas

Reply via email to