[llvm-branch-commits] [flang] [llvm] [mlir] [OpenMP][MLIR] Modify OpenMP Dialect lowering to support attach mapping (PR #179023)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Apr 6 08:28:47 PDT 2026


================
@@ -0,0 +1,48 @@
+! This checks that we can specify ref_ptee and ref_ptr, not encounter
+! an error and correctly map data to and from device.
+! REQUIRES: flang, amdgpu
+
+! RUN: %libomptarget-compile-fortran-generic -fopenmp-version=61
+! RUN: env LIBOMPTARGET_TREAT_ATTACH_AUTO_AS_ALWAYS=0  %libomptarget-run-generic 2>&1 | %fcheck-generic
+program main
+    implicit none
+    integer,  pointer :: map_ptr(:)
+    integer, target :: b(10)
+    integer :: index
+
+    map_ptr => b
+
+    ! Should have auto attach applied if my reading is
----------------
skatrak wrote:

Nit: I think the "if my reading is correct" part is not necessary to state explicitly.

https://github.com/llvm/llvm-project/pull/179023


More information about the llvm-branch-commits mailing list