[flang-commits] [flang] [Flang][HLFIR] Lower PACK(array, .TRUE.) to hlfir.reshape (PR #213603)
via flang-commits
flang-commits at lists.llvm.org
Thu Aug 13 02:46:01 PDT 2026
ejose02 wrote:
@vzakhari , Added hlfir.destroy for the temporary shape hlfir.expr after reshape inlining reads it.
On index: the extent product stays in index; the convert to default INTEGER is only when building the hlfir.reshape SHAPE operand (ReshapeOp::verify requires a Fortran integer array, not MLIR index). The copy loop then uses index for iteration and extent arithmetic.
We could relax the verifier and use !hlfir.expr<1xindex> for PACK’s shape. Would you prefer that in this PR, or leave as-is?
https://github.com/llvm/llvm-project/pull/213603
More information about the flang-commits
mailing list