aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2021-11-10 12:02:39 +0000
committerTamar Christina <tamar.christina@arm.com>2021-11-10 12:05:50 +0000
commit92617a8e2af06c74e7df514d3560f246daf411e9 (patch)
treef7c0dbf4aac16995b48fcbbc160f12a117f2e7dc /gcc
parent5cfa174e08e4964703387aa7de5ece448cc660b8 (diff)
downloadgcc-92617a8e2af06c74e7df514d3560f246daf411e9.zip
gcc-92617a8e2af06c74e7df514d3560f246daf411e9.tar.gz
gcc-92617a8e2af06c74e7df514d3560f246daf411e9.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.dg/signbit-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/signbit-5.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/signbit-2.c b/gcc/testsuite/gcc.dg/signbit-2.c
index fc0157c..d8501e9 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 22a9270..2b119cd 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>