Fix dshl zero-width shift behavior (backport #2339) (#2340)
* Fix dshl zero-width shift behavior (#2339) * Fix dshl zero-width shift behavior Add a special case for dshl handling in the ZeroWidths pass. If one expression is shifted by a second, zero-width expression, just return the first expression. This prevents a bug where the width will incorrectly expand due to zero-widths introducing a 1-bit zero expression. Signed-off-by:Schuyler Eldridge <schuyler.eldridge@sifive.com> * fixup! Fix dshl zero-width shift behavior (cherry picked from commit cc80c631 ) # Conflicts: # src/main/scala/firrtl/passes/ZeroWidth.scala * fixup! Fix dshl zero-width shift behavior (#2339) Co-authored-by:
Schuyler Eldridge <schuyler.eldridge@sifive.com>
parent
13aac7f5
Please register or sign in to comment