Thomas Schwinge <[email protected]> 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