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: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite


On Fri, Oct 17, 2014 at 07:29:26PM +0400, Ilya Verbin wrote:
> On 17 Oct 17:18, Jakub Jelinek wrote:
> > On Fri, Oct 17, 2014 at 07:17:31PM +0400, Ilya Verbin wrote:
> > > On 17 Oct 17:10, Jakub Jelinek wrote:
> > > > Well, there is no need to remove them, just the " || (f && !omp_is_initial_device ())"
> > > > should be dropped from target regions without device (d) on them.
> > > > Where there is no f && guard, the condition should stay.
> > > > Do you agree?
> > > 
> > > Yes, should I re-post the patch?
> > 
> > Guess just the target-7.c patch is enough, to make sure we agree on the same
> > thing.
> 
> Here it is:

LGTM, thanks.
> 
> diff --git a/libgomp/testsuite/libgomp.c/target-7.c b/libgomp/testsuite/libgomp.c/target-7.c
> index 90de6c5..0fe6150 100644
> --- a/libgomp/testsuite/libgomp.c/target-7.c
> +++ b/libgomp/testsuite/libgomp.c/target-7.c
> @@ -18,7 +18,7 @@ foo (int f)
>    if (omp_get_level () != 0 || !omp_is_initial_device ())
>      abort ();
>    #pragma omp target if (v <= 1)
> -  if (omp_get_level () != 0 || (f && !omp_is_initial_device ()))
> +  if (omp_get_level () != 0)
>      abort ();
>    #pragma omp target device (d) if (v <= 1)
>    if (omp_get_level () != 0 || (f && !omp_is_initial_device ()))
> @@ -30,7 +30,7 @@ foo (int f)
>    if (omp_get_level () != 0 || !omp_is_initial_device ())
>      abort ();
>    #pragma omp target if (1)
> -  if (omp_get_level () != 0 || (f && !omp_is_initial_device ()))
> +  if (omp_get_level () != 0)
>      abort ();
>    #pragma omp target device (d) if (1)
>    if (omp_get_level () != 0 || (f && !omp_is_initial_device ()))
> @@ -59,7 +59,7 @@ foo (int f)
>    #pragma omp target data if (v <= 1) map (to: h)
>    {
>      #pragma omp target if (v <= 1)
> -    if (omp_get_level () != 0 || (f && !omp_is_initial_device ()) || h++ != 8)
> +    if (omp_get_level () != 0 || h++ != 8)
>        abort ();
>      #pragma omp target update if (v <= 1) from (h)
>    }
> @@ -87,7 +87,7 @@ foo (int f)
>    #pragma omp target data if (1) map (to: h)
>    {
>      #pragma omp target if (1)
> -    if (omp_get_level () != 0 || (f && !omp_is_initial_device ()) || h++ != 12)
> +    if (omp_get_level () != 0 || h++ != 12)
>        abort ();
>      #pragma omp target update if (1) from (h)
>    }

	Jakub


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