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 <