https://github.com/abhinavgaba updated
https://github.com/llvm/llvm-project/pull/170578
>From 5a840934ddc9fb897a25ea0f90322e3ef20c5482 Mon Sep 17 00:00:00 2001
From: Abhinav Gaba
Date: Mon, 1 Dec 2025 14:20:15 -0800
Subject: [PATCH 1/3] [OpenMP][Clang] Parsing/Sema support for
`use_device_ptr(
https://github.com/abhinavgaba created
https://github.com/llvm/llvm-project/pull/170578
Depends on #169603.
This is the `use_device_ptr` counterpart of #168905.
With OpenMP 6.1, a `fallback` modifier can be specified on the
`use_device_ptr` clause to control the behavior when a pointer
https://github.com/abhinavgaba commented:
The updated test looks good. Thanks for the changes!
On an unrelated note, for future reference, to update a PR locally, it's
usually better to do `git fetch origin main && git merge origin/main && git
push origin HEAD`.
Doing a `rebase` followed by a
@@ -0,0 +1,46 @@
+! Validate that a device pointer obtained via omp_get_mapped_ptr can be used
+! inside a TARGET region with the is_device_ptr clause.
+! REQUIRES: flang, amdgcn-amd-amdhsa
+
+! RUN: %libomptarget-compile-fortran-run-and-check-generic
+
+program is_device_ptr_targ
@@ -0,0 +1,79 @@
+! Validate that a device pointer allocated via OpenMP runtime APIs can be
+! consumed by a TARGET region using the is_device_ptr clause.
+! REQUIRES: flang, amdgcn-amd-amdhsa
+! UNSUPPORTED: nvptx64-nvidia-cuda
+! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
+! UNSUPPORT
@@ -0,0 +1,79 @@
+! Validate that a device pointer allocated via OpenMP runtime APIs can be
+! consumed by a TARGET region using the is_device_ptr clause.
+! REQUIRES: flang, amdgcn-amd-amdhsa
+! UNSUPPORTED: nvptx64-nvidia-cuda
+! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
+! UNSUPPORT