[2/2,rs6000] xfail float128 comparison test case that fails on powerpc64 [PR108728]

Message ID bcbe0ab5-9649-9005-8739-f1bfec216a18@linux.ibm.com
State Accepted
Headers
Series None |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

HAO CHEN GUI April 20, 2023, 6:04 a.m. UTC
  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 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.

When float128 hardware is enabled (-mfloat128-hardware), xscmpuqp is
generated for comparison which is unexpected.   When float128 software
simulation is enabled (-mno-float128-hardware), we still have to xfail
the hardware version (__lekf2_hw) which finally invokes xscmpuqp.

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

patch.diff
  

Comments

Kewen.Lin April 20, 2023, 7:39 a.m. UTC | #1
Hi,

on 2023/4/20 14:04, 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 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

s/cases/case/

> fails due to a longstanding issue with floating-point compares.
> 
> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684 for more information.

You can just use PR58684 for short.  :)

> 
> When float128 hardware is enabled (-mfloat128-hardware), xscmpuqp is
> generated for comparison which is unexpected.   When float128 software
> simulation is enabled (-mno-float128-hardware), we still have to xfail

s/simulation/emulation/

OK for trunk, thanks!

BR,
Kewen

> the hardware version (__lekf2_hw) which finally invokes xscmpuqp.
> 
> 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..a86592b3328 100644
> --- a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
> +++ b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
> @@ -1,5 +1,6 @@
>  /* Test for "invalid" exceptions from __float128 comparisons.  */
>  /* { dg-do run } */
> +/* { dg-xfail-run-if "ppc float128_hw" { ppc_float128_hw || { ppc_cpu_supports_hw && p9vector_hw } } } */
>  /* { dg-options "" } */
>  /* { dg-require-effective-target __float128 } */
>  /* { dg-require-effective-target base_quadfloat_support } */
  

Patch

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