Skip to content

Commit

Permalink
[flang][hlfir] get shape from HLFIR expr using hlfir.shape_of
Browse files Browse the repository at this point in the history
Depends On: D146830

Differential Revision: https://reviews.llvm.org/D146831
  • Loading branch information
tblah committed Apr 17, 2023
1 parent 80e45a7 commit 08b09d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Builder/HLFIRTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ mlir::Value hlfir::genShape(mlir::Location loc, fir::FirOpBuilder &builder,
return builder.create<fir::ShapeOp>(loc, s.getExtents());
}
if (entity.getType().isa<hlfir::ExprType>())
TODO(loc, "get shape from HLFIR expr without producer holding the shape");
return builder.create<hlfir::ShapeOfOp>(loc, entity.getBase());
// There is no shape lying around for this entity. Retrieve the extents and
// build a new fir.shape.
return builder.create<fir::ShapeOp>(loc,
Expand Down

0 comments on commit 08b09d7

Please sign in to comment.