Skip to content
Snippets Groups Projects
Commit e6f5fade authored by Alexandre Oliva's avatar Alexandre Oliva Committed by Alexandre Oliva
Browse files

[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.
parent 3b72464b
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment