Skip to content
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

Enable f16 for MIPS #137311

Merged
merged 1 commit into from
Feb 26, 2025
Merged

Enable f16 for MIPS #137311

merged 1 commit into from
Feb 26, 2025

Conversation

martn3
Copy link

@martn3 martn3 commented Feb 20, 2025

Blocked on rust-lang/compiler-builtins#762

It seems as if f16 works on MIPS now according to my testing on Rust master with LLVM 20, and I was asked here to create PRs with my changes.

I only tested on the flavour of mipsel-unknown-linux-gnu hardware that happens to be available to me, so I can't say anything about other MIPS hardware, but from a casual skimming of the LLVM code (1, 2) it seems like f16 should work on all MIPS hardware. So enable it for all MIPS hardware.

@rustbot label +O-MIPS +F-f16_and_f128 +S-blocked

Tracking issue for f16: #116909

r? @tgross35

It seems as if `f16` works on MIPS now according to my
testing on Rust master with LLVM 20, and I was asked to
create PRs with my changes.

I only tested on the flavour of `mipsel-unknown-linux-gnu`
hardware that happens to be available to me, so I can't say
anything about other MIPS hardware, but from a casual
skimming of the LLVM code ([1], [2]) it seems like `f16`
should work on all MIPS hardware. So enable it for all MIPS
hardware.

[1]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/Target/Mips/MipsISelLowering.h#L370
[2]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/CodeGen/TargetLoweringBase.cpp#L1367-L1388
@rustbot
Copy link
Collaborator

rustbot commented Feb 20, 2025

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` O-MIPS Target: MIPS processors S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Feb 20, 2025
Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after the builtins update goes through, thanks!

@tgross35 tgross35 removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 20, 2025
@tgross35
Copy link
Contributor

#137515 went through so this should be all set.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 25, 2025

📌 Commit cf1242c has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Feb 25, 2025
@tgross35
Copy link
Contributor

If you get the chance to test it, f128 may work on mips64 and mips64r6 as well now. llvm/llvm-project#96432 was the only issue listed and it seems to have been resolved with LLVM20.

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2025
Rollup of 14 pull requests

Successful merges:

 - rust-lang#136576 (pass optimization level to llvm-bitcode-linker)
 - rust-lang#137154 (Add UTF-8 validation fast paths in `Wtf8Buf`)
 - rust-lang#137311 (Enable `f16` for MIPS)
 - rust-lang#137320 (fix(rustdoc): Fixed stability version in rustdoc)
 - rust-lang#137529 (remove few unused args)
 - rust-lang#137544 (tests: Add regression test for derive token invalidation (rust-lang#81099))
 - rust-lang#137559 (run some tests on emscripten again)
 - rust-lang#137601 (ssa/mono: deduplicate `type_has_metadata`)
 - rust-lang#137603 (codegen_llvm: avoid `Deref` impls w/ extern type)
 - rust-lang#137604 (trait_sel: resolve vars in host effects)
 - rust-lang#137609 (Complete the list of resources used in rustdoc output)
 - rust-lang#137613 (hir_analysis: skip self type of host effect preds in variances_of)
 - rust-lang#137614 (fix doc in library/core/src/pin.rs)
 - rust-lang#137622 (fix attribute-related ICE when parsing macro on the rhs of a name-value attribute)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 49249ea into rust-lang:master Feb 26, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 26, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2025
Rollup merge of rust-lang#137311 - martn3:enable-f16-mips, r=tgross35

Enable `f16` for MIPS

Blocked on rust-lang/compiler-builtins#762

It seems as if `f16` works on MIPS now according to my testing on Rust master with LLVM 20, and I was asked [here](rust-lang#137167 (comment)) to create PRs with my changes.

I only tested on the flavour of `mipsel-unknown-linux-gnu` hardware that happens to be available to me, so I can't say anything about other MIPS hardware, but from a casual skimming of the LLVM code ([1], [2]) it seems like `f16` should work on all MIPS hardware. So enable it for all MIPS hardware.

[1]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/Target/Mips/MipsISelLowering.h#L370
[2]: https://github.com/rust-lang/llvm-project/blob/rustc/20.1-2025-02-13/llvm/lib/CodeGen/TargetLoweringBase.cpp#L1367-L1388

`@rustbot` label +O-MIPS +F-f16_and_f128 +S-blocked

Tracking issue for f16: rust-lang#116909

r? `@tgross35`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-f16_and_f128 `#![feature(f16)]`, `#![feature(f128)]` O-MIPS Target: MIPS processors S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants