[PATCH] D113092: [fir] Restrict array type on fir.insert_on_range

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 12:59:39 PDT 2021


mehdi_amini added inline comments.


================
Comment at: flang/lib/Optimizer/Dialect/FIROps.cpp:1392
+      fir::sequenceWithNonConstantShape(
+          op.seq().getType().cast<fir::SequenceType>()))
+    return op.emitOpError("must have constant shape and size");
----------------
Isn't this second check already covered by `hasDynamicSize`?
The code there starts with:
```
 if (auto arr = t.dyn_cast<fir::SequenceType>()) {
    if (sequenceWithNonConstantShape(arr))
      return true;
```

LG otherwise


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113092/new/

https://reviews.llvm.org/D113092



More information about the llvm-commits mailing list