[llvm-branch-commits] [flang] [flang] Lower REDUCE intrinsic for reduction op with args by value (PR #95353)

Valentin Clement バレンタイン クレメン via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 13 09:40:07 PDT 2024


================
@@ -5745,6 +5745,14 @@ IntrinsicLibrary::genReduce(mlir::Type resultType,
   int rank = arrayTmp.rank();
   assert(rank >= 1);
 
+  // Arguements to the reduction operation are passed by reference or value?
+  bool argByRef = true;
+  if (auto embox =
+          mlir::dyn_cast_or_null<fir::EmboxProcOp>(operation.getDefiningOp())) {
----------------
clementval wrote:

> Does REDUCE works with dummy procedure and procedure pointers? If so it would be good to add tests for those cases to ensure the pattern matching here works with them.

I'll check if this is supported and add proper test if it is. 

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


More information about the llvm-branch-commits mailing list