diff mbox series

xfail fetestexcept test - ppc always uses fcmpu

Message ID orim5zcrex.fsf@lxoliva.fsfla.org
State New
Headers show
Series xfail fetestexcept test - ppc always uses fcmpu | expand

Commit Message

Alexandre Oliva March 10, 2021, 9:02 a.m. UTC
gcc.dg/torture/pr91323.c tests that a compare with NaNf doesn't set an
exception using builtin compare intrinsics, and that it does when
using regular compare operators.

That doesn't seem to be expected to work on powerpc targets.  It fails
on GNU/Linux, it's marked to be skipped on AIX, and a similar test,
gcc.dg/torture/pr93133.c, has the execution test xfailed for all of
powerpc*-*-*.

In this test, the functions that use intrinsics for the compare end up
with the same code as the one that uses compare operators, using
fcmpu, a floating compare that, unlike fcmpo, does not set the invalid
operand exception for quiet NaN.  I couldn't find any evidence that
the rs6000 backend ever outputs fcmpo.  Therefore, I'm adding the same
execution xfail marker to this test.

This was regstrapped on x86_64-linux-gnu, tested with a cross to a
ppc64-vxworks7r2, and I'm now also regstrapping on ppc64-linux-gnu just
to be sure.  Ok to install?


for  gcc/testsuite/ChangeLog

	* gcc.dg/testsuite/pr91323.c: Expect execution fail on
	powerpc*-*-*.
---
 gcc/testsuite/gcc.dg/torture/pr91323.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joseph Myers March 10, 2021, 10:33 p.m. UTC | #1
On Wed, 10 Mar 2021, Alexandre Oliva wrote:

> operand exception for quiet NaN.  I couldn't find any evidence that
> the rs6000 backend ever outputs fcmpo.  Therefore, I'm adding the same
> execution xfail marker to this test.

In my view, such an XFAIL (for a GCC bug as opposed to an environmental 
issue) should have a comment pointing to a corresponding open bug in GCC 
Bugzilla.  In this case, that's bug 58684.
Alexandre Oliva March 11, 2021, 3:03 p.m. UTC | #2
On Mar 10, 2021, Joseph Myers <joseph@codesourcery.com> wrote:

> In my view, such an XFAIL (for a GCC bug as opposed to an environmental 
> issue) should have a comment pointing to a corresponding open bug in GCC 
> Bugzilla.  In this case, that's bug 58684.

Thanks, yeah, that's valuable information to add.

So far, I added a link to the PR in the ChangeLog entry, and noticed and
fixed a typo in the filename there.

I kind of like the notion of adding a comment to the test itself, but I
wasn't sure that's what you meant.

I kind of like it because I'd have appreciated if the other tests, that
I had identified, had comments linking back to the PR.  OTOH, I realize
if I had searched the ChangeLog or their commit history, I'd have found
my way to the PR.  Instead, I just realized that that was the way ppc
was expected to behave, and quickly double-checked the code to make sure
there was no implemented alternative in hiding, entirely missing the PR.


xfail fetestexcept test - ppc always uses fcmpu

From: Alexandre Oliva <oliva@adacore.com>

gcc.dg/torture/pr91323.c tests that a compare with NaNf doesn't set an
exception using builtin compare intrinsics, and that it does when
using regular compare operators.

That doesn't seem to be expected to work on powerpc targets.  It fails
on GNU/Linux, it's marked to be skipped on AIX, and a similar test,
gcc.dg/torture/pr93133.c, has the execution test xfailed for all of
powerpc*-*-*.

In this test, the functions that use intrinsics for the compare end up
with the same code as the one that uses compare operators, using
fcmpu, a floating compare that, unlike fcmpo, does not set the invalid
operand exception for quiet NaN.  I couldn't find any evidence that
the rs6000 backend ever outputs fcmpo.  Therefore, I'm adding the same
execution xfail marker to this test.


for  gcc/testsuite/ChangeLog

	PR target/58684
	* gcc.dg/torture/pr91323.c: Expect execution fail on
	powerpc*-*-*.
---
 gcc/testsuite/gcc.dg/torture/pr91323.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/torture/pr91323.c b/gcc/testsuite/gcc.dg/torture/pr91323.c
index 1411fcaa3966c..f97dcc12cac9d 100644
--- a/gcc/testsuite/gcc.dg/torture/pr91323.c
+++ b/gcc/testsuite/gcc.dg/torture/pr91323.c
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { xfail powerpc*-*-* } } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target fenv_exceptions } */
 /* { dg-skip-if "fenv" { powerpc-ibm-aix* } } */
Joseph Myers March 11, 2021, 10:03 p.m. UTC | #3
On Thu, 11 Mar 2021, Alexandre Oliva wrote:

> I kind of like the notion of adding a comment to the test itself, but I
> wasn't sure that's what you meant.

Yes, adding a comment to the test itself is what I meant.
diff mbox series

Patch

diff --git a/gcc/testsuite/gcc.dg/torture/pr91323.c b/gcc/testsuite/gcc.dg/torture/pr91323.c
index 1411fcaa3966c..f97dcc12cac9d 100644
--- a/gcc/testsuite/gcc.dg/torture/pr91323.c
+++ b/gcc/testsuite/gcc.dg/torture/pr91323.c
@@ -1,4 +1,4 @@ 
-/* { dg-do run } */
+/* { dg-do run { xfail powerpc*-*-* } } */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target fenv_exceptions } */
 /* { dg-skip-if "fenv" { powerpc-ibm-aix* } } */