On Thu, Mar 05, 2020 at 05:04:16PM +0000, GT wrote:
> At the top of that file is dejagnu directive:
> /* { dg-require-effective-target vect_int } */
> 
> 1. How do I check to see if vect_int is defined? I suspect it as the reason
> the test isn't run.

https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/lib/target-supports.exp;h=ca3895c22690dc15b6c2beffb53ea6f39ad80b38;hb=HEAD#l3258

(It is always true for powerpc, since we no longer support the
linuxpaired target).

You can look in the generated gcc.log, and if what you are looking for
isn't there, you can pass --debug to runtest as well, and look in the
relevant dbg.log .  But first look in target-supports.exp if it is
something trivial ;-)

> 2. Multiple other testcases in testsuite/gcc.dg/vect/ have this line at the 
> top:
> /* { dg-additional-options "-mavx" { target avx_runtime } } */
> An example is vect-simd-16.c
> 
> 2.1 Should not these testcases be in directory testsuite/gcc.target/i386/ ?
> 2.2 To run vect-simd-16.c on PPC64, is it enough to put a copy of the file
> in testsuite/gcc.target/powerpc/ ? (After modifying target appropriately.)

The test is run on all platforms.  If avx_runtime is true, it will add
the -mavx option.  This isn't relevant for powerpc; this line does
nothing for powerpc targets.

It certainly would be nice if generic tests did not often have target-
specific stuff in them.  In this case, it could be hidden in vect.exp,
perhaps?


Segher

Reply via email to