Skip to content

Commit 9baebf1

Browse files
committed
Make logic clearer
1 parent 5c60c8f commit 9baebf1

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
@@ -1917,9 +1917,11 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder,
19171917
for (auto [privDecl, mlirPrivVar, blockArg, llvmPrivateVarAlloc] :
19181918
llvm::zip_equal(privateDecls, mlirPrivateVars, privateBlockArgs,
19191919
privateVarAllocations)) {
1920-
if (!llvmPrivateVarAlloc)
1920+
if (!privDecl.readsFromMold())
19211921
// to be handled inside the task
19221922
continue;
1923+
assert(llvmPrivateVarAlloc &&
1924+
"reads from mold so shouldn't have been skipped");
19231925

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

0 commit comments

Comments
 (0)