Fix wildcard equality and inside operators for non-fourstate expressions (#5673)

This commit is contained in:
Ryszard Rozak
2024-12-12 14:51:48 +01:00
committed by GitHub
parent a2f327f729
commit 03e8ef0b0f
9 changed files with 124 additions and 6 deletions
+3 -3
View File
@@ -1412,9 +1412,9 @@ class TristateVisitor final : public TristateBaseVisitor {
}
}
void visitEqNeqWild(AstNodeBiop* nodep) {
if (!VN_IS(nodep->rhsp(), Const)) {
nodep->v3warn(E_UNSUPPORTED, // Says spac.
"Unsupported: RHS of ==? or !=? must be constant to be synthesizable");
if (!VN_IS(nodep->rhsp(), Const) && nodep->rhsp()->dtypep()->isFourstate()) {
nodep->v3warn(E_UNSUPPORTED,
"Unsupported: RHS of ==? or !=? is fourstate but not a constant");
// rhs we want to keep X/Z intact, so otherwise ignore
}
iterateAndNextNull(nodep->lhsp());