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

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


================
@@ -1668,6 +1709,13 @@ LogicalResult WsloopOp::verify() {
       return emitError() << "only supported nested wrapper is 'omp.simd'";
   }
 
+  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 flang-commits mailing list