Support impure expressions in inside (#6562)

This commit is contained in:
Igor Zaworski
2025-10-17 09:08:57 -04:00
committed by GitHub
parent af2327aaf4
commit 5c412e5e81
6 changed files with 157 additions and 47 deletions
+2 -1
View File
@@ -476,7 +476,8 @@ class CaseVisitor final : public VNVisitor {
condp = new AstConst{itemp->fileline(), AstConst::BitFalse{}};
} else if (AstInsideRange* const irangep = VN_CAST(icondp, InsideRange)) {
// Similar logic in V3Width::visit(AstInside)
condp = irangep->newAndFromInside(cexprp, irangep->lhsp()->unlinkFrBack(),
condp = irangep->newAndFromInside(cexprp->cloneTreePure(true),
irangep->lhsp()->unlinkFrBack(),
irangep->rhsp()->unlinkFrBack());
VL_DO_DANGLING(icondp->deleteTree(), icondp);
} else if (iconstp && iconstp->num().isFourState()