[flang] [llvm] [mlir] [flang][MLIR][OpenMP] make reduction by-ref toggled per variable (PR #92244)

Kiran Chandramohan via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 03:46:08 PDT 2024


================
@@ -1488,6 +1520,13 @@ LogicalResult ParallelOp::verify() {
   if (failed(verifyPrivateVarList(*this)))
     return failure();
 
+  auto reductionVarsByRef = getReductionVarsByref();
+  if (reductionVarsByRef &&
+      reductionVarsByRef->size() != getReductionVars().size())
+    return emitOpError()
+           << "expected as many reduction variable by reference attributes "
+              "as reduction variables";
+
----------------
kiranchandramohan wrote:

Should this be in `verifyReductionVarList`?

Is there a test for this error?

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


More information about the llvm-commits mailing list