[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
Mon May 12 07:38:41 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:
It is better to have these as asserts, not checks
https://github.com/llvm/llvm-project/pull/134709
More information about the cfe-commits
mailing list