This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81069] nvptx offloading: "-O1" execution test of "libgomp.oacc-fortran/nested-function-1.f90" timeout/FAIL
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 07 Jul 2017 16:48:39 +0000
- Subject: [Bug target/81069] nvptx offloading: "-O1" execution test of "libgomp.oacc-fortran/nested-function-1.f90" timeout/FAIL
- Auto-submitted: auto-generated
- References: <bug-81069-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81069
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
> The immediate reason for the failure is a bug in the ptx JIT compiler.
The minimal openacc program triggering this is:
...
program foo
integer :: a(2,2,4), k, kk, kkk
a = 2
!$acc parallel num_gangs(1) num_workers(1) vector_length(32)
!$acc loop gang(static:1)
do k=1,2
if (any(a(k,1:2,1:4).ne.2)) call abort
enddo
!$acc loop gang(static:1)
do k=1,2
if (any(a(k,1:2,1:4).ne.2)) call abort
enddo
!$acc end parallel
end program
...
With -mno-optimize we have:
...
@!%r52 bra.uni $L4;
bra $L3;
...
$L3:
@%r65 bra $L18;
mov.u32 %r23, %r64;
setp.ne.u32 %r59, %r30, 1;
$L18:
...
and with -moptimize we have:
...
@!%r52 bra.uni $L4;
@%r65 bra $L20;
bra $L3;
...
$L3:
mov.u32 %r23, %r64;
setp.ne.u32 %r59, %r30, 1;
$L20:
...
So, -moptimize has extended the sese region being neutered, by including the
branch to $L3.
In general the point of -moptimize is to combine individual blocks that need to
be neutered:
...
if !V0 goto L1;
A
L1:
if !V0 goto L2;
B
L2:
...
into neutering of a sese region containing the blocks:
...
if !V0 goto L2;
A
B
L2:
...
But in this case, we're extending the sese region being neutered to include a
branch that doesn't have to be neutered. I don't think there's a purpose in
doing that.