[clang] [openmp] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Fri May 16 09:08:38 PDT 2025
================
@@ -5200,6 +5460,18 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc,
CGF.EmitBranch(DefaultBB);
CGF.EmitBlock(DefaultBB, /*IsFinished=*/true);
+ if (Options.IsPrivateVarReduction) {
+ if (LHSExprs.empty() || Privates.empty() || ReductionOps.empty())
+ return;
+ if (LHSExprs.size() != Privates.size() ||
+ LHSExprs.size() != ReductionOps.size())
+ return;
----------------
alexey-bataev wrote:
I mean better to have asserts here instead of early exits. These early exits must be deleted
https://github.com/llvm/llvm-project/pull/134709
More information about the cfe-commits
mailing list