https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78379
--- Comment #14 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- (In reply to Thomas Koenig from comment #12) > I read some advice on the net that certain types of AMD processors > have AVX, but AVX128 is better for them. > > What exactly is your CPU model? What does /proc/cpuinfo say? > I have three different machines here. I am sure they are all similar as they are A series. The first is for testing results posted here: $ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 21 model : 16 model name : AMD A10-5800K APU with Radeon(tm) HD Graphics stepping : 1 2nd: $ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 18 model : 1 model name : AMD A6-3620 APU with Radeon(tm) HD Graphics stepping : 0 3rd: $ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 22 model : 48 model name : AMD A8-6410 APU with AMD Radeon R5 Graphics stepping : 1 (In reply to Thomas Koenig from comment #13) > $(M4) -Dfile=$@ -Darch=avx512f ... > > In the generated C files, we enclose the whole content inside HAVE_AVX512F, > so nothing happens if the architecture is not supported by the compiler. > The target attribute is also set there. > > On the first call to matmul, we check for the availability of AVX > etc, we also check for prefrences such as AVX128 from the CPU model, > and then set a static function pointer to the function we want to call. > On each subsequent invocation, all we do is that (tail) call. > > How does this sound? This seems a bit complicated. The machines I have do OK without the aux-matmul and no machine specific compilation other than the current defaults that gcc uses with the flags I have inside the Makefile on current trunk. Can this be done without the first call to matmul?