This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PTX] more tests annotations
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Joseph Myers <joseph at codesourcery dot com>
- Date: Thu, 26 May 2016 20:16:11 +0300 (MSK)
- Subject: Re: [PTX] more tests annotations
- Authentication-results: sourceware.org; auth=none
- References: <4886f0ca-c7ca-7270-8301-7818a4406f4a at acm dot org>
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