https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126964
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #65515|0 |1
is obsolete| |
--- Comment #17 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Created attachment 65545
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65545&action=edit
Updated middle-end fix with commit log
This patch updated by claude after I asked it to clarify. I also prompted the
following with explanation:
Me---
The commit message is referencing some variables based on some code that was
compiled. Show me this code
Claude---
That's nf.f90 from ~/dev/claude-tmp/pr126964_residual, which I turned into the
new test — the message's span.8_33, stride.1_21 and == 16 all come from
compiling this at -O3:
module m
contains
subroutine normalise (ft, f, n1, n2)
complex(8), dimension(:,:,:), target :: ft
real(8) :: f
integer :: n1, n2, a, b
complex(8), dimension(:), pointer :: ft_ab
do b = 1, n2
do a = 1, n1
ft_ab => ft(:,a,b)
ft_ab(:) = ft_ab(:) * f
end do
end do
end subroutine
end module
ft is a COMPLEX(8) TARGET assumed-shape dummy, so it stays span addressed
after the v3 front-end work, and 16 is its element size.
Unpatched, -fdump-tree-lversion-details says:
nf.f90:3:3: note: cannot tell whether span.8_33 is the innermost dimension
Patched:
nf.f90:3:3: note: span.8_33 is the element spacing rather than a stride; the
stride is stride.1_21
nf.f90:3:3: note: want to version containing loop for when span.8_33 == 16
nf.f90:3:3: note: want to version containing loop for when stride.1_21 == 1
nf.f90:8:10: optimized: versioned this loop for when certain strides are 1
and the condition it builds, from the same dump:
<bb 29> [local count: 1271944]:
_59 = stride.1_21 != 1;
_61 = span.8_33 != 16;
_107 = _59 | _61;
if (_107 != 0)