Fix regression due to early constant folding in +: and -: (#2338)

This commit is contained in:
Geza Lore
2020-05-18 18:46:00 +01:00
committed by GitHub
parent 0f7677480f
commit d20a4db773
2 changed files with 16 additions and 0 deletions
+1
View File
@@ -458,6 +458,7 @@ private:
UINFO(6, "SELPLUS/MINUS " << nodep << endl);
// Below 2 lines may change nodep->widthp()
if (debug() >= 9) nodep->dumpTree(cout, "--SELPM0: ");
V3Width::widthParamsEdit(nodep->rhsp()); // constifyEdit doesn't ensure widths finished
V3Const::constifyEdit(nodep->rhsp()); // May relink pointed to node, ok if not const
V3Const::constifyParamsEdit(nodep->thsp()); // May relink pointed to node
checkConstantOrReplace(nodep->thsp(), "Width of :+ or :- bit extract isn't a constant");