ppc: testsuite: vec-mul requires vsx runtime

Message ID orwnf3fa5a.fsf@lxoliva.fsfla.org
State New
Headers
Series ppc: testsuite: vec-mul requires vsx runtime |

Commit Message

Alexandre Oliva May 3, 2022, 5:38 a.m. UTC
  vec-mul is an execution test, but it only requires a powerpc_vsx_ok
effective target, which is enough only for compile tests.  In order to
To check for runtime and execution environment support, we need to
require vsx_hw.  Make that a condition for execution, but still
perform a compile test if the condition is not satisfied.

Regstrapped on ppc64le-linux-gnu, also tested on
x86_64-linux-gnu-x-ppc-vx7r2 (no vsx execution support)
Ok to install?  gcc-12?  gcc-11?


for  gcc/testsuite/ChangeLog

	* testsuite/powerpc/vec-mul.c: Run on target vsx_hw, just
	compile otherwise.
---
 gcc/testsuite/gcc.target/powerpc/vec-mul.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/vec-mul.c b/gcc/testsuite/gcc.target/powerpc/vec-mul.c
index bfcaf80719d1d..11da86159723f 100644
--- a/gcc/testsuite/gcc.target/powerpc/vec-mul.c
+++ b/gcc/testsuite/gcc.target/powerpc/vec-mul.c
@@ -1,4 +1,5 @@ 
-/* { dg-do run } */
+/* { dg-do compile { target { ! vsx_hw } } } */
+/* { dg-do run { target vsx_hw } } */
 /* { dg-require-effective-target powerpc_vsx_ok } */
 /* { dg-options "-mvsx -O3" } */