[flang-commits] [flang] [mlir] [flang][OpenACC] Attach `OpenACCLoopLocAttr` to `acc.loop` op (PR #208238)
Razvan Lupusoru via flang-commits
flang-commits at lists.llvm.org
Wed Jul 8 08:45:41 PDT 2026
================
@@ -182,4 +182,19 @@ subroutine data_end_locations(arr)
!CHECK-LABEL: acc.copyout
!CHECK-SAME: loc("{{.*}}locations.f90":181:11)
end subroutine
+
+ subroutine acc_kernel_with_loop_locations(arr)
+ real, dimension(10) :: arr
+ integer :: i
+
+ !$acc kernels
+ do i = 1, 10
+ arr(i) = arr(i) + 1
+ end do
+ !$acc end kernels
+ end subroutine
+
+! CHECK-LABEL: func.func @_QMacc_locationsPacc_kernel_with_loop_locations
+! CHECK: acc.loop
+! CHECK: } attributes {{.*}} loc(fused<#acc.loop_loc<loops = loc("{{[^"]*}}locations.f90":191:5)>>["{{[^"]*}}locations.f90":191:5])
----------------
razvanlupusoru wrote:
Worth a CHECK-NOT check that it does not have the "directive" location?
https://github.com/llvm/llvm-project/pull/208238
More information about the flang-commits
mailing list