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

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 13 09:24:56 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())) {
----------------
jeanPerier 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.

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


More information about the llvm-branch-commits mailing list