Priority select over data from receives can be turned into n-ary OR
Open
enhancement
optimizer
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
If you have code like
```
if (p) {
y = recv(...);
} else if (q) {
y = recv(...);
} else {
y = recv(...);
}
```
where the channels can be different between the receives, then you can turn the resultant priority select into an OR over the data output of the receives, since when the predicate (propagated from the if-then-else) on each receive is false, the output is all zeros.
Contributor guide
Assessment
This issue has not been assessed yet.