[llvm-branch-commits] [flang] [llvm] [flang] - Call _FortranAAssignSimple instead of _FortranAAssign for intrinsic-type array assignments (PR #213705)
Michael Klemm via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Aug 5 07:47:35 PDT 2026
================
@@ -145,7 +149,26 @@ class AssignOpConversion : public mlir::OpRewritePattern<hlfir::AssignOp> {
// type after the assignment.
fir::runtime::genAssignPolymorphic(builder, loc, to, from);
} else {
- fir::runtime::genAssign(builder, loc, to, from);
+ // Use simple path for allocatable with trivial types (scalars and
+ // arrays) Only use Simple path when ranks match. Only use Simple path
+ // for non-volatile - volatile needs memory ordering NOTE: For
+ // allocatables, we assume contiguity - allocatable whole-array
+ // assignments
+ // are always contiguous. Strided sections of allocatables go
+ // through different path.
----------------
mjklemm wrote:
```suggestion
// allocatables, we assume contiguity - allocatable whole-array
// assignments are always contiguous. Strided sections of
// allocatables go through different path.
```
https://github.com/llvm/llvm-project/pull/213705
More information about the llvm-branch-commits
mailing list