Adds the ability for callers to detect when saturation occurred on the result of saturating addition/multiplication.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Looks good with minor fix (suggested in comments).
include/llvm/Support/MathExtras.h | ||
---|---|---|
687 ↗ | (On Diff #40955) | I think it is better to initialize ResultOverlowed to false and only update when overflow happens. |