Hi Andi,
> On 2025-12-16 13:50, Rainer Orth wrote:
>> Hi Andi,
>>
>>>> diff --git a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-2.c
>>>> b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-2.c
>>>> --- a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-2.c
>>>> +++ b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-2.c
>>>> @@ -1,5 +1,6 @@
>>>> /* { dg-do run } */
>>>> /* { dg-options "-mgfni -mavx512vl -mavx512bw -mavx512f -O3
>>>> -Wno-shift-count-negative -march=x86-64 -mtune=generic" } */
>>>> +/* { dg-skip-if "Assembler support missing" { *-*-solaris2.* && { !
>>>> gas } } } */
>>> It seems it would be better to introduce some generic equivalent of
>>> dg-effective-target for compile only tests instead of all these special
>>> cases.
>> good point: we already have all of gfni, avx512vl, avx512bw, and
>> avxv512f effective-target keywords. This test this should require all
>> of them, I guess.
> effective-target is for what can be run. This is a compile test, so it
> would overconstrain it.
> But something similar for compile would be useful.
you're wrong here: effective-target features are about all sorts of
target (and sometimes host) features. While e.g. the gfni keyword
(again) wasn't documented in sourcebuild.texi, you can see this in
target-supports.exp:
# Return 1 if gfni instructions can be compiled.
proc check_effective_target_gfni { } {
The runtime part is taken care of directly in the test:
int main ()
{
__builtin_cpu_init ();
if (!__builtin_cpu_supports ("gfni"))
return 0;
otherwise the test would fail to execute almost everywhere.
However, you're perfectly right that restricting the test to !(solaris
&& gas) isn's the right thing to do: unlike newer Darwin version, it
also FAILs on macOS 10.13 in the same way: some insns are flagged like
Excess errors:
/var/tmp//ccUhbNY4.s:12:2: error: 1minstruction requires: AVX-512 ISA
vmovdqa64 lC0(%rip), %zmm1
^
/var/tmp//ccUhbNY4.s:23:2: error: instruction requires: AVX-512 BW ISA
vmovdqu8 (%rax), %zmm0
^
or are completely unsupported:
/var/tmp//ccUhbNY4.s:25:2: error: invalid instruction mnemonic 'vgf2p8affineqb'
vgf2p8affineqb $0, %zmm1, %zmm0, %zmm0
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University