about summary refs log tree commit diff
path: root/tests/codegen/checked_math.rs
AgeCommit message (Collapse)AuthorLines
2024-06-23Also get `add nuw` from `uN::checked_add`Scott McMurray-0/+14
2024-04-18Make `checked` ops emit *unchecked* LLVM operations where feasibleScott McMurray-0/+86
For things with easily pre-checked overflow conditions -- shifts and unsigned subtraction -- write then checked methods in such a way that we stop emitting wrapping versions of them. For example, today <https://rust.godbolt.org/z/qM9YK8Txb> neither ```rust a.checked_sub(b).unwrap() ``` nor ```rust a.checked_sub(b).unwrap_unchecked() ``` actually optimizes to `sub nuw`. After this PR they do.