Skip to content

Commit 682d511

Browse files
committed
Make logic clearer
1 parent 7391b7b commit 682d511

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1954,9 +1954,11 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder,
19541954
for (auto [privDecl, mlirPrivVar, blockArg, llvmPrivateVarAlloc] :
19551955
llvm::zip_equal(privateDecls, mlirPrivateVars, privateBlockArgs,
19561956
privateVarAllocations)) {
1957-
if (!llvmPrivateVarAlloc)
1957+
if (!privDecl.readsFromMold())
19581958
// to be handled inside the task
19591959
continue;
1960+
assert(llvmPrivateVarAlloc &&
1961+
"reads from mold so shouldn't have been skipped");
19601962

19611963
llvm::Expected<llvm::Value *> privateVarOrErr =
19621964
initPrivateVar(builder, moduleTranslation, privDecl, mlirPrivVar,

0 commit comments

Comments
 (0)