Fix V3Table trying to generate 'x' bits in the lookup table. (#5491)

Due to out of range selects, V3Table attempted to create a table in the
constant pool with an 'x' value in it, which caused an internal error.

Ensure V3Table behaves the same for out of range selects as the original
logic would.

There is a related bug #5490, about leaving partially out of range
selects in the logic after inserting bounds checks in V3Unknown.
This commit is contained in:
Geza Lore
2024-09-26 16:31:47 +01:00
committed by GitHub
parent 91c8866ac3
commit 2a01365f9b
3 changed files with 16 additions and 2 deletions
+1
View File
@@ -315,6 +315,7 @@ private:
for (TableOutputVar& tov : m_outVarps) {
if (V3Number* const outnump = simvis.fetchOutNumberNull(tov.varScopep())) {
UINFO(8, " Output " << tov.name() << " = " << *outnump << endl);
UASSERT_OBJ(!outnump->isAnyXZ(), outnump, "Table should not contain X/Z");
outputAssignedMask.setBit(tov.ord(), 1); // Mark output as assigned
tov.addValue(inValue, *outnump);
} else {