[Comb] `or` of exclusive concats can be merged
Open
@seldridge is already working on this.
Since Aug 25, 2021.
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 524
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
I'm seeing a bunch of variants of this pattern:
// x is 6 bits, y is 2 bits.
`wire [9:0] _tmp_122 = {3'h0, x} | {y, 7'h0};`
which could be simplified to:
`wire [9:0] _tmp_122 = {y, 1'h0, x};`
A similar one is:
`{ 5'0, bit}|{4'0, cond?2:0}` ==> `{4'h0, cond ? 1 : 0, bit}` ==> `{4'h0, cond, bit}`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.