Skip to content

Conversation

@bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Nov 8, 2025

The highlights this time are 4 Cranelift updates, some refactorings and a couple of bugfixes.

sayantn and others added 30 commits June 15, 2025 04:33
Ensure rustc_codegen_cranelift doesn't get normalized to rustc. And
handle -Cpanic=abort.
Couple of test suite fixes for cg_clif

Most of these are required for getting the test suite running with panic=unwind for cg_clif.
As opposed to directly defining them in the module.
Similar to the existing nullpointer and alignment checks, this checks
for valid enum discriminants on creation of enums through unsafe
transmutes. Essentially this sanitizes patterns like the following:
```rust
let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) };
```
An extension of this check will be done in a follow-up that explicitly
sanitizes for extern enum values that come into Rust from e.g. C/C++.

This check is similar to Miri's capabilities of checking for valid
construction of enum values.

This PR is inspired by saethlin@'s PR
rust-lang#104862. Thank you so much for
keeping this code up and the detailed comments!

I also pair-programmed large parts of this together with vabr-g@.
Insert checks for enum discriminants when debug assertions are enabled

Similar to the existing null-pointer and alignment checks, this checks for valid enum discriminants on creation of enums through unsafe transmutes. Essentially this sanitizes patterns like the following:
```rust
let val: MyEnum = unsafe { std::mem::transmute<u32, MyEnum>(42) };
```

An extension of this check will be done in a follow-up that explicitly sanitizes for extern enum values that come into Rust from e.g. C/C++.

This check is similar to Miri's capabilities of checking for valid construction of enum values.

This PR is inspired by saethlin@'s PR
rust-lang#104862. Thank you so much for keeping this code up and the detailed comments!

I also pair-programmed large parts of this together with vabr-g@.

r? `@saethlin`
…jubilee

Add SIMD funnel shift and round-to-even intrinsics

This PR adds 3 new SIMD intrinsics

 - `simd_funnel_shl` - funnel shift left
 - `simd_funnel_shr` - funnel shift right
 - `simd_round_ties_even` (vector version of `round_ties_even_fN`)

TODO (future PR): implement `simd_fsh{l,r}` in miri, cg_gcc and cg_clif (it is surprisingly hard to implement without branches, the common tricks that rotate uses doesn't work because we have 2 elements now. e.g, the `-n&31` trick used by cg_gcc to implement rotate doesn't work with this because then `fshl(a, b, 0)` will be `a | b`)

[#t-compiler > More SIMD intrinsics](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/More.20SIMD.20intrinsics/with/522130286)

`@rustbot` label T-compiler T-libs A-intrinsics F-core_intrinsics
r? `@workingjubilee`
…andling

Experimental exception handling support on Linux
give Pointer::into_parts a more scary name and offer a safer alternative

`into_parts` is a bit too innocent of a name for a somewhat subtle operation.
r? `@oli-obk`
@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. labels Nov 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 8, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Nov 8, 2025

⚠️ Warning ⚠️

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 8, 2025
@bjorn3 bjorn3 added A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend labels Nov 8, 2025
@bjorn3
Copy link
Member Author

bjorn3 commented Nov 8, 2025

@bors r+ p=1 subtree sync

@bors
Copy link
Collaborator

bors commented Nov 8, 2025

📌 Commit ff3c7f0 has been approved by bjorn3

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-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 8, 2025

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

@rustbot rustbot added A-tidy Area: The tidy tool T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 8, 2025
@bjorn3
Copy link
Member Author

bjorn3 commented Nov 8, 2025

@bors r+ p=1 subtree sync

@bors
Copy link
Collaborator

bors commented Nov 8, 2025

📌 Commit b2a6602 has been approved by bjorn3

It is now in the queue for this repository.

@rust-log-analyzer

This comment has been minimized.

@bjorn3
Copy link
Member Author

bjorn3 commented Nov 8, 2025

@bors r+ p=1 subtree sync

@bors
Copy link
Collaborator

bors commented Nov 8, 2025

📌 Commit 61c3458 has been approved by bjorn3

It is now in the queue for this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend A-tidy Area: The tidy tool has-merge-commits PR has merge commits, merge with caution. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.