[flang][hlfir] Fixed hlfir.assign codegen for polymorphic LHS.
authorSlava Zakharin <szakharin@nvidia.com>
Fri, 28 Apr 2023 16:07:23 +0000 (09:07 -0700)
committerSlava Zakharin <szakharin@nvidia.com>
Fri, 28 Apr 2023 16:10:41 +0000 (09:10 -0700)
commit8c8fe11916b03887f89f04b216e0044f2a9cb505
tree03e4039471375e026222cb7cb1649f058a277a64
parent6f01cb91d763f740339683e1bde029e9f9f3bdf4
[flang][hlfir] Fixed hlfir.assign codegen for polymorphic LHS.

The RHS cannot be casted to the LHS type, when LHS is polymorphic.
With this change we will use the RHS type for emboxing with special
hadling for i1 type.

I created https://github.com/llvm/llvm-project/issues/62419 for the
AllocaOp generated during HLFIRtoFir conversion.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D149392
flang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
flang/test/HLFIR/assign-codegen.fir