https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82450

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2017-10-07 00:00:00         |2025-9-28

--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The original test case is now (with -O3) done as

        pcmpeqd %xmm0, %xmm0
        psrld   $31, %xmm0
        movups  %xmm0, (%rdi)
        movups  %xmm0, 16(%rdi)
        movups  %xmm0, 32(%rdi)
        movups  %xmm0, 48(%rdi)
        movups  %xmm0, 64(%rdi)
        movups  %xmm0, 80(%rdi)
        movups  %xmm0, 96(%rdi)
        movups  %xmm0, 112(%rdi)
        movups  %xmm0, 128(%rdi)
        movups  %xmm0, 144(%rdi)
        movups  %xmm0, 160(%rdi)
        movups  %xmm0, 176(%rdi)
        movups  %xmm0, 192(%rdi)
        movups  %xmm0, 208(%rdi)
        movups  %xmm0, 224(%rdi)
        movups  %xmm0, 240(%rdi)
        movups  %xmm0, 256(%rdi)
        movups  %xmm0, 272(%rdi)
        movups  %xmm0, 288(%rdi)
        movups  %xmm0, 304(%rdi)
        movups  %xmm0, 320(%rdi)
        movups  %xmm0, 336(%rdi)
        movups  %xmm0, 352(%rdi)
        movups  %xmm0, 368(%rdi)
        movups  %xmm0, 384(%rdi)
        ret

:-)

Note that the Fortran test cases from comment #7 should have intent(inout),
so they should be

subroutine foo(a)
  implicit none
  real, dimension(:,:), contiguous, intent(inout) :: a
  a = a + 1.
end subroutine foo

subroutine bar(a, m, n)
  implicit none
  integer, intent(in) :: m,n
  real, dimension(m,n), intent(inout) :: a
  integer :: i,j
  do j=1,n
     do i=1,m
        a(i,j) = a(i,j) + 1.
     end do
  end do
end subroutine bar

These still have two nested loops.

Reply via email to