Skip to content

Commit a8ecb61

Browse files
committed
Make logic clearer
1 parent 08573d2 commit a8ecb61

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
@@ -1942,9 +1942,11 @@ convertOmpTaskOp(omp::TaskOp taskOp, llvm::IRBuilderBase &builder,
19421942
for (auto [privDecl, mlirPrivVar, blockArg, llvmPrivateVarAlloc] :
19431943
llvm::zip_equal(privateDecls, mlirPrivateVars, privateBlockArgs,
19441944
privateVarAllocations)) {
1945-
if (!llvmPrivateVarAlloc)
1945+
if (!privDecl.readsFromMold())
19461946
// to be handled inside the task
19471947
continue;
1948+
assert(llvmPrivateVarAlloc &&
1949+
"reads from mold so shouldn't have been skipped");
19481950

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

0 commit comments

Comments
 (0)