Closed youngar closed 2 years ago
I think this might have been fixed here: https://github.com/llvm/circt/blob/31511a79f153c7229ce7121ec0c41ffa03229da0/lib/Dialect/FIRRTL/Transforms/IMConstProp.cpp#L631
maybe not. It does do the right thing, but canonicalize could be smarter.
In the following example, I would expect both cover statements to be removed by constant propagation. Instead, only the first cover, which is fed by a wire, is removed.
The wire's cover is removed due to a canonicalizer which forwards constants "around" a name-preserved wire which doesn't exist for nodes:
The first cover statement is later removed after lowering to the SV dialect.