mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
V3MergeCond: Fix incorrect merge of assignments to the condition
This commit is contained in:
@@ -790,6 +790,8 @@ private:
|
||||
// otherwise end the current merge. Return ture if added, false if ended merge.
|
||||
bool addIfHelpfulElseEndMerge(AstNodeStmt* nodep) {
|
||||
UASSERT_OBJ(m_mgFirstp, nodep, "List must be open");
|
||||
if (!checkOrMakeMergeable(nodep)) return false;
|
||||
if (!m_mgFirstp) return false; // If 'checkOrMakeMergeable' closed the list
|
||||
if (m_mgNextp == nodep) {
|
||||
if (isSimplifiableNode(nodep)) {
|
||||
if (addToList(nodep, nullptr)) return true;
|
||||
|
||||
Reference in New Issue
Block a user