From b1f4d0d8aa202984fe16c9cefb5db6f7e1b53ca8 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Thu, 11 Sep 2025 04:47:28 -0700 Subject: [PATCH] Small adjustments --- passes/opt/peepopt_addsub_c.pmg | 4 ++-- tests/peepopt/addsub_c.ys | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/passes/opt/peepopt_addsub_c.pmg b/passes/opt/peepopt_addsub_c.pmg index 76c6bd74f..483fed4d1 100644 --- a/passes/opt/peepopt_addsub_c.pmg +++ b/passes/opt/peepopt_addsub_c.pmg @@ -1,7 +1,7 @@ pattern addsub_c // // Authored by Akash Levy of Silimate, Inc. under ISC license. -// Transforms add->add/sub_c into add_c canceling the constants out: +// Transforms add->add/sub_c into add_c folding the constants: // y = (a +- b_const) +- c_const ===> a +- eval(b_const +- c_const) // @@ -76,7 +76,7 @@ code if (GetSize(c_const) > 32) reject; - // Reuse/create new cell to drive the rewritten equation + // Reuse/create new cell to drive the folded expression if (nusers(addsub1_y) != 2) { cell = module->addCell(NEW_ID2_SUFFIX("asconst"), addsub1->type); cell->attributes = addsub1->attributes; diff --git a/tests/peepopt/addsub_c.ys b/tests/peepopt/addsub_c.ys index 9a6a397cb..d8e09cc1e 100644 --- a/tests/peepopt/addsub_c.ys +++ b/tests/peepopt/addsub_c.ys @@ -178,7 +178,7 @@ log -push read_verilog <