================ @@ -227,11 +227,11 @@ void createHLFIRToFIRPassPipeline(mlir::PassManager &pm, bool enableOpenMP, hlfir::createOptimizedBufferization); } pm.addPass(hlfir::createLowerHLFIROrderedAssignments()); + if (enableOpenMP) + pm.addPass(flangomp::createLowerWorkshare()); ---------------- tblah wrote:
I think the workshare lowering pass assumes it runs after HLFIR bufferization. For example see the changes in the previous PR https://github.com/llvm/llvm-project/pull/104748. @ivanradanov please could you advise on this. Another approach would be to modify `createLowerHLFIRIntrinsics` so that it does not lower eligable `hlfir.sum` operations if they are inside of a workshare (a bit like how bufferization was modified in the PR above). https://github.com/llvm/llvm-project/pull/113082 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits