public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* xfail fetestexcept test - ppc always uses fcmpu
@ 2021-03-10  9:02 Alexandre Oliva
  2021-03-10 22:33 ` Joseph Myers
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Oliva @ 2021-03-10  9:02 UTC (permalink / raw)
  To: gcc-patches; +Cc: Rainer Orth, Mike Stump, Segher Boessenkool, David Edelsohn


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

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* } } */


-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

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

* Re: xfail fetestexcept test - ppc always uses fcmpu
  2021-03-10  9:02 xfail fetestexcept test - ppc always uses fcmpu Alexandre Oliva
@ 2021-03-10 22:33 ` Joseph Myers
  2021-03-11 15:03   ` Alexandre Oliva
  2024-04-22 10:00   ` [PATCH v2] " Alexandre Oliva
  0 siblings, 2 replies; 7+ messages in thread
From: Joseph Myers @ 2021-03-10 22:33 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-patches, David Edelsohn, Segher Boessenkool

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.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: xfail fetestexcept test - ppc always uses fcmpu
  2021-03-10 22:33 ` Joseph Myers
@ 2021-03-11 15:03   ` Alexandre Oliva
  2021-03-11 22:03     ` Joseph Myers
  2024-04-22 10:00   ` [PATCH v2] " Alexandre Oliva
  1 sibling, 1 reply; 7+ messages in thread
From: Alexandre Oliva @ 2021-03-11 15:03 UTC (permalink / raw)
  To: Joseph Myers; +Cc: gcc-patches, David Edelsohn, Segher Boessenkool

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* } } */




-- 
Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
   Free Software Activist         GNU Toolchain Engineer
        Vim, Vi, Voltei pro Emacs -- GNUlius Caesar

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

* Re: xfail fetestexcept test - ppc always uses fcmpu
  2021-03-11 15:03   ` Alexandre Oliva
@ 2021-03-11 22:03     ` Joseph Myers
  0 siblings, 0 replies; 7+ messages in thread
From: Joseph Myers @ 2021-03-11 22:03 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: gcc-patches, Segher Boessenkool, David Edelsohn

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.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* [PATCH v2] xfail fetestexcept test - ppc always uses fcmpu
  2021-03-10 22:33 ` Joseph Myers
  2021-03-11 15:03   ` Alexandre Oliva
@ 2024-04-22 10:00   ` Alexandre Oliva
  2024-04-23  8:57     ` Kewen.Lin
  1 sibling, 1 reply; 7+ messages in thread
From: Alexandre Oliva @ 2024-04-22 10:00 UTC (permalink / raw)
  To: Joseph Myers
  Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool,
	Kewen Lin, gcc-patches

On Mar 10, 2021, Joseph Myers <joseph@codesourcery.com> wrote:

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

Thanks for the suggestion, yeah, that makes sense.  Fixed in v2 below.
https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566523.html
Ping?-ish


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.

Regstrapped on x86_64-linux-gnu and ppc64el-linux-gnu.  Also tested with
gcc-13 on ppc64-vx7r2 and ppc-vx7r2.  Ok to install?


for  gcc/testsuite/ChangeLog

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

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


-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

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

* Re: [PATCH v2] xfail fetestexcept test - ppc always uses fcmpu
  2024-04-22 10:00   ` [PATCH v2] " Alexandre Oliva
@ 2024-04-23  8:57     ` Kewen.Lin
  2024-04-28  7:35       ` Alexandre Oliva
  0 siblings, 1 reply; 7+ messages in thread
From: Kewen.Lin @ 2024-04-23  8:57 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool,
	Kewen Lin, gcc-patches, Joseph Myers

Hi,

on 2024/4/22 18:00, Alexandre Oliva wrote:
> On Mar 10, 2021, Joseph Myers <joseph@codesourcery.com> wrote:
> 
>> 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.
> 
> Thanks for the suggestion, yeah, that makes sense.  Fixed in v2 below.
> https://gcc.gnu.org/pipermail/gcc-patches/2021-March/566523.html
> Ping?-ish
> 
> 
> 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.
> 
> Regstrapped on x86_64-linux-gnu and ppc64el-linux-gnu.  Also tested with
> gcc-13 on ppc64-vx7r2 and ppc-vx7r2.  Ok to install?
> 
> 
> for  gcc/testsuite/ChangeLog
> 
> 	PR target/58684
> 	* gcc.dg/torture/pr91323.c: Expect execution fail on
> 	powerpc*-*-*.
> ---
>  gcc/testsuite/gcc.dg/torture/pr91323.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/gcc/testsuite/gcc.dg/torture/pr91323.c b/gcc/testsuite/gcc.dg/torture/pr91323.c
> index 1411fcaa3966c..f188faa3ccf47 100644
> --- a/gcc/testsuite/gcc.dg/torture/pr91323.c
> +++ b/gcc/testsuite/gcc.dg/torture/pr91323.c
> @@ -1,4 +1,5 @@
> -/* { dg-do run } */
> +/* { dg-do run { xfail powerpc*-*-* } } */
> +/* The ppc xfail is because of PR target/58684.  */

OK, though the proposed comment is slightly different from what's in
the related commit r8-6445-g86145a19abf39f. :)  Thanks!

BR,
Kewen

>  /* { dg-add-options ieee } */
>  /* { dg-require-effective-target fenv_exceptions } */
>  /* { dg-skip-if "fenv" { powerpc-ibm-aix* } } */
> 
> 


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

* Re: [PATCH v2] xfail fetestexcept test - ppc always uses fcmpu
  2024-04-23  8:57     ` Kewen.Lin
@ 2024-04-28  7:35       ` Alexandre Oliva
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2024-04-28  7:35 UTC (permalink / raw)
  To: Kewen.Lin
  Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool,
	Kewen Lin, gcc-patches, Joseph Myers

On Apr 23, 2024, "Kewen.Lin" <linkw@linux.ibm.com> wrote:

>> --- a/gcc/testsuite/gcc.dg/torture/pr91323.c
>> +++ b/gcc/testsuite/gcc.dg/torture/pr91323.c
>> @@ -1,4 +1,5 @@
>> -/* { dg-do run } */
>> +/* { dg-do run { xfail powerpc*-*-* } } */
>> +/* The ppc xfail is because of PR target/58684.  */

> OK, though the proposed comment is slightly different from what's in
> the related commit r8-6445-g86145a19abf39f. :)  Thanks!

Oh, thanks for the pointer, that was easy to fix.  Here's what I'm
pushing momentarily...


xfail fetestexcept test - ppc always uses fcmpu

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 |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/torture/pr91323.c b/gcc/testsuite/gcc.dg/torture/pr91323.c
index 1411fcaa3966c..4574342e728db 100644
--- a/gcc/testsuite/gcc.dg/torture/pr91323.c
+++ b/gcc/testsuite/gcc.dg/torture/pr91323.c
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do run { xfail powerpc*-*-* } } */
+/* remove the xfail for powerpc when pr58684 is fixed */
 /* { dg-add-options ieee } */
 /* { dg-require-effective-target fenv_exceptions } */
 /* { dg-skip-if "fenv" { powerpc-ibm-aix* } } */


-- 
Alexandre Oliva, happy hacker            https://FSFLA.org/blogs/lxo/
   Free Software Activist                   GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity
Excluding neuro-others for not behaving ""normal"" is *not* inclusive

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

end of thread, other threads:[~2024-04-28  7:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10  9:02 xfail fetestexcept test - ppc always uses fcmpu Alexandre Oliva
2021-03-10 22:33 ` Joseph Myers
2021-03-11 15:03   ` Alexandre Oliva
2021-03-11 22:03     ` Joseph Myers
2024-04-22 10:00   ` [PATCH v2] " Alexandre Oliva
2024-04-23  8:57     ` Kewen.Lin
2024-04-28  7:35       ` Alexandre Oliva

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