This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,testsuite] fix gcc.dg/vect/vect-{82,83}.c
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Nathan Froyd <froydnj at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 Mar 2009 17:19:28 -0700
- Subject: Re: [PATCH,testsuite] fix gcc.dg/vect/vect-{82,83}.c
- References: <20090311194023.GT31214@codesourcery.com>
- Reply-to: janis187 at us dot ibm dot com
On Wed, 2009-03-11 at 12:40 -0700, Nathan Froyd wrote:
> vect.exp has this bit of code in it for powerpc targets:
>
> lappend DEFAULT_VECTCFLAGS "-maltivec"
> if [check_vmx_hw_available] {
> set dg-do-what-default run
> } else {
> if [is-effective-target ilp32] {
> # Specify a cpu that supports VMX for compile-only tests.
> lappend DEFAULT_VECTCFLAGS "-mcpu=970"
> }
> set dg-do-what-default compile
> }
>
> On 32-bit targets that don't have VMX hardware, we'll compile with
> -mcpu=970, which frees up the compiler to use 64-bit instructions where
> appropriate. vect-{82,83}.c, however, are specified to be runnable
> testcases. They also use 'long long unsigned int' variables, which get
> stored into via 'std' instructions, since we're compiling for a 64-bit
> CPU.
>
> These instructions would normally throw SIGILL and cause the testcase to
> exit cleanly...except on bare-metal targets, signal handlers don't work
> so well. This causes spurious execution failures.
>
> The solution is to remove the `dg-do run' directives from these
> testcases, as most other vect testcases don't have such directives,
> preferring to use dg-do-what-default in vect.exp instead.
>
> Tested on powerpc-eabi. OK to commit?
> -/* { dg-do run { target powerpc*-*-* } } */
> /* { dg-require-effective-target vect_int } */
By removing the dg-do directive you're also losing the restriction
that the test only run on powerpc*-*-*. You can combine the two
restrictions by replacing both test directives with
/* { dg-skip-if "" { ! { powerpc*-*-* && vect_int } } { "*" } { "" } } */
although you should replace the empty comment with a real one.
That change is OK.
Janis