Multiplication of shorts is promoted to multiplication of ints
Open
enhancement
xlscc
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
The initial XLS IR output from xlscc for multiplication of `short`s first does a sign_ext to promote both inputs to `int`s, then multiplies them, then returns the lower 16 bits of the result. This makes the optimizer work harder than is necessary, and some targets might not be able to optimize it away.
```
#pragma hls_top
short foo(short a, short b){
return a*b;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.