This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC testsuite] Fix PR64850, tweak acc_on_device* tests
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: thomas at codesourcery dot com
- Cc: jakub at redhat dot com, gcc-patches at gcc dot gnu dot org, schwab at linux-m68k dot org, danglin at gcc dot gnu dot org
- Date: Thu, 12 Feb 2015 09:23:34 +0900 (JST)
- Subject: Re: [RFC testsuite] Fix PR64850, tweak acc_on_device* tests
- Authentication-results: sourceware.org; auth=none
- References: <87iog6a0am dot fsf at igel dot home> <87iofit3on dot fsf at kepler dot schwinge dot homeip dot net> <87twyukm8y dot fsf at kepler dot schwinge dot homeip dot net>
Thomas Schwinge <thomas@codesourcery.com> wrote:
> To resolve the immediate problem: is my approval "enough" for Kaz to
> commit the patch, or does that need a "more authoritative approval"?
I'd like to commit my patch as a "quick fix" in a few days if
no one objects.
> I think I copied this approach from some other test case (but don't
> remember which). In the current set of tests, we need to verify that the
> acc_on_device library function is called 0, 1, or 4 times (see below).
>
> For example, for gcc.dg/goacc/acc_on_device-1.c we'Ve got:
>
> $ build-gcc/gcc/xgcc -Bbuild-gcc/gcc/ source-gcc/gcc/testsuite/gcc.dg/goacc/acc_on_device-1.c -fopenacc -O -std=c89 -Wno-implicit-function-declaration -S -fpic -mcmodel=large -o acc_on_device-1.s
> $ grep acc_on_device < acc_on_device-1.s
> .file "acc_on_device-1.c"
> movabsq $acc_on_device@PLTOFF, %rdx
> movabsq $acc_on_device@PLTOFF, %rdx
> movabsq $acc_on_device@PLTOFF, %rdx
> movabsq $acc_on_device@PLTOFF, %rdx
>
> Isn't it even more fragile to scan here for acc_on_device being called
> four times compared to the -fdump-rtl-expand dump? Or should I split up
> the four tests into four separate files? (I guess I lack knowledge of
> the best approach for doing such a thing in the GCC testsuite.)
Another example with the asm output of m68k compiler:
lea acc_on_device,%a2
jsr (%a2)
...
jsr (%a2)
...
jsr (%a2)
...
jsr (%a2)
for -fopenacc -O -fno-openacc acc_on_device-1.c. It seems that
getting the number of calls for the specific function isn't easy
with the asm output on some targets.
Regards,
kaz