[testsuite] enable -maltivec like vect_int for signbit-2.c

Message ID orpm8xgrhs.fsf@lxoliva.fsfla.org
State Committed
Commit 804208a2ab817c17d1eea627b671e77a15545a01
Headers
Series [testsuite] enable -maltivec like vect_int for signbit-2.c |

Commit Message

Alexandre Oliva March 25, 2023, 8:33 a.m. UTC
  Explicitly enable altivec if it's supported.  vect_int tests for
powerpc_altivec_ok, but without the explicit option, if altivec is not
enabled by default, we end up expecting vectorization that doesn't
occur.

Regstrapped on ppc64-linux-gnu.  Also tested with ppc64-vxworks7r2
(gcc-12).  Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.dg/signbit-2.c: Add -maltivec if supported.
---
 gcc/testsuite/gcc.dg/signbit-2.c |    1 +
 1 file changed, 1 insertion(+)
  

Comments

Mike Stump March 25, 2023, 7:54 p.m. UTC | #1
On Mar 25, 2023, at 1:33 AM, Alexandre Oliva <oliva@adacore.com> wrote:
> 
> Explicitly enable altivec if it's supported.  vect_int tests for
> powerpc_altivec_ok, but without the explicit option, if altivec is not
> enabled by default, we end up expecting vectorization that doesn't
> occur.
> 
> Regstrapped on ppc64-linux-gnu.  Also tested with ppc64-vxworks7r2
> (gcc-12).  Ok to install?

Ok.

> for  gcc/testsuite/ChangeLog
> 
> 	* gcc.dg/signbit-2.c: Add -maltivec if supported.
  

Patch

diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c
index 1624225820703..d7b406effc62d 100644
--- a/gcc/testsuite/gcc.dg/signbit-2.c
+++ b/gcc/testsuite/gcc.dg/signbit-2.c
@@ -4,6 +4,7 @@ 
 /* This test does not work when the truth type does not match vector type.  */
 /* { dg-additional-options "-mno-avx512f" { target { i?86-*-* x86_64-*-* } } } */
 /* { dg-additional-options "-march=armv8-a" { target aarch64_sve } } */
+/* { dg-additional-options "-maltivec" { target powerpc_altivec_ok } } */
 /* { dg-skip-if "no fallback for MVE" { arm_mve } } */
 
 #include <stdint.h>