[Bug testsuite/97688] check_vect doesn't detect AVX2 on zen

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Tue Nov 3 12:40:52 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97688

--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 3 Nov 2020, hjl.tools at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97688
> 
> --- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
> FWIW, x86 source in gcc testsuite should be converted to
> __builtin_cpu_supports().

The check_vect () is quite convenient since it allows you to
build-test with target support you cannot run on via
--target_board=unix/-mavx512f for example (well, it is
incomplete and support for avx512 testing hasn't been added).

I don't see how the same functionality can be achieved with
a series of __builtin_cpu_supports checks (unless we only
adjust tree-vect.h to do

# if defined(__AVX2__)
  if (!__builtin_cpu_supports ("magic"))
    exit (0);
# ...


More information about the Gcc-bugs mailing list