Fix wide typed pattern formatting primitives (#8325)

This commit is contained in:
Marco Bartoli
2026-09-11 18:11:14 -04:00
committed by GitHub
parent bd32c0e4c1
commit 4aeb3dbc5a
3 changed files with 72 additions and 8 deletions
+3 -1
View File
@@ -18,7 +18,8 @@
// Each module:
// For each expression, if it requires a clean operand,
// and the operand is dirty, insert a CLEAN node.
// Resize operands (but not variables or variable selects) to C++ 32/64/wide types.
// Resize operands (but not variables, variable selects, or formatting metadata)
// to C++ 32/64/wide types.
// Copy all width() values to widthMin() so RANGE, etc can still see orig widths
//
//*************************************************************************
@@ -84,6 +85,7 @@ class CleanVisitor final : public VNVisitor {
|| VN_IS(nodep, ConsPackMember) //
|| VN_IS(nodep, NodeDType) // Don't want to change variable widths!
|| VN_IS(nodep, NodeSel) // Array selects should reflect variable widths
|| VN_IS(nodep, SFormatArg) // Retain the logical argument type, not storage width
|| VN_IS(nodep->dtypep()->skipRefp(), AssocArrayDType) // Or arrays
|| VN_IS(nodep->dtypep()->skipRefp(), WildcardArrayDType)
|| VN_IS(nodep->dtypep()->skipRefp(), DynArrayDType)