[Mlir-commits] [mlir] [mlir][OpenMP] implement SIMD reduction (PR #146671)

Tom Eccles llvmlistbot at llvm.org
Wed Jul 2 08:04:22 PDT 2025


================
@@ -2872,11 +2883,27 @@ convertOmpSimd(Operation &opInst, llvm::IRBuilderBase &builder,
   if (handleError(afterAllocas, opInst).failed())
     return failure();
 
+  if (failed(allocReductionVars(simdOp, reductionArgs, builder,
+                                moduleTranslation, allocaIP, reductionDecls,
+                                privateReductionVariables, reductionVariableMap,
+                                deferredStores, isByRef)))
+    return failure();
+
   if (handleError(initPrivateVars(builder, moduleTranslation, privateVarsInfo),
                   opInst)
           .failed())
     return failure();
 
+  // TODO: no call to copyFirstPrivateVars?
----------------
tblah wrote:

Ahh it turns out firstprivate isn't listed as an allowed clause for simd. I will update the comment.

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


More information about the Mlir-commits mailing list