[testsuite] adjust expectations of x86 vect-simd-clone tests
Some vect-simd-clone tests fail when targeting ancient x86 variants, because the expected transformations only take place with -msse4 or higher. So arrange for these tests to take an -msse4 option on x86, so that the expected vectorization takes place, but decay to a compile test if vect.exp would enable execution but the target doesn't have an sse4 runtime. This requires the new dg-do-if to override the action on a target while retaining the default action on others, instead of disabling the test. We can count on avx512f compile-time support for these tests, because vect_simd_clones requires that on x86, and that implies sse4 support, so we need not complicate the scan conditionals with tests for sse4, except on the last test. for gcc/ChangeLog * doc/sourcebuild.texi (dg-do-if): Document. for gcc/testsuite/ChangeLog * lib/target-supports-dg.exp (dg-do-if): New. * gcc.dg/vect/vect-simd-clone-16f.c: Use -msse4 on x86, and skip in case execution is enabled but the runtime isn't. * gcc.dg/vect/vect-simd-clone-17f.c: Likewise. * gcc.dg/vect/vect-simd-clone-18f.c: Likewise. * gcc.dg/vect/vect-simd-clone-20.c: Likewise, but only skip the scan test.
Showing
- gcc/doc/sourcebuild.texi 5 additions, 0 deletionsgcc/doc/sourcebuild.texi
- gcc/testsuite/gcc.dg/vect/vect-simd-clone-16f.c 2 additions, 0 deletionsgcc/testsuite/gcc.dg/vect/vect-simd-clone-16f.c
- gcc/testsuite/gcc.dg/vect/vect-simd-clone-17f.c 2 additions, 0 deletionsgcc/testsuite/gcc.dg/vect/vect-simd-clone-17f.c
- gcc/testsuite/gcc.dg/vect/vect-simd-clone-18f.c 2 additions, 0 deletionsgcc/testsuite/gcc.dg/vect/vect-simd-clone-18f.c
- gcc/testsuite/gcc.dg/vect/vect-simd-clone-20.c 4 additions, 2 deletionsgcc/testsuite/gcc.dg/vect/vect-simd-clone-20.c
- gcc/testsuite/lib/target-supports-dg.exp 29 additions, 0 deletionsgcc/testsuite/lib/target-supports-dg.exp
Loading
Please register or sign in to comment