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 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.

@bors
Copy link
Collaborator

bors commented Nov 8, 2025

⌛ Testing commit 61c3458 with merge fb23dd3...

@bors
Copy link
Collaborator

bors commented Nov 8, 2025

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing fb23dd3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 8, 2025
@bors bors merged commit fb23dd3 into rust-lang:master Nov 8, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 87f9dcd (parent) -> fb23dd3 (this PR)

Test differences

Show 2 test diffs

Stage 2

  • [run-make] tests/run-make/compressed-debuginfo-zstd: ignore (ignored if LLVM wasn't build with zstd for ELF section compression or LLVM is not the default codegen backend) -> pass (J0)

Additionally, 1 doctest diff were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard fb23dd3c6b120f0d2e55e5f2c69a464df7b35fdf --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. pr-check-1: 2441.7s -> 1471.0s (-39.8%)
  2. x86_64-rust-for-linux: 4115.1s -> 2487.5s (-39.6%)
  3. x86_64-gnu-gcc: 4410.7s -> 2888.3s (-34.5%)
  4. x86_64-gnu-miri: 5576.4s -> 4051.6s (-27.3%)
  5. pr-check-2: 3225.8s -> 2410.4s (-25.3%)
  6. x86_64-gnu-tools: 4462.6s -> 3336.9s (-25.2%)
  7. dist-aarch64-apple: 6534.5s -> 7970.3s (+22.0%)
  8. armhf-gnu: 6445.9s -> 5069.5s (-21.4%)
  9. arm-android: 7192.1s -> 5734.8s (-20.3%)
  10. test-various: 8239.4s -> 6592.1s (-20.0%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@bjorn3 bjorn3 deleted the sync_cg_clif-2025-11-08 branch November 8, 2025 19:57
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fb23dd3): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
1.5% [1.5%, 1.5%] 1
Regressions ❌
(secondary)
1.4% [1.4%, 1.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.5% [1.5%, 1.5%] 1

Max RSS (memory usage)

Results (primary 2.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [2.5%, 2.5%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 475.809s -> 476.932s (0.24%)
Artifact size: 390.93 MiB -> 390.92 MiB (-0.00%)

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. merged-by-bors This PR was explicitly merged by bors. 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.