[all-commits] [llvm/llvm-project] 0f439f: [flang] Fix hlfir.as_expr codegen for polymorphic ...
jeanPerier via All-commits
all-commits at lists.llvm.org
Wed Feb 7 01:50:24 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0f439f374f9cec73466c5166b9a8764214a74069
https://github.com/llvm/llvm-project/commit/0f439f374f9cec73466c5166b9a8764214a74069
Author: jeanPerier <jperier at nvidia.com>
Date: 2024-02-07 (Wed, 07 Feb 2024)
Changed paths:
M flang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
A flang/test/HLFIR/as_expr-codegen-polymorphic.fir
M flang/test/HLFIR/bufferize-poly-expr.fir
Log Message:
-----------
[flang] Fix hlfir.as_expr codegen for polymorphic entities (#80824)
https://github.com/llvm/llvm-project/pull/80683 revealed that
hlfir.as_expr was propagating the temporary buffer for polymorphic
values as an allocatable while codegen later expects to be working with
fir.box/fir.class but not fir.ref<box/class> when processing the
operations using the hlfir.as_expr result.
Dereference the temporary allocatable as soon as it is created.
More information about the All-commits
mailing list