[flang-commits] [flang] [flang][NFC] Engineering option for optimizing allocatable assignments. (PR #119936)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Mon Dec 16 08:22:16 PST 2024


================
@@ -462,16 +474,20 @@ ElementalAssignBufferization::findMatch(hlfir::ElementalOp elemental) {
   // the incoming expression
   match.array = match.assign.getLhs();
   mlir::Type arrayType = mlir::dyn_cast<fir::SequenceType>(
-      fir::unwrapPassByRefType(match.array.getType()));
-  if (!arrayType)
+      hlfir::getFortranElementOrSequenceType(match.array.getType()));
+  if (!arrayType) {
----------------
vzakhari wrote:

Thanks for the review, Tom! There is a `dyn_cast<fir::SequenceType>` above, which would set `arrayType` to null if it was not an array, so I think it should be okay.  Anyway, I will move this change into another PR.

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


More information about the flang-commits mailing list