Avoid greedy calls to userIterateAndNext

This commit is contained in:
Greg Davill 2026-04-11 15:32:27 +09:30
parent e9f42fdfbd
commit 419f3192c5
No known key found for this signature in database
GPG Key ID: 80EE31ACCEBEA6DA
1 changed files with 2 additions and 1 deletions

View File

@ -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()) {