mirror of
https://github.com/verilator/verilator.git
synced 2026-09-03 16:28:53 +02:00
Fix splitting if statements with impure conditions (#5219)
This commit is contained in:
+6
-3
@@ -983,9 +983,12 @@ protected:
|
||||
}
|
||||
void visit(AstNodeIf* nodep) override {
|
||||
UINFO(4, " IF " << nodep << endl);
|
||||
m_curIfConditional = nodep;
|
||||
iterateAndNextNull(nodep->condp());
|
||||
m_curIfConditional = nullptr;
|
||||
if (!nodep->condp()->isPure()) m_noReorderWhy = "Impure IF condition";
|
||||
{
|
||||
VL_RESTORER(m_curIfConditional);
|
||||
m_curIfConditional = nodep;
|
||||
iterateAndNextNull(nodep->condp());
|
||||
}
|
||||
scanBlock(nodep->thensp());
|
||||
scanBlock(nodep->elsesp());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user