Fix select assignment expansion (#6757)

This commit is contained in:
Geza Lore
2025-12-05 10:07:53 -05:00
committed by GitHub
parent df7726c40d
commit e2c05ae15e
5 changed files with 38 additions and 3 deletions
+2 -1
View File
@@ -728,7 +728,8 @@ class ExpandVisitor final : public VNVisitor {
UINFO(8, " ASSIGNSEL(varlsb,wide,1bit) " << nodep);
AstNodeExpr* const rhsp = nodep->rhsp()->unlinkFrBack();
AstNodeExpr* const destp = lhsp->fromp()->unlinkFrBack();
AstNodeExpr* oldvalp = newWordSelBit(lfl, destp, lhsp->lsbp());
AstNodeExpr* oldvalp
= newWordSelBit(lfl, destp->cloneTreePure(false), lhsp->lsbp());
fixCloneLvalue(oldvalp);
if (!ones) {
oldvalp = new AstAnd{