[flang-commits] [flang] [llvm] [Flang][OpenMP] Additional global address space modifications for device (PR #119585)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Mon Aug 11 03:40:14 PDT 2025


================
@@ -7542,7 +7548,9 @@ static Expected<Function *> createOutlinedFunction(
     // preceding mapped arguments that refer to the same global that may be
     // seperate segments. To prevent this, we defer global processing until all
     // other processing has been performed.
-    if (isa<GlobalValue>(Input)) {
+    if (llvm::isa<llvm::GlobalValue>(removeASCastIfPresent(Input)) ||
+        llvm::isa<llvm::GlobalObject>(removeASCastIfPresent(Input)) ||
+        llvm::isa<llvm::GlobalVariable>(removeASCastIfPresent(Input))) {
----------------
skatrak wrote:

```suggestion
    if (llvm::isa<llvm::GlobalValue, llvm::GlobalObject, llvm::GlobalVariable>(removeASCastIfPresent(Input))) {
```

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


More information about the flang-commits mailing list