[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 13:00:15 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");
----------------
mehdi_amini wrote:
> 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
Oh also please update the doc for the op in the ODS definition 


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