[nvptx] Don't emit barriers for empty loops -- test-cases
Add test-cases for PR85381. 2019-01-12 Tom de Vries <tdevries@suse.de> PR target/85381 * testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr85381.c: New test. From-SVN: r267893
This commit is contained in:
parent
2cb7a501ab
commit
b39e4366a2
|
@ -1,3 +1,9 @@
|
|||
2019-01-12 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
PR target/85381
|
||||
* testsuite/libgomp.oacc-c-c++-common/pr85381-5.c: New test.
|
||||
* testsuite/libgomp.oacc-c-c++-common/pr85381.c: New test.
|
||||
|
||||
2019-01-12 Tom de Vries <tdevries@suse.de>
|
||||
|
||||
* testsuite/libgomp.oacc-c-c++-common/vred2d-128.c: New test.
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/* { dg-additional-options "-save-temps" } */
|
||||
/* { dg-do run { target openacc_nvidia_accel_selected } }
|
||||
{ dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
|
||||
|
||||
#define n 1024
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
#pragma acc parallel vector_length(128)
|
||||
{
|
||||
#pragma acc loop vector
|
||||
for (int i = 0; i < n; i++)
|
||||
;
|
||||
|
||||
#pragma acc loop vector
|
||||
for (int i = 0; i < n; i++)
|
||||
;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-not "bar.sync" } } */
|
|
@ -0,0 +1,18 @@
|
|||
/* { dg-additional-options "-save-temps" } */
|
||||
/* { dg-do run { target openacc_nvidia_accel_selected } }
|
||||
{ dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
int v1;
|
||||
|
||||
#pragma acc parallel vector_length (128)
|
||||
#pragma acc loop vector
|
||||
for (v1 = 0; v1 < 20; v1 += 2)
|
||||
;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-not "bar.sync" } } */
|
Loading…
Reference in New Issue