From 1567dc646d27e85078e3d8bd90ae4d35f7c80002 Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 6 Sep 2023 16:46:30 +0200 Subject: [PATCH] speed up to simplification by omitting construction of negated parameters --- src/netlist/boolean_function/symbolic_execution.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netlist/boolean_function/symbolic_execution.cpp b/src/netlist/boolean_function/symbolic_execution.cpp index 13f9ee897be..3d3143dd99d 100644 --- a/src/netlist/boolean_function/symbolic_execution.cpp +++ b/src/netlist/boolean_function/symbolic_execution.cpp @@ -798,7 +798,7 @@ namespace hal { auto p1_parameter = p[1].get_parameters(); // X | (Y & !X) => X | Y - if ((~p1_parameter[1]) == p[0]) + if (is_x_not_y(p1_parameter[1], p[0])) { return BooleanFunction::Or(p[0].clone(), p1_parameter[0].clone(), node.size); } @@ -924,7 +924,7 @@ namespace hal return OK(BooleanFunction::Const(0, node.size)); } // X ^ ~X => 1 - if (~p[0] == p[1]) + if (is_x_not_y(p[0], p[1])) { return OK(One(node.size)); }