From 419f3192c57782245ea46e20ceb3cc5167b4e5e3 Mon Sep 17 00:00:00 2001 From: Greg Davill Date: Sat, 11 Apr 2026 15:32:27 +0930 Subject: [PATCH] Avoid greedy calls to userIterateAndNext --- src/V3Width.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/V3Width.cpp b/src/V3Width.cpp index 68ca70720..0980a59c2 100644 --- a/src/V3Width.cpp +++ b/src/V3Width.cpp @@ -9569,7 +9569,8 @@ class WidthVisitor final : public VNVisitor { // subsequent members are mapped correctly. Width-resolve the // value expression so its dtype is set int elementAdvance = 1; - if (!patp->keyp()) { + if (!patp->keyp() + && (VN_IS(patp->lhssp(), NodeVarRef) || VN_IS(patp->lhssp(), SelExtract))) { userIterateAndNext(patp->lhssp(), WidthVP{CONTEXT_DET, PRELIM}.p()); AstNodeExpr* const exprp = patp->lhssp(); if (const AstNodeDType* const dtypep = exprp->dtypep()) {