[flang-commits] [flang] [flang] Canonicalize fir.array_coor by pulling in embox/rebox. (PR #92858)
Razvan Lupusoru via flang-commits
flang-commits at lists.llvm.org
Tue May 28 15:07:48 PDT 2024
================
@@ -394,11 +394,17 @@ mlir::LogicalResult fir::ArrayCoorOp::verify() {
} else {
auto s = mlir::cast<fir::ShiftType>(shapeTy);
shapeTyRank = s.getRank();
+ // TODO: it looks like PreCGRewrite and CodeGen can support
+ // fir.shift with plain array reference, so we may consider
+ // removing this check.
if (!mlir::isa<fir::BaseBoxType>(getMemref().getType()))
return emitOpError("shift can only be provided with fir.box memref");
}
if (arrDim && arrDim != shapeTyRank)
return emitOpError("rank of dimension mismatched");
+ // TODO: support slicing with changing the numbder of dimensions,
+ // e.g. when array_coord represents an element access to array(:,1,:)
----------------
razvanlupusoru wrote:
array_coord -> array_coor
https://github.com/llvm/llvm-project/pull/92858
More information about the flang-commits
mailing list