Add stubs in IR and ABI for `f16` and `f128` by tgross35 · Pull Request #121728 · rust-lang/rust

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

T-rustdoc

Relevant to the rustdoc team, which will review and decide on the PR/issue.

WG-trait-system-refactor

The Rustc Trait System Refactor Initiative (-Znext-solver)

labels

Feb 28, 2024

flip1995

Noratrieb

compiler-errors

compiler-errors

…itive`

Make changes necessary to support these types in the compiler.

@tgross35

@tgross35

@tgross35

@tgross35

@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-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Feb 28, 2024

@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-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Feb 29, 2024

@tgross35 tgross35 deleted the f16-f128-step1-ty-updates branch

March 1, 2024 06:12

This was referenced

Mar 1, 2024

Nadrieril added a commit to Nadrieril/rust that referenced this pull request

Mar 2, 2024
…, r=compiler-errors

`f16` and `f128` step 2: intrinsics

Continuation of rust-lang#121728, another portion of rust-lang#114607.

This PR adds `f16` and `f128` intrinsics, and hooks them up to both HIR and LLVM. This is all still unexposed to the frontend, which will probably be the next step. Also update itanium mangling per `@rcvalle's` in https://github.com/rust-lang/rust/pull/121728/files#r1506570300, and fix a typo from step 1.

Once these types are usable in code, I will add the codegen tests from rust-lang#114607 (codegen is passing on that branch)

This does add more `unimplemented!`s to Clippy, but I still don't think we can do better until library support is added.

r? `@compiler-errors`
cc `@Nilstrieb`
`@rustbot` label +T-compiler +F-f16_and_f128

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Mar 3, 2024
Rollup merge of rust-lang#121841 - tgross35:f16-f128-step2-intrinsics, r=compiler-errors

`f16` and `f128` step 2: intrinsics

Continuation of rust-lang#121728, another portion of rust-lang#114607.

This PR adds `f16` and `f128` intrinsics, and hooks them up to both HIR and LLVM. This is all still unexposed to the frontend, which will probably be the next step. Also update itanium mangling per `@rcvalle's` in https://github.com/rust-lang/rust/pull/121728/files#r1506570300, and fix a typo from step 1.

Once these types are usable in code, I will add the codegen tests from rust-lang#114607 (codegen is passing on that branch)

This does add more `unimplemented!`s to Clippy, but I still don't think we can do better until library support is added.

r? `@compiler-errors`
cc `@Nilstrieb`
`@rustbot` label +T-compiler +F-f16_and_f128

GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this pull request

Mar 5, 2024
…r=compiler-errors

Add stubs in IR and ABI for `f16` and `f128`

This is the very first step toward the changes in rust-lang#114607 and the [`f16` and `f128` RFC](https://rust-lang.github.io/rfcs/3453-f16-and-f128.html). It adds the types to `rustc_type_ir::FloatTy` and `rustc_abi::Primitive`, and just propagates those out as `unimplemented!` stubs where necessary.

These types do not parse yet so there is no feature gate, and it should be okay to use `unimplemented!`.

The next steps will probably be AST support with parsing and the feature gate.

r? `@compiler-errors`
cc `@Nilstrieb` suggested breaking the PR up in rust-lang#120645 (comment)

flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request

Mar 7, 2024
…ler-errors

`f16` and `f128` step 2: intrinsics

Continuation of rust-lang/rust#121728, another portion of rust-lang/rust#114607.

This PR adds `f16` and `f128` intrinsics, and hooks them up to both HIR and LLVM. This is all still unexposed to the frontend, which will probably be the next step. Also update itanium mangling per `@rcvalle's` in https://github.com/rust-lang/rust/pull/121728/files#r1506570300, and fix a typo from step 1.

Once these types are usable in code, I will add the codegen tests from #114607 (codegen is passing on that branch)

This does add more `unimplemented!`s to Clippy, but I still don't think we can do better until library support is added.

r? `@compiler-errors`
cc `@Nilstrieb`
`@rustbot` label +T-compiler +F-f16_and_f128

flip1995 pushed a commit to flip1995/rust that referenced this pull request

Mar 7, 2024
…r=compiler-errors

Add stubs in IR and ABI for `f16` and `f128`

This is the very first step toward the changes in rust-lang#114607 and the [`f16` and `f128` RFC](https://rust-lang.github.io/rfcs/3453-f16-and-f128.html). It adds the types to `rustc_type_ir::FloatTy` and `rustc_abi::Primitive`, and just propagates those out as `unimplemented!` stubs where necessary.

These types do not parse yet so there is no feature gate, and it should be okay to use `unimplemented!`.

The next steps will probably be AST support with parsing and the feature gate.

r? `@compiler-errors`
cc `@Nilstrieb` suggested breaking the PR up in rust-lang#120645 (comment)

celinval pushed a commit to model-checking/kani that referenced this pull request

Mar 12, 2024
Relevant upstream changes:

rust-lang/rust#120675: An intrinsic `Symbol` is
now wrapped in a `IntrinsicDef` struct, so the relevant part of the code
needed to be updated.
rust-lang/rust#121464: The second argument of
the `create_wrapper_file` function changed from a vector to a string.
rust-lang/rust#121662: `NullOp::DebugAssertions`
was renamed to `NullOp::UbCheck` and it now has data (currently unused
by Kani)
rust-lang/rust#121728: Introduces `F16` and
`F128`, so needed to add stubs for them
rust-lang/rust#121969: `parse_sess` was renamed
to `psess`, so updated the relevant code.
rust-lang/rust#122059: The
`is_val_statically_known` intrinsic is now used in some `core::fmt`
code, so had to handle it in (codegen'ed to false).
rust-lang/rust#122233: This added a new
`retag_box_to_raw` intrinsic. This is an operation that is primarily
relevant for stacked borrows. For Kani, we just return the pointer.

Resolves #3057

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jun 26, 2024
Remove `f16` and `f128` ICE paths from smir

Just chasing down some possible ICE paths. `@compiler-errors` mentioned in rust-lang#121728 (comment) that it is okay not to support these in smir, but this change seems pretty trivial?

r? `@celinval` since you reviewed rust-lang#114607 (review)

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jun 26, 2024
Remove `f16` and `f128` ICE paths from smir

Just chasing down some possible ICE paths. ``@compiler-errors`` mentioned in rust-lang#121728 (comment) that it is okay not to support these in smir, but this change seems pretty trivial?

r? ``@celinval`` since you reviewed rust-lang#114607 (review)

jhpratt added a commit to jhpratt/rust that referenced this pull request

Jun 27, 2024
Remove `f16` and `f128` ICE paths from smir

Just chasing down some possible ICE paths. ```@compiler-errors``` mentioned in rust-lang#121728 (comment) that it is okay not to support these in smir, but this change seems pretty trivial?

r? ```@celinval``` since you reviewed rust-lang#114607 (review)

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Jun 27, 2024
Rollup merge of rust-lang#126983 - tgross35:f16-f128-smir, r=celinval

Remove `f16` and `f128` ICE paths from smir

Just chasing down some possible ICE paths. ```@compiler-errors``` mentioned in rust-lang#121728 (comment) that it is okay not to support these in smir, but this change seems pretty trivial?

r? ```@celinval``` since you reviewed rust-lang#114607 (review)