public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5111] middle-end: Fix signbit tests when ran on ISA with support for masks.
@ 2021-11-10 12:06 Tamar Christina
  0 siblings, 0 replies; only message in thread
From: Tamar Christina @ 2021-11-10 12:06 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:92617a8e2af06c74e7df514d3560f246daf411e9

commit r12-5111-g92617a8e2af06c74e7df514d3560f246daf411e9
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Wed Nov 10 12:02:39 2021 +0000

    middle-end: Fix signbit tests when ran on ISA with support for masks.
    
    These test don't work on vector ISAs where the truth
    type don't match the vector mode of the operation.
    
    However I still want the tests to run on these
    architectures but just turn off the ISA modes that
    enable masks.
    
    This thus turns off SVE is it's on and turns off
    AVX512 if it's on.
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/signbit-2.c: Turn off masks.
            * gcc.dg/signbit-5.c: Likewise.

Diff:
---
 gcc/testsuite/gcc.dg/signbit-2.c | 6 +++++-
 gcc/testsuite/gcc.dg/signbit-5.c | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c
index fc0157cbc5c..d8501e9b7a2 100644
--- a/gcc/testsuite/gcc.dg/signbit-2.c
+++ b/gcc/testsuite/gcc.dg/signbit-2.c
@@ -1,6 +1,10 @@
 /* { dg-do assemble } */
 /* { dg-options "-O3 --save-temps -fdump-tree-optimized" } */
 
+/* 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 } } */
+
 #include <stdint.h>
 
 void fun1(int32_t *x, int n)
@@ -15,5 +19,5 @@ void fun2(int32_t *x, int n)
       x[i] = (-x[i]) >> 30;
 }
 
-/* { dg-final { scan-tree-dump-times {\s+>\s+\{ 0, 0, 0, 0 \}} 1 optimized } } */
+/* { dg-final { scan-tree-dump {\s+>\s+\{ 0, 0, 0(, 0)+ \}} optimized } } */
 /* { dg-final { scan-tree-dump-not {\s+>>\s+31} optimized } } */
diff --git a/gcc/testsuite/gcc.dg/signbit-5.c b/gcc/testsuite/gcc.dg/signbit-5.c
index 22a92704773..2b119cdfda7 100644
--- a/gcc/testsuite/gcc.dg/signbit-5.c
+++ b/gcc/testsuite/gcc.dg/signbit-5.c
@@ -1,6 +1,11 @@
 /* { dg-do run } */
 /* { dg-options "-O3" } */
 
+/* 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 } } */
+
+
 #include <stdint.h>
 #include <limits.h>
 #include <stdio.h>


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-10 12:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10 12:06 [gcc r12-5111] middle-end: Fix signbit tests when ran on ISA with support for masks Tamar Christina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).