On 9/27/23 19:31, Jeff Law wrote:


On 9/27/23 04:14, juzhe.zh...@rivai.ai wrote:
Since after removing mem-to-mem pattern.

program main
   integer, dimension(:,:), allocatable :: a, b
   integer, dimension(:), allocatable :: sh
   allocate (a(2,2))
   allocate (b(2,2))
   allocate (sh(3))
   a = 1
   b = cshift(a,sh)
end program main

This case will failed if we don't change mov pattern.
Can you expand on this?  You didn't indicate the failure mode or any analysis behind the failure.

jeff

Note that this Fortran code has no defined behavior, because the sh array isn't given any values ...

Kind regards,

--
Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands

Reply via email to