Hi,

pr56541.c implicitly converts a float vector to an int (bool) vector:

 rMin = (rMax>0) ? rMin : rBig;

It fails on some s390 targets because the do not support converting from vector float to int. Is adding a vect_floatint_cvt as in the attached patch the OK thing to do?

Or better an xfail with ! vect_floatint_cvt?

Regards
 Robin

gcc/testsuite/ChangeLog:

        * gcc.dg/vect/pr56541.c: Add vect_floatint_cvt.
>From 4c19323b2c392923391a3c37b92054852d671c19 Mon Sep 17 00:00:00 2001
From: Robin Dapp <rd...@linux.ibm.com>
Date: Thu, 22 Apr 2021 09:22:07 +0200
Subject: [PATCH 03/10] Add vect_floatint_cvt.

---
 gcc/testsuite/gcc.dg/vect/pr56541.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/pr56541.c b/gcc/testsuite/gcc.dg/vect/pr56541.c
index d5def6899e4..e1cee6d0b0e 100644
--- a/gcc/testsuite/gcc.dg/vect/pr56541.c
+++ b/gcc/testsuite/gcc.dg/vect/pr56541.c
@@ -24,4 +24,4 @@ void foo()
     }
 }
 
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { ! vect_cond_mixed } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_floatint_cvt } xfail { ! vect_cond_mixed } } } } */
-- 
2.23.0

Reply via email to