This is because currently FIRRTL dialect doesn't have operations to create vector/bundle from elements. From that reason https://github.com/llvm/circt/pull/2459 uses concat+bitcast to create aggregate values. As a result, it loses information about structures. If there are firrtl.vector_create or firrtl.bundle_create, we should be able to emit something like:
Consider the following fir.
With MergeConnectionsPass introduced by https://github.com/llvm/circt/pull/2459, we will get something like:
This is because currently FIRRTL dialect doesn't have operations to create vector/bundle from elements. From that reason https://github.com/llvm/circt/pull/2459 uses concat+bitcast to create aggregate values. As a result, it loses information about structures. If there are
firrtl.vector_create
orfirrtl.bundle_create
, we should be able to emit something like: