aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/s390/fminmax-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/s390/fminmax-2.c')
-rw-r--r--gcc/testsuite/gcc.target/s390/fminmax-2.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/s390/fminmax-2.c b/gcc/testsuite/gcc.target/s390/fminmax-2.c
new file mode 100644
index 0000000..ea37a0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/fminmax-2.c
@@ -0,0 +1,29 @@
+/* Check fmin/fmax expanders for scalars on non-VXE targets. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=z13 -mzarch" } */
+/* { dg-final { scan-assembler-times "jg" 4 } } */
+
+double
+dofmax (double d1, double d2)
+{
+ return __builtin_fmax (d1, d2);
+}
+
+double
+dofmin (double d1, double d2)
+{
+ return __builtin_fmin (d1, d2);
+}
+
+float
+dofmaxf (float f1, float f2)
+{
+ return __builtin_fmaxf (f1, f2);
+}
+
+float
+dofminf (float f1, float f2)
+{
+ return __builtin_fminf (f1, f2);
+}