Add mul_add_relaxed methods for floating-point types#151793
Add mul_add_relaxed methods for floating-point types#151793landsharkiest wants to merge 1 commit into
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@landsharkiest friendly reminder that this PR is waiting for you to react to the reviewer's feedback and to fix CI. :) |
|
Another thing, please update the doc comment of the intrinsics to point to the public methods, like here rust/library/core/src/intrinsics/mod.rs Lines 1459 to 1480 in a6050b7 We use the prasing of "stabilized" here even if the methods are not actually stable. |
0ca5122 to
174bea7
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Sorry got caught up in school and job searching, will finally put this away! :) |
This comment has been minimized.
This comment has been minimized.
174bea7 to
67e0947
Compare
…uwer Rollup of 6 pull requests Successful merges: - #159188 (Always generate private and hidden items in JSON docs of the stdlib) - #159567 (Update rustc crate crossbeam-epoch to 0.9.20) - #150732 (Convert `-Ctarget-cpu` into a target-modifier for AVR, AMDGCN and NVPTX ) - #151793 (Add mul_add_relaxed methods for floating-point types) - #159549 (restrict const-eval-related 'content' triggers to library/ folder) - #159570 (fix ICE in opsem inhabitedness check)
|
💔 I suspect this PR failed tests as part of a rollup After fixing the problem, consider running a try job for the failed job before re-approving. Link to failure: #159573 (comment) |
|
This pull request was unapproved. This PR was contained in a rollup (#159573), which was unapproved. |
|
@bors squash msg="Add mul_add_relaxed methods for floating-point types" |
This comment has been minimized.
This comment has been minimized.
|
🔨 2 commits were squashed into ace8a46. |
f117ad7 to
ace8a46
Compare
|
@bors r+ rollup |
|
We may as well try @bors try jobs=dist-i586-gnu-i586-i686-musl |
This comment has been minimized.
This comment has been minimized.
…r=<try> Add mul_add_relaxed methods for floating-point types try-job: dist-i586-gnu-i586-i686-musl
|
💔 Test for 2e2b7e3 failed: CI. Failed job:
|
|
Looks like the fix was not quite sufficient @bors r- |
|
This pull request was unapproved. |
|
|
|
Yeah some tests were already skipped since the last CI failure, seems like a bit more ignoring is needed. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
View all comments
Implements mul_add_relaxed for f16, f32, f64, and f128, which computes (self * a) + b with relaxed precision semantics. Unlike mul_add which guarantees a fused operation, this variant allows the compiler to choose between fused or separate operations based on target performance.
This fills the gap between the precision-guaranteed mul_add and the fully-optimizable algebraic operators, providing target-specific optimization while maintaining reasonable floating-point semantics.
Tracking issue: #151770