Fix coverage of variables of complex types (#6250)

This commit is contained in:
Ryszard Rozak
2025-08-01 13:24:18 +02:00
committed by GitHub
parent 61f4c97f40
commit f9bdab65f0
6 changed files with 71 additions and 1 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ class ClockVisitor final : public VNVisitor {
= VN_CAST(origp->dtypep()->skipRefp(), BasicDType)) {
if (!bdtypep->isOpaque()) comparedp = new AstXor{nodep->fileline(), origp, changeRdp};
}
if (!comparedp) comparedp = AstEq::newTyped(nodep->fileline(), origp, changeRdp);
if (!comparedp) comparedp = AstNeq::newTyped(nodep->fileline(), origp, changeRdp);
AstIf* const newp = new AstIf{nodep->fileline(), comparedp, incp};
// We could add another IF to detect posedges, and only increment if so.
// It's another whole branch though versus a potential memory miss.