From fd203f180f9f7a2baaead37d7959e90cbff3cc57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20L=C3=A4ufer?= Date: Tue, 19 Nov 2024 16:01:47 -0500 Subject: [PATCH] todo: simplify multiplication by power of two --- tests/simplify.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/simplify.rs b/tests/simplify.rs index 6534d71..5dd4c0e 100644 --- a/tests/simplify.rs +++ b/tests/simplify.rs @@ -195,4 +195,10 @@ fn test_simplify_mul() { // multiply with one ts("mul(a : bv<4>, 4'd1)", "a : bv<4>"); ts("mul(4'd1, a : bv<4>)", "a : bv<4>"); + + // multiply with power of two (this includes a simplification of the left shift) + // TODO + // ts("mul(a : bv<4>, 4'd2)", "zext(a : bv<4>[3:1], 1)"); + // ts("mul(a : bv<4>, 4'd4)", "zext(a : bv<4>[3:2], 2)"); + // ts("mul(a : bv<4>, 4'd8)", "zext(a : bv<4>[3], 3)"); }