Root cause: The IR equality pass does not handle the bit slicing cases, which leads to segfault.
Solution: Make sure all IR nodes are handled correctly in the IR equality pass.
Test: tests/issues/test_issue_289.py
Other comments: We also change the returned data type for bit slicing. It should always be uint if the bitwidth can be inferred. In this PR, we also introduce the reverse bit slicing. Following is an example:
Issue: #289
Root cause: The IR equality pass does not handle the bit slicing cases, which leads to segfault.
Solution: Make sure all IR nodes are handled correctly in the IR equality pass.
Test:
tests/issues/test_issue_289.py
Other comments: We also change the returned data type for bit slicing. It should always be
uint
if the bitwidth can be inferred. In this PR, we also introduce the reverse bit slicing. Following is an example:Similarly, we can also set bit slices in reverse.