-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement minmax intrinsics #49249
implement minmax intrinsics #49249
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I am not insane! The LLVM source code looked correct, but a blame revealed that this was actually fixed in LLVM trunk 29 days ago and that it was broken before that: llvm-mirror/llvm@e271f8c |
@alexcrichton we could provide a correct implementation in |
Ah yeah sounds like we should provide unstable versions in stdsimd with suboptimal codegen for now? |
I'll update this PR to make maxnum a run-fail test so that when LLVM is updated it automatically pases. |
So:
|
@bors: r+ |
📌 Commit 88268d7 has been approved by |
@bors r- Unreachable expression in rustc_trans.
|
@bors r=alexcrichton |
📌 Commit 0118a65 has been approved by |
@bors r- CI is still failing 😞. The new test requires
|
@bors: r+ |
📌 Commit d87b403 has been approved by |
implement minmax intrinsics This adds the `simd_{fmin,fmax}` intrinsics, which do a vertical (lane-wise) `min`/`max` for floating point vectors that's equivalent to Rust's `min`/`max` for `f32`/`f64`. It might make sense to make `{f32,f64}::{min,max}` use the `minnum` and `minmax` intrinsics as well. --- ~~HELP: I need some help with these. Either I should go to sleep or there must be something that I must be missing. AFAICT I am calling the `maxnum` builder correctly, yet rustc/LLVM seem to insert a call to `llvm.minnum` there instead...~~ EDIT: Rust's LLVM version is too old :/
@bors: r- This hit a few failures locally in the last rollup (which didn't land): |
I can fix those tomorrow night earliest at least. But this PR is not time
critical. I wonder how come these did not show up earlier :/
…On Sat 24. Mar 2018 at 15:01, Alex Crichton ***@***.***> wrote:
@bors <https://github.com/bors>: r-
This hit a few failures locally in the last rollup
<#49317> (which didn't land):
- missing error-pattern
<bbdb20a#diff-433b91cf9a1834bfaa4ac67c9527169a>
- bad CHECK patterns
<fc23686>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#49249 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA3NpvbHefTU8O7uAdP81vj3YAIwvmC9ks5thlG2gaJpZM4S10Kp>
.
|
@gnzlbg: 🔑 Insufficient privileges: Not in reviewers |
☔ The latest upstream changes (presumably #49297) made this pull request unmergeable. Please resolve the merge conflicts. |
updated and rebased |
@bors: r+ |
📌 Commit 56aaf34 has been approved by |
implement minmax intrinsics This adds the `simd_{fmin,fmax}` intrinsics, which do a vertical (lane-wise) `min`/`max` for floating point vectors that's equivalent to Rust's `min`/`max` for `f32`/`f64`. It might make sense to make `{f32,f64}::{min,max}` use the `minnum` and `minmax` intrinsics as well. --- ~~HELP: I need some help with these. Either I should go to sleep or there must be something that I must be missing. AFAICT I am calling the `maxnum` builder correctly, yet rustc/LLVM seem to insert a call to `llvm.minnum` there instead...~~ EDIT: Rust's LLVM version is too old :/
☀️ Test successful - status-appveyor, status-travis |
This adds the
simd_{fmin,fmax}
intrinsics, which do a vertical (lane-wise)min
/max
for floating point vectors that's equivalent to Rust'smin
/max
forf32
/f64
.It might make sense to make
{f32,f64}::{min,max}
use theminnum
andminmax
intrinsics as well.HELP: I need some help with these. Either I should go to sleep or there must be something that I must be missing. AFAICT I am calling theEDIT: Rust's LLVM version is too old :/maxnum
builder correctly, yet rustc/LLVM seem to insert a call tollvm.minnum
there instead...