public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Add vect_floatint_cvt to gcc.dg/vect/pr56541.c
@ 2021-05-05 14:31 Robin Dapp
  2021-05-05 17:05 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Dapp @ 2021-05-05 14:31 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

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.

[-- Attachment #2: 0003-Add-vect_floatint_cvt.patch --]
[-- Type: text/x-patch, Size: 798 bytes --]

From 4c19323b2c392923391a3c37b92054852d671c19 Mon Sep 17 00:00:00 2001
From: Robin Dapp <rdapp@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] testsuite: Add vect_floatint_cvt to gcc.dg/vect/pr56541.c
  2021-05-05 14:31 [PATCH] testsuite: Add vect_floatint_cvt to gcc.dg/vect/pr56541.c Robin Dapp
@ 2021-05-05 17:05 ` Jeff Law
  2021-06-09 12:39   ` Robin Dapp
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2021-05-05 17:05 UTC (permalink / raw)
  To: Robin Dapp, GCC Patches


On 5/5/2021 8:31 AM, Robin Dapp via Gcc-patches wrote:
> 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.

OK.  I'd tend to use XFAIL for a compiler bug that we haven't fixed.  In 
this case the target doesn't support what the test is trying to do.  So 
skipping the test in one manner or another seems better.


jeff



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] testsuite: Add vect_floatint_cvt to gcc.dg/vect/pr56541.c
  2021-05-05 17:05 ` Jeff Law
@ 2021-06-09 12:39   ` Robin Dapp
  0 siblings, 0 replies; 3+ messages in thread
From: Robin Dapp @ 2021-06-09 12:39 UTC (permalink / raw)
  To: Jeff Law, GCC Patches

>> gcc/testsuite/ChangeLog:
>>
>>          * gcc.dg/vect/pr56541.c: Add vect_floatint_cvt.
> 
> OK.  I'd tend to use XFAIL for a compiler bug that we haven't fixed.  In
> this case the target doesn't support what the test is trying to do.  So
> skipping the test in one manner or another seems better.

Just realized I seem to have have committed the only option that is 
definitely wrong...  Probably got confused because of switching back and 
forth between the two correct alternatives too often.  Therefore I will 
be committing

diff --git a/gcc/testsuite/gcc.dg/vect/pr56541.c 
b/gcc/testsuite/gcc.dg/vect/pr56541.c
index e1cee6d0b0e..fa86142716b 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" { 
target { ! vect_floatint_cvt } xfail { ! vect_cond_mixed } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { 
target { vect_floatint_cvt } xfail { ! vect_cond_mixed } } } } */

as obvious (the target should support vect_floatint_cvt for the test).

Regards
  Robin

--

gcc/testsuite/ChangeLog:

         * gcc.dg/vect/pr56541.c: Do not skip vect_cond_mixed.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-09 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-05 14:31 [PATCH] testsuite: Add vect_floatint_cvt to gcc.dg/vect/pr56541.c Robin Dapp
2021-05-05 17:05 ` Jeff Law
2021-06-09 12:39   ` Robin Dapp

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).