a152954ea4
Add pr85381*.c test-cases that are already passing without the fix for PR85381. Build and reg-tested on x86_64 with nvptx accelerator. 2018-12-19 Tom de Vries <tdevries@suse.de> * testsuite/libgomp.oacc-c-c++-common/pr85381-2.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr85381-3.c: New test. * testsuite/libgomp.oacc-c-c++-common/pr85381-4.c: New test. From-SVN: r267268
37 lines
1.0 KiB
C
37 lines
1.0 KiB
C
/* { 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
|
|
#pragma acc loop worker
|
|
for (v1 = 0; v1 < 20; v1 += 2)
|
|
;
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* Todo: Boths bar.syncs can be removed.
|
|
Atm we generate this dead code inbetween forked and joining:
|
|
|
|
mov.u32 %r28, %ntid.y;
|
|
mov.u32 %r29, %tid.y;
|
|
add.u32 %r30, %r29, %r29;
|
|
setp.gt.s32 %r31, %r30, 19;
|
|
@%r31 bra $L2;
|
|
add.u32 %r25, %r28, %r28;
|
|
mov.u32 %r24, %r30;
|
|
$L3:
|
|
add.u32 %r24, %r24, %r25;
|
|
setp.le.s32 %r33, %r24, 19;
|
|
@%r33 bra $L3;
|
|
$L2:
|
|
|
|
so the loop is not recognized as empty loop (which we detect by seeing if
|
|
joining immediately follows forked). */
|
|
/* { dg-final { scan-assembler-times "bar.sync" 2 } } */
|