aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2020-08-12 08:02:34 +0200
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 15:08:02 -0300
commitc73a6f5af0dbf880f017dcec386d0e6240f29f95 (patch)
tree1e014ece51a16bc9fb53bed45dd8349f431e294e /gcc/testsuite
parent8a9c6170ee8945e4dd0dcc0bb93e1f9d5b42a44a (diff)
IBM Z: Fix PR96456
The testcase failed because our backend refuses to generate vector compare instructions for signaling operators with -fno-trapping-math -fno-finite-math-only. gcc/ChangeLog: PR target/96456 * config/s390/s390.h (TARGET_NONSIGNALING_VECTOR_COMPARE_OK): New macro. * config/s390/vector.md (vcond_comparison_operator): Use new macro for the check. gcc/testsuite/ChangeLog: PR target/96456 * gcc.target/s390/pr96456.c: New test.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/gcc.target/s390/pr96456.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/pr96456.c b/gcc/testsuite/gcc.target/s390/pr96456.c
new file mode 100644
index 00000000000..ea9e9cd7a37
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/pr96456.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -std=gnu99 -ffast-math -fno-finite-math-only -march=z13" } */
+
+int b, c, d;
+double *e;
+int f() {
+ double *a = a;
+ int g = d, f = c, h = b;
+ if (__builtin_expect(f, 0))
+ for (; g < h; g++)
+ e[g] = (int)(a[g] >= 0.0 ? g + 0.99999999 : a[g]);
+ return 0;
+}