================ @@ -5315,6 +5320,46 @@ convertTargetOpsInNest(Operation *op, llvm::IRBuilderBase &builder, return WalkResult::interrupt(); return WalkResult::skip(); } + + // Non-target ops might nest target-related ops, therefore, we + // translate them as non-OpenMP scopes. Translating them is needed by + // nested target-related ops since they might need LLVM values defined + // in their parent non-target ops. + if (isa<omp::OpenMPDialect>(oper->getDialect()) && + oper->getParentOfType<LLVM::LLVMFuncOp>() && + !oper->getRegions().empty()) { ---------------- ergawy wrote:
Can you provide an example where this might happen? https://github.com/llvm/llvm-project/pull/130078 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits