[flang-commits] [flang] [mlir] [flang][OpenMP] Lower task reduction modifier (PR #205124)

Sairudra More via flang-commits flang-commits at lists.llvm.org
Mon Jun 22 09:53:14 PDT 2026


================
@@ -2125,6 +2173,11 @@ convertOmpSections(Operation &opInst, llvm::IRBuilderBase &builder,
 
   builder.restoreIP(*afterIP);
 
+  // Close the task-reduction scope before combining the worksharing copies.
+  if (isTaskReductionMod)
+    emitTaskReductionModifierFini(/*isWorksharing=*/true, builder,
+                                  moduleTranslation);
----------------
Saieiei wrote:

Fixed in the latest push by moving the task-reduction modifier init after the empty-sections early return so init/fini stay balanced. https://github.com/llvm/llvm-project/compare/a39d2890b203b53117502c620e8fd37f9684fa51..5ccce0868fb556e5eea229e46c9717c08c0e22d9

https://github.com/llvm/llvm-project/pull/205124


More information about the flang-commits mailing list