circt
circt copied to clipboard
[FIRRTL][LowerTypes] Keep the order of bundle fields in lowered `cat`
Fixes #6360.
The first fix #6339 (reverted) caused a regression reported in #6360.
In the first try, I forgot to handle the bit extract operation that follows it, the PR tries to fix it again without regression.
Credit: Thanks to @uenoku for the hint (https://github.com/llvm/circt/issues/6360#issuecomment-1789251252)
~~If I understand correctly, it doesn't seem possible to keep the old order specifically for Vector, since a Bundle or Vector can always bitcast to a UInt, in which case we've lost the type used to determine which order should be used. @uenoku What do you think about this?~~ Looks like I just misunderstood something.
This PR also reverses the current order of all bits extract, I'm not very sure if this is an acceptable change? (Will it break something?)
Gently ping @uenoku. Any updates on internal checks? Are there any further issues with this PR that need to be fixed?