Index: lib/CodeGen/CGOpenMPRuntime.cpp =================================================================== --- lib/CodeGen/CGOpenMPRuntime.cpp +++ lib/CodeGen/CGOpenMPRuntime.cpp @@ -7952,6 +7952,10 @@ MapValuesArrayTy &Pointers, MapValuesArrayTy &Sizes, MapFlagsArrayTy &Types) const { + // If using unified memory, no need to do the mappings. + if (CGF.CGM.getOpenMPRuntime().hasUnifiedAddressingSupport()) + return; + // Map other list items in the map clause which are not captured variables // but "declare target link" global variables. for (const auto *C : this->CurDir.getClausesOfKind()) {