[flang-commits] [flang] [llvm] [flang] Support static-unit array slices in FIR LoopVersioning (PR #222723)
via flang-commits
flang-commits at lists.llvm.org
Tue Sep 22 03:21:48 PDT 2026
Ritanya-B-Bharadwaj wrote:
Is this pointer-array case covered by this PR, or is support planned in a follow-up?
```
module pointer_stride_repro
use iso_fortran_env, only: real64
implicit none
contains
subroutine accumulate(dst, x, y, z)
complex(real64), pointer, intent(inout) :: dst(:)
complex(real64), pointer, intent(in) :: x(:), y(:), z(:)
dst(:) = dst(:) + x(:) * y(:) * z(:)
end subroutine
end module
flang -O3 -ffast-math -fstack-arrays -fversion-loops-for-stride -Rpass=loop-vectorize -S -emit-llvm repro.f90 -o repro.ll
```
On main, this reports vectorization, but the vector path requires byte strides of 1 . Contiguous elements have a byte stride of 16 , so they take the scalar fallback.
https://github.com/llvm/llvm-project/pull/222723
More information about the flang-commits
mailing list