public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH-1, rs6000] xfail float128 comparison test case that fails on powerpc64 [PR108728]
@ 2023-04-18  3:13 HAO CHEN GUI
  2023-04-19  2:45 ` Kewen.Lin
  0 siblings, 1 reply; 2+ messages in thread
From: HAO CHEN GUI @ 2023-04-18  3:13 UTC (permalink / raw)
  To: gcc-patches; +Cc: Segher Boessenkool, David, Kewen.Lin, Peter Bergner

Hi,
  This patch xfails a float128 comparison test case on powerpc64
that fails due to a longstanding issue with floating-point
compares.

  See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684 for more
information.

  The case is xfailed when instructions of float128 hardware are
generated. When software simulation is used, the case should pass.

  The patch passed regression test on Power Linux platforms.

Thanks
Gui Haochen

ChangeLog
rs6000: xfail float128 comparison test case that fails on powerpc64.

This patch xfails a float128 comparison test cases on powerpc64 that
fails due to a longstanding issue with floating-point compares.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684 for more information.

gcc/testsuite/
	PR target/108728
	* gcc.dg/torture/float128-cmp-invalid.c: Add xfail.

patch.diff
diff --git a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
index 1f675efdd61..7b520d1f9f1 100644
--- a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
+++ b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
@@ -1,5 +1,5 @@
 /* Test for "invalid" exceptions from __float128 comparisons.  */
-/* { dg-do run } */
+/* { dg-do run { xfail { ppc_float128_hw || { ppc_cpu_supports_hw && p9vector_hw } } } } */
 /* { dg-options "" } */
 /* { dg-require-effective-target __float128 } */
 /* { dg-require-effective-target base_quadfloat_support } */

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

* Re: [PATCH-1, rs6000] xfail float128 comparison test case that fails on powerpc64 [PR108728]
  2023-04-18  3:13 [PATCH-1, rs6000] xfail float128 comparison test case that fails on powerpc64 [PR108728] HAO CHEN GUI
@ 2023-04-19  2:45 ` Kewen.Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Kewen.Lin @ 2023-04-19  2:45 UTC (permalink / raw)
  To: HAO CHEN GUI; +Cc: Segher Boessenkool, David, Peter Bergner, gcc-patches

Hi Haochen,

on 2023/4/18 11:13, HAO CHEN GUI wrote:
> Hi,
>   This patch xfails a float128 comparison test case on powerpc64
> that fails due to a longstanding issue with floating-point
> compares.
> 
>   See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684 for more
> information.
> 
>   The case is xfailed when instructions of float128 hardware are
> generated. When software simulation is used, the case should pass.

IMHO we should make the comments here (commit log) clearer, like:
when float128 hardware gets supported (-mfloat128-hardware takes
effect), xscmpuqp is generated for comparison which is unexpected.

"When software simulation is used, the case should pass" is not so
right, I would interpret the use of __lekf2 as software simulation,
we have to xfail this too when the _hw version is used during runtime,
please make it clearer.

> 
>   The patch passed regression test on Power Linux platforms.
> 
> Thanks
> Gui Haochen
> 
> ChangeLog
> rs6000: xfail float128 comparison test case that fails on powerpc64.
> 
> This patch xfails a float128 comparison test cases on powerpc64 that
> fails due to a longstanding issue with floating-point compares.
> 
> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684 for more information.
> 
> gcc/testsuite/
> 	PR target/108728
> 	* gcc.dg/torture/float128-cmp-invalid.c: Add xfail.
> 
> patch.diff
> diff --git a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
> index 1f675efdd61..7b520d1f9f1 100644
> --- a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
> +++ b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
> @@ -1,5 +1,5 @@
>  /* Test for "invalid" exceptions from __float128 comparisons.  */
> -/* { dg-do run } */
> +/* { dg-do run { xfail { ppc_float128_hw || { ppc_cpu_supports_hw && p9vector_hw } } } } */

This change looks good to me, though personally I prefer dg-xfail-run-if
as we can specify one associated comment with it. :)

BR,
Kewen

>  /* { dg-options "" } */
>  /* { dg-require-effective-target __float128 } */
>  /* { dg-require-effective-target base_quadfloat_support } */


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

end of thread, other threads:[~2023-04-19  2:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18  3:13 [PATCH-1, rs6000] xfail float128 comparison test case that fails on powerpc64 [PR108728] HAO CHEN GUI
2023-04-19  2:45 ` Kewen.Lin

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