On 9/16/20 12:39 PM, Tobias Burnus wrote: > Hi Tom, hi Richard, hello all, > > @Richard: does it look okay from the ME side? > @Tom: Can you check which IFN_GOMP_SIMT should be > excluded with -ftracer? > > Pre-remark, I do not know much about SIMT – except that they > only appear with nvptx and somehow relate to lanes on the > GPU. > > In any case, as the testcase libgomp.fortran/pr66199-5.f90 shows, > if a basic block with GOMP_SIMT_VOTE_ANY in it is duplicated, > which happens via -ftracer for this testcase, the result is wrong. > > The testcase ignores all the loop work but via "lastprivate" takes > the upper loop bound (as assigned to the loop indices); instead of > the expected 32*32 = 1024, either some number (like 4 or very large > or negative) is returned. > > While GOMP_SIMT_VOTE_ANY fixes the issue for this testcase, I > have the feeling that at least GOMP_SIMT_LAST_LANE should be > not copied - but I might be wrong. > > Tom: Do you think GOMP_SIMT_LAST_LANE should be removed from > that list – or any of the following added as well? > GOMP_USE_SIMT, GOMP_SIMT_ENTER, GOMP_SIMT_ENTER_ALLOC, GOMP_SIMT_EXIT, > GOMP_SIMT_VF, GOMP_SIMT_ORDERED_PRED, GOMP_SIMT_XCHG_BFLY, > GOMP_SIMT_XCHG_IDX > > OK for mainline? >
You can commit the test-case bit as obvious. Thanks, - Tom > libgomp/ChangeLog: > > * testsuite/libgomp.fortran/pr66199-5.f90: Make stop codes unique. > diff --git a/libgomp/testsuite/libgomp.fortran/pr66199-5.f90 > b/libgomp/testsuite/libgomp.fortran/pr66199-5.f90 > index 9482f08..2627a81 100644 > --- a/libgomp/testsuite/libgomp.fortran/pr66199-5.f90 > +++ b/libgomp/testsuite/libgomp.fortran/pr66199-5.f90 > @@ -67,5 +67,5 @@ program main > if (f1 (0, 1024) /= 1024) stop 1 > if (f2 (0, 1024, 17) /= 1024 + (17 + 5 * 1023)) stop 2 > if (f3 (0, 32, 0, 32) /= 64) stop 3 > - if (f4 (0, 32, 0, 32) /= 64) stop 3 > + if (f4 (0, 32, 0, 32) /= 64) stop 4 > end