mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 03:33:58 +02:00
Fixes #7941
This commit is contained in:
+1
-2
@@ -1106,9 +1106,8 @@ class FsmDetectVisitor final : public VNVisitor {
|
||||
AstVarScope* thenVscp = nullptr;
|
||||
AstVarScope* elseVscp = nullptr;
|
||||
AstNode* const thenNodep = singleMeaningfulBranch(skipLeadingIgnorableStmt(ifp->thensp()));
|
||||
UASSERT_OBJ(thenNodep, ifp, "Empty then-branch unexpectedly survived to FSM detection");
|
||||
AstNode* const elseNodep = singleMeaningfulBranch(skipLeadingIgnorableStmt(ifp->elsesp()));
|
||||
if (!elseNodep) return false;
|
||||
if (!thenNodep || !elseNodep) return false;
|
||||
if (!directConstStateAssignNode(thenNodep, thenVscp, thenValue)) return false;
|
||||
if (!directConstStateAssignNode(elseNodep, elseVscp, elseValue)) return false;
|
||||
if (thenVscp == stateVscp && elseVscp == stateVscp) return true;
|
||||
|
||||
Reference in New Issue
Block a user