Skip to content

Commit

Permalink
Fix Pure-ness check.
Browse files Browse the repository at this point in the history
  • Loading branch information
yTakatsukasa committed Mar 28, 2021
1 parent 629e064 commit 31aa715
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/V3Const.cpp
Expand Up @@ -913,7 +913,7 @@ class ConstVisitor final : public AstNVisitor {
// side effects can do this optimization
// Eventually we'll recurse through tree when unknown, memoizing results so far,
// but for now can disable en-mass until V3Purify takes effect.
return m_doShort || VN_IS(nodep, VarRef) || VN_IS(nodep, Const);
return m_doShort && (VN_IS(nodep, VarRef) || VN_IS(nodep, Const));
}

// Extraction checks
Expand Down

0 comments on commit 31aa715

Please sign in to comment.