This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PTX] more tests annotations


Hello,

On Thu, 26 May 2016, Nathan Sidwell wrote:

> Applied the attached to markup some more tests that PTX either crashes on or
> doesn't apply strict IEEE semantics to.  In one case it's about debug info
> that we don't emit.

> Index: gcc.dg/torture/c99-contract-1.c
> ===================================================================
> --- gcc.dg/torture/c99-contract-1.c	(revision 236702)
> +++ gcc.dg/torture/c99-contract-1.c	(working copy)
> @@ -2,6 +2,7 @@
>     expressions.  */
>  /* { dg-do run } */
>  /* { dg-options "-std=c99 -pedantic-errors" } */
> +/* { dg-skip-if "ptx only loosely follows IEEE" { "nvptx-*-*" } { "*" } { "" } } */

AFAIK both PTX and the underlying hardware implementation have good support
for IEEE semantics.  Here, either GCC emits fused multiply-add directly (at
-Os23), or it emits mul/add instructions without explicit rounding modifiers,
which allows PTX translation to contract the operations. In both cases that is
a GCC bug, correctly exposed by the testcase.

> Index: c-c++-common/torture/complex-sign-mixed-add.c
> ===================================================================
> --- c-c++-common/torture/complex-sign-mixed-add.c	(revision 236702)
> +++ c-c++-common/torture/complex-sign-mixed-add.c	(working copy)
> @@ -2,6 +2,7 @@
>     addition.  */
>  /* { dg-do run } */
>  /* { dg-options "-std=gnu99" { target c } } */
> +/* { dg-skip-if "ptx can elide zero additions" { "nvptx-*-*" } { "-O0" } { "" } } */

In light of the above I think this and the other similar case shouldn't be
disabled, not without deeper investigation.

Alexander


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]