about summary refs log tree commit diff
path: root/src/test/codegen/unchecked-float-casts.rs
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-10/+0
2018-03-26Stabilize i128_typeMark Mansi-1/+0
2017-11-10Make saturating u128 -> f32 casts the default behaviorRobin Kruppe-21/+2
... rather than being gated by -Z saturating-float-casts. There are several reasons for this: 1. Const eval already implements this behavior. 2. Unlike with float->int casts, this behavior is uncontroversially the right behavior and it is not as performance critical. Thus there is no particular need to make the bug fix for u128->f32 casts opt-in. 3. Having two orthogonal features under one flag is silly, and never should have happened in the first place. 4. Benchmarking float->int casts with the -Z flag should not pick up performance changes due to the u128->f32 casts (assuming there are any). Fixes #41799
2017-11-07Saturating casts between integers and floats (both directions).Robin Kruppe-0/+65
This affects regular code generation as well as constant evaluation in trans, but not the HIR constant evaluator because that one returns an error for overflowing casts and NaN-to-int casts. That error is conservatively correct and we should be careful to not accept more code in constant expressions. The changes to code generation are guarded by a new -Z flag, to be able to evaluate the performance impact. The trans constant evaluation changes are unconditional because they have no run time impact and don't affect type checking either.