[PATCH] D112896: [fir] Add fir.insert_on_range conversion

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 03:14:58 PDT 2021


clementval marked an inline comment as done.
clementval added inline comments.


================
Comment at: flang/lib/Optimizer/CodeGen/CodeGen.cpp:211
+    while (auto t = type.dyn_cast<mlir::LLVM::LLVMArrayType>()) {
+      dims.push_back(t.getNumElements());
+      type = t.getElementType();
----------------
mehdi_amini wrote:
> How do we guarantee that we have a static array type? This will crash with an IR with dynamic shape.
> 
> Right now the InsertOnRangeOp is defined as taking a fir_SequenceType which isn't restricted to static shapes.
This is actually smth that was missing in the verifier. D113092 adds the check directly in the verifier. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112896



More information about the llvm-commits mailing list