When regtesting the current trunk on x86_64-linux-gnu, I see the following failures: FAIL: gfortran.dg/simd-builtins-1.f90 -O scan-assembler call.*_ZGVbN4v_sinf FAIL: gfortran.dg/simd-builtins-6.f90 -O scan-assembler call.*_ZGVbN4v_sinf Both test cases expect the assembly to contain a call to "_ZGVbN4v_sinf", but what I see on my system is a call to "_ZGVdN8v_sinf".
The test case was added in (In reply to janus from comment #0) > Both test cases expect the assembly to contain a call to "_ZGVbN4v_sinf", > but what I see on my system is a call to "_ZGVdN8v_sinf". Those tests were added in r266509. Martin, do you understand how this comes about?
(In reply to janus from comment #0) > Both test cases expect the assembly to contain a call to "_ZGVbN4v_sinf", > but what I see on my system is a call to "_ZGVdN8v_sinf". That was on a haswell machine. On a skylake CPU I even see: call _ZGVeN16v_sinf So apparently I get broader vector calls than expected. Note that this seems to happen only when configuring with --with-arch=... (e.g. haswell or skylake-avx512 ).
Yes, you have wider vector. I'll add tomorrow -march=haswell that will force the expected width.
Mine.
Instead of adding -march= please add instead say -mavx2 -mno-avx512f or whatever ISA set you want to pick, and probably also -mprefer-vector-width=256 or what you want. Otherwise people can still override it with --target_board etc., say through -mtune= in there, or through -mISA options.
(In reply to Jakub Jelinek from comment #5) > Instead of adding -march= please add instead say -mavx2 -mno-avx512f or > whatever ISA set you want to pick, and probably also > -mprefer-vector-width=256 or what you want. I guess it might be a good idea to have different variants of the test case that check the correct vector widths for AVX, AVX2, AVX512, etc. Of course one would need to make sure that e.g. the AVX512 variant is only executed on AVX512 hardware (e.g. skylake CPU).
Author: marxin Date: Fri Nov 30 10:48:51 2018 New Revision: 266660 URL: https://gcc.gnu.org/viewcvs?rev=266660&root=gcc&view=rev Log: Restrict vector extension to use 128bit vectors (PR testsuite/88265). 2018-11-30 Martin Liska <mliska@suse.cz> PR testsuite/88265 * gfortran.dg/simd-builtins-1.f90: Restrict to 128b vectors. * gfortran.dg/simd-builtins-6.f90: Likewise. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/simd-builtins-1.f90 trunk/gcc/testsuite/gfortran.dg/simd-builtins-6.f90
Fixed.