Skip to content

Commit

Permalink
todo: simplify multiplication by power of two
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Nov 19, 2024
1 parent 0e3530e commit fd203f1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)");
}

0 comments on commit fd203f1

Please sign in to comment.