Skip to content

Rollup of 3 pull requests - #160357

Closed
JonathanBrouwer wants to merge 7 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-9FzcMF3
Closed

Rollup of 3 pull requests#160357
JonathanBrouwer wants to merge 7 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-9FzcMF3

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

folkertdev and others added 7 commits July 18, 2026 16:50
… r=Amanieu

Stabilize passing 128-bit integers via vector registers with `asm!` on x86

tracking issue: rust-lang#133416
reference PR: rust-lang/reference#2313

# Stabilization report

## Summary

Stabilize passing 128-bit integers via vector registers with `asm!` on x86 and x86_64:

```rust
// Use 128-bit integers with vector registers.
let mut v = 0u128;

asm!("/* {:x} */", in(xmm_reg) v);
asm!("/* {:x} */", out(xmm_reg) v);

asm!("/* {:y} */", in(ymm_reg) v);
asm!("/* {:y} */", out(ymm_reg) v);

asm!("/* {:z} */", in(zmm_reg) v);
asm!("/* {:z} */", out(zmm_reg) v);
```

32-bit and 64-bit integer types can already be passed via vector registers. LLVM has supported 128-bit integers since 2019, see llvm/llvm-project#42502, so `rustc` not supporting them seems like an oversight.

This feature is part of [`asm_experimental_reg`](rust-lang#133416). We're not stabilizing that feature as a whole, but only pull out part of it.

## History

- rust-lang#151059

## Open questions

None.

r? Amanieu
Specialize `advance_by` method of `Fuse`

`advance_by` is used a lot internally so it seems important to specialize it.
allocations are allowed to grow (but not shrink)

This got permitted on the LLVM side about a year ago (llvm/llvm-project#141338), but didn't require any code changes since LLVM's optimizations were already compatible with growing allocations. That said, LLVM assumes that allocations created via operations it recognizes (e.g. `malloc`, `alloca`, or the Rust global allocator operations) never change their size, so we have to exclude that case.

This resolves a part of rust-lang/unsafe-code-guidelines#430.

It may seem strange that allocations can grow but not shrink, but we did have multiple users show up in #t-opsem with exactly that request. Cc @nhusung @foonathan; see [here](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Shrinking.20allocations.20in-place/near/612181257) and [here](https://rust-lang.zulipchat.com/#narrow/channel/136281-t-opsem/topic/Shrinking.20allocations.20in-place/near/612191402) for some details about their use-cases.

Cc @rust-lang/opsem @rust-lang/lang
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Aug 1, 2026
@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-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 1, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b5c0faa 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 Aug 1, 2026
@jhpratt jhpratt closed this Aug 1, 2026
@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 Aug 1, 2026
@rust-bors

rust-bors Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@JonathanBrouwer
JonathanBrouwer deleted the rollup-9FzcMF3 branch August 21, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

6 participants