Fix V3Unknown unpacked struct x-assign (#4934)

This commit is contained in:
Yan Xu
2024-03-01 09:14:49 -05:00
committed by GitHub
parent f56f318217
commit b12f8b3d73
4 changed files with 67 additions and 1 deletions
+3 -1
View File
@@ -471,7 +471,9 @@ class UnknownVisitor final : public VNVisitor {
VL_DO_DANGLING(condp->deleteTree(), condp);
} else if (!lvalue
// Making a scalar would break if we're making an array
&& !VN_IS(nodep->dtypep()->skipRefp(), NodeArrayDType)) {
&& !VN_IS(nodep->dtypep()->skipRefp(), NodeArrayDType)
&& !(VN_IS(nodep->dtypep()->skipRefp(), NodeUOrStructDType)
&& !VN_CAST(nodep->dtypep()->skipRefp(), NodeUOrStructDType)->packed())) {
// ARRAYSEL(...) -> COND(LT(bit<maxbit), ARRAYSEL(...), {width{1'bx}})
VNRelinker replaceHandle;
nodep->unlinkFrBack(&replaceHandle);