google / google/xls

Consider making multiply more explicit WRT overflow

Open
#1,098 2 comments 0 reactions 0 assignees View on GitHub
dslx ir
Dominant language
C++
Stars
1.9k
Forks
283
Avg merge
2d 10h
Merged PRs (30d)
135

Description

Currently `a:uN * b:uN` is converted to IR `uN = umul[a, b]`. This means that for some values of `a` and `b` overflow is possible.

We might want to consider desuggaring `a*b` to a umul of 2N width and then truncating to N bits. This is more explicit about whats actually going on.

We will need to consider the benefits and costs associated with this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.