Skip to content

Rollup of 7 pull requests - #165873

Closed
JonathanBrouwer wants to merge 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-9fNrMa6
Closed

JonathanBrouwer wants to merge 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-9fNrMa6

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

bjorn3 and others added 18 commits September 18, 2026 10:37
LLVM intrinsics must always use extern "llvm-intrinsic" and
extern "llvm-intrinsic" must only be used for actual LLVM intrinsics.
Signed-off-by: Xubai Wang <xubaiwwj@gmail.com>
Aggregates of up to 64 bits were always cast to an i32/i64, even when
no argument registers were left. LLVM then placed the i64 in an
8-byte aligned stack slot, but the ABI (section 5.1) says stack arguments
follow the normal alignment rules of the type, so a `{ i32, i32 }` must
be 4-aligned.

Track the remaining arg regs.  When an aggregate no longer fits in
registers, pass it by value on the stack with its natural alignment.
Aggregates passed or returned in registers now use the smallest
type.
Co-authored-by: dianqk <dianqk@dianqk.net>
…name, r=dingxiangfei2009

Tie extern "llvm-intrinsics" and llvm.* symbol names together

LLVM intrinsics must always use extern "llvm-intrinsic" and extern "llvm-intrinsic" must only be used for actual LLVM intrinsics.

Follow up to rust-lang#161398
…ranch-164765, r=dianqk

Avoid hoisting uninitialized reads in EarlyOtherwiseBranch

Fixes rust-lang#164765.
EarlyOtherwiseBranch can hoist a read onto a path where its operand is uninitialized, causing a miscompilation.
When the parent’s otherwise branch is reachable, this restricts scalar hoisting to unchanged function arguments and their struct/tuple fields. It reuses VisitPlacesWith to reject writes, borrows, moves, and storage resets, without adding runtime branches.
The tradeoff is conservative: some safe computed locals and borrowed or modified arguments lose this optimization. Supporting those cases would require a broader initialization analysis. (any suggestions or pointers here?)
…hread, r=petrochenkov

Explicitly drop job server helper thread

An adaptation of an LLM patch that was generated in https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/with/639482582.

The original patch consisted from two fixes: explicit drop of a helper thread and additional logic for job server token request counting. This PR implements only the explicit drop part as I don't see how additional requests counting logic should help the issue.

This reworks rust-lang#165676, as the [rationale](https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Interaction.20of.20Cargo.20jobserver.20tests.20and.20parallel.20frontend/near/639152114) behind explicit drop of a helper thread seems reasonable for me:

> From my rough understanding, while helper is handling a token, its upgrade() is often the last strong ref I guess. So, when run_in_thread_pool_with_globals returns and rustc exits, the token may still be in helper's hands.

This fix didn't fail after several launches in rust-lang#165506 and locally.

r? @petrochenkov
replace `TypingEnv::post_analysis()` with `mir::Body::typing_env()`

This PR fixes the correspondence between typing modes and MIR phases so that some passes don't have to fix that inconsistency themselves.

Similar to rust-lang#163745

We should discourage constructing a typing env by hand when it can be derived from context.
This simplifies reasoning and reduces the mistake of not resetting rigidness markers across typing envs.

r? lcnr
…ates, r=folkertdev

hexagon: pass small aggregates on the stack when registers run out

Aggregates of up to 64 bits were always cast to an i32/i64, even when no argument registers were left. LLVM then placed the i64 in an 8-byte aligned stack slot, but the ABI (section 5.1) says stack arguments follow the normal alignment rules of the type, so a `{ i32, i32 }` must be 4-aligned.

Track the remaining arg regs.  When an aggregate no longer fits in registers, pass it by value on the stack with its natural alignment. Aggregates passed or returned in registers now use the smallest type.
…risDenton

Mention width limit panic in fmt doc

`format!` will panic if dynamic width exceeds 65535. Mention this in the doc.

```rust
fn main() {
    println!("Hello {:width$}!", "x", width = 65536);
}

// thread 'main' (2688852) panicked at src/main.rs:2:5:
// Formatting argument out of range
// note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
…nthey

Fix inverted wasm cfg in core benchmarks

It restores the correct cfg configuration in coretests. The mistake is introduced in  rust-lang#163794 .
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 12, 2026
@rustbot rustbot added A-fmt Area: `core::fmt` A-run-make Area: port run-make Makefiles to rmake.rs 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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 12, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bc7546b has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Nov 12, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 12, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #161922 (Tie extern "llvm-intrinsics" and llvm.* symbol names together)
 - #164864 (Avoid hoisting uninitialized reads in EarlyOtherwiseBranch)
 - #165854 (Explicitly drop job server helper thread)
 - #164077 (replace `TypingEnv::post_analysis()` with `mir::Body::typing_env()`)
 - #165305 (hexagon: pass small aggregates on the stack when registers run out)
 - #165417 (Mention width limit panic in fmt doc)
 - #165860 (Fix inverted wasm cfg in core benchmarks)
@rust-bors

rust-bors Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

⌛ Testing commit bc7546b with merge 15bbc5c...

Workflow: https://github.com/rust-lang/rust/actions/runs/43244562743

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 12, 2026
@rust-bors rust-bors Bot closed this Nov 12, 2026
@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

PR #164864, which is a member of this rollup, changed its commit SHA to 43dc29bb3fab2a69f47900f562f4b1315dda8bcf.

This rollup was thus unapproved due to being closed.

Auto build was cancelled due to push. Cancelled workflows:

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-fmt Area: `core::fmt` A-run-make Area: port run-make Makefiles to rmake.rs rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

9 participants