circt
circt copied to clipboard
[FIRRTL][LowerTypes] Canonicalize the CatPrimOp
This is a followup to https://github.com/llvm/circt/pull/3982
Instead of creating the CatPrimOp while iterating over the users of an aggregate value, this commit delays it after all the Subfield and Subindex ops have been replaced. This ensures that any constant assignment to the individual fields can be folded by the CatPrimOp. This has a big impact when each field of a vector is assigned a constant.