From dd7e302aaaf47faf05a451aef62607322103126e Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Wed, 2 Oct 2024 03:55:19 -0700 Subject: [PATCH] Revert wreduce --- passes/opt/wreduce.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/passes/opt/wreduce.cc b/passes/opt/wreduce.cc index 006d43539..8f2784cf8 100644 --- a/passes/opt/wreduce.cc +++ b/passes/opt/wreduce.cc @@ -287,7 +287,7 @@ struct WreduceWorker int max_port_a_size = cell->hasPort(ID::A) ? GetSize(cell->getPort(ID::A)) : -1; int max_port_b_size = cell->hasPort(ID::B) ? GetSize(cell->getPort(ID::B)) : -1; - if (cell->type.in(ID($not), ID($pos), ID($neg), ID($and), ID($or), ID($xor), ID($add), ID($sub), ID($shl), ID($sshl))) { + if (cell->type.in(ID($not), ID($pos), ID($neg), ID($and), ID($or), ID($xor), ID($add), ID($sub))) { // TODO: see if we can add shl, shr, sshl, sshr max_port_a_size = min(max_port_a_size, GetSize(sig)); max_port_b_size = min(max_port_b_size, GetSize(sig)); } @@ -539,7 +539,7 @@ struct WreducePass : public Pass { } } - if (c->type.in(ID($add), ID($sub), ID($mul), ID($div), ID($mod), ID($divfloor), ID($modfloor), ID($pow))) + if (c->type.in(ID($div), ID($mod), ID($divfloor), ID($modfloor), ID($pow))) // TODO: see if we can add add, sub, mul { SigSpec A = c->getPort(ID::A); int original_a_width = GetSize(A);