[llvm-branch-commits] [mlir] [flang] [mlir][flang][openmp] Rework wsloop reduction operations (PR #80019)

Tom Eccles via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Feb 5 05:53:29 PST 2024


================
@@ -398,11 +400,39 @@ struct ParallelOpLowering : public OpRewritePattern<scf::ParallelOp> {
     // Replace the reduction operations contained in this loop. Must be done
     // here rather than in a separate pattern to have access to the list of
     // reduction variables.
+    unsigned int reductionIndex = 0;
     for (auto [x, y] :
          llvm::zip_equal(reductionVariables, reduce.getOperands())) {
----------------
tblah wrote:

nit: you could add `ompReductionDecls` to the `llvm::zip_equal` so that the loop handles the iteration.

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


More information about the llvm-branch-commits mailing list