Skip to content

Conversation

@jhpratt
Copy link
Member

@jhpratt jhpratt commented Jan 16, 2026

Successful merges:

r? @ghost

Create a similar rollup

Flakebi and others added 11 commits January 9, 2026 10:41
Add a rustc intrinsic `amdgpu_dispatch_ptr` to access the kernel
dispatch packet on amdgpu.
The HSA kernel dispatch packet contains important information like the
launch size and workgroup size.

The Rust intrinsic lowers to the `llvm.amdgcn.dispatch.ptr` LLVM
intrinsic, which returns a `ptr addrspace(4)`, plus an addrspacecast to
`addrspace(0)`, so it can be returned as a Rust reference.

The returned pointer/reference is valid for the whole program lifetime,
and is therefore `'static`.

The return type of the intrinsic (`*const ()`) does not mention the
struct so that rustc does not need to know the exact struct type.
An alternative would be to define the struct as lang item or add a
generic argument to the function.

Short version:
```rust
#[cfg(target_arch = "amdgpu")]
pub fn amdgpu_dispatch_ptr() -> *const ();
```
Co-authored-by: ericinB <ericbncer@gmail.com>
merge privacy/privacy-sanity-2 with privacy/privacy-sanity.rs

Add comment to generics/type-args-on-module-in-bound.rs

Add comment to array-slice-vec/closure-in-array-eln.rs

Add comment to array-slice-vec/return-in-array-len.rs

Merge for-loop-while/break-outside-loop-2.rs with
for-loop-while/break-outside-loop.rs

Add comment to macros/column-macro-collision.rs

Add comment to privacy/private-extern-fn-visibility.rs

Add comment to mismatched_types/vec-hashset-type-mismatch.rs

Merge std-sync-right-kind-impls-2.rs with std-sync-right-kind-impls.rs

Add comment to array-slice-vec/slice-of-multi-ref.rs

Add comment to mismatched_types\vec-hashset-type-mismatch.rs

Add comment to derives/derive-hygiene-struct-builder.rs

Add comment to label/undeclared-label-span.rs

Add comment to label\undeclared-label-span.rs

Add comment to mismatched_types/array-repeat-unit-struct.rs
…ubilee

Add amdgpu_dispatch_ptr intrinsic

There is an ongoing discussion in rust-lang#150452 about using address spaces from the Rust language in some way.
As that discussion will likely not conclude soon, this PR adds one rustc_intrinsic with an addrspacecast to unblock getting basic information like launch and workgroup size and make it possible to implement something like `core::gpu`.

Add a rustc intrinsic `amdgpu_dispatch_ptr` to access the kernel dispatch packet on amdgpu.
The HSA kernel dispatch packet contains important information like the launch size and workgroup size.

The Rust intrinsic lowers to the `llvm.amdgcn.dispatch.ptr` LLVM intrinsic, which returns a `ptr addrspace(4)`, plus an addrspacecast to `addrspace(0)`, so it can be returned as a Rust reference.
The returned pointer/reference is valid for the whole program lifetime, and is therefore `'static`.
The return type of the intrinsic (`&'static ()`) does not mention the struct so that rustc does not need to know the exact struct type. An alternative would be to define the struct as lang item or add a generic argument to the function.
Is this ok or is there a better way (also, should it return a pointer instead of a reference)?

Short version:
```rust
#[cfg(target_arch = "amdgpu")]
pub fn amdgpu_dispatch_ptr() -> *const ();
```

Tracking issue: rust-lang#135024
Unify and deduplicate From<T> float tests

cc rust-lang#141726

Unify the From<bool> tests from f16.rs and f128.rs into a single float_test! in mod.rs.
Silence unused type param error on struct parse error

Given

```
#[derive(Clone)]
struct B<T> {
    a: A<(T, u32)> // <- note, comma is missing here
    /// asdf
    b: u32,
}
```

do not emit unnecessary "unused `T`" error.

Fix rust-lang#141403.
Tidying up `tests/ui/issues` 15 tests [8/N]

> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed add comment commit prior to merge.

part of rust-lang#133895

There are some tests named {xxx}-2, which are meant to be merged with {xxx}.

r? Kivooeo
Stabilise `EULER_GAMMA` and `GOLDEN_RATIO` constants for `f32` and `f64`.

Tracking issue: rust-lang#146939

This PR renames the `EGAMMA` and `PHI` constants to `EULER_GAMMA` and `GOLDEN_RATIO` – respectively – and stabilises them under these names for `f32` and `f64`:

```rust
// core::f16::consts

pub const GOLDEN_RATIO: f16;

pub const EULER_GAMMA: f16;

// core::f32::consts

pub const GOLDEN_RATIO: f32;

pub const EULER_GAMMA: f32;

// core::f64::consts

pub const GOLDEN_RATIO: f64;

pub const EULER_GAMMA: f64;

// core::f128::consts

pub const GOLDEN_RATIO: f128;

pub const EULER_GAMMA: f128;
```

The feature gate for the stabilised items is also changed to `euler_gamma_golden_ratio`.
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Jan 16, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 Jan 16, 2026
@jhpratt
Copy link
Member Author

jhpratt commented Jan 16, 2026

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 16, 2026

📌 Commit c3120ff has been approved by jhpratt

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 Jan 16, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 16, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 16, 2026

☀️ Test successful - CI
Approved by: jhpratt
Pushing bcf787a to main...

@rust-bors rust-bors bot merged commit bcf787a into rust-lang:main Jan 16, 2026
12 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Jan 16, 2026
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#150607 Add amdgpu_dispatch_ptr intrinsic 816f9e9a555db1af19d18e46fe95f21dc45154ca (link)
#150611 Unify and deduplicate From float tests 141e6fb62fc8d82a8966ad8eb63489e3c8c4d205 (link)
#151082 Silence unused type param error on struct parse error 8c9140d7c3d27bf2934cc87d6cff5805dd9c01b1 (link)
#151159 Tidying up tests/ui/issues 15 tests [8/N] 2dbdd64c0e5032f7d4589f5bc1d6a0a613430cc7 (link)
#151164 Stabilise EULER_GAMMA and GOLDEN_RATIO constants for `f… 60f82d25c95b694d312446346f11090c3ebdef2f (link)

previous master: 18ae990755

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@github-actions
Copy link
Contributor

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 18ae990 (parent) -> bcf787a (this PR)

Test differences

Show 378 test diffs

Stage 1

  • [ui] tests/ui/array-slice-vec/closure-in-array-len.rs: [missing] -> pass (J1)
  • [ui] tests/ui/array-slice-vec/return-in-array-len.rs: [missing] -> pass (J1)
  • [ui] tests/ui/array-slice-vec/slice-of-multi-ref.rs: [missing] -> pass (J1)
  • [ui] tests/ui/derives/derive-hygiene-struct-builder.rs: [missing] -> pass (J1)
  • [ui] tests/ui/dst/unsized-str-mutability.rs: [missing] -> pass (J1)
  • [ui] tests/ui/generics/type-args-on-module-in-bound.rs: [missing] -> pass (J1)
  • [ui] tests/ui/issues/issue-16725.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-17361.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-17503.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-22577.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-22706.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-22894.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-24819.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-27008.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-28105.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-28109.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-28433.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-42453.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-43057.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-50600.rs: pass -> [missing] (J1)
  • [ui] tests/ui/issues/issue-51714.rs: pass -> [missing] (J1)
  • [ui] tests/ui/label/undeclared-label-span.rs: [missing] -> pass (J1)
  • [ui] tests/ui/macros/column-macro-collision.rs: [missing] -> pass (J1)
  • [ui] tests/ui/mismatched_types/array-repeat-unit-struct.rs: [missing] -> pass (J1)
  • [ui] tests/ui/mismatched_types/vec-hashset-type-mismatch.rs: [missing] -> pass (J1)
  • [ui] tests/ui/privacy/private-extern-fn-visibility.rs: [missing] -> pass (J1)
  • [ui] tests/ui/static/static-str-deref-ref.rs: [missing] -> pass (J1)
  • [ui] tests/ui/structs/parse-error-with-type-param.rs: [missing] -> pass (J1)
  • [codegen] tests/codegen-llvm/amdgpu-dispatch-ptr.rs: [missing] -> pass (J3)
  • floats::f128::test_from: pass -> [missing] (J3)
  • floats::f16::test_from: pass -> [missing] (J3)
  • floats::from::const_::test_f128: [missing] -> pass (J3)
  • floats::from::const_::test_f16: [missing] -> pass (J3)
  • floats::from::const_::test_f32: [missing] -> pass (J3)
  • floats::from::const_::test_f64: [missing] -> pass (J3)
  • floats::from::test_f128: [missing] -> pass (J3)
  • floats::from::test_f16: [missing] -> pass (J3)
  • floats::from::test_f32: [missing] -> pass (J3)
  • floats::from::test_f64: [missing] -> pass (J3)
  • floats::from_u16_i16::const_::test_f128: [missing] -> pass (J3)
  • floats::from_u16_i16::const_::test_f32: [missing] -> pass (J3)
  • floats::from_u16_i16::const_::test_f64: [missing] -> pass (J3)
  • floats::from_u16_i16::test_f128: [missing] -> pass (J3)
  • floats::from_u16_i16::test_f32: [missing] -> pass (J3)
  • floats::from_u16_i16::test_f64: [missing] -> pass (J3)
  • floats::from_u32_i32::const_::test_f128: [missing] -> pass (J3)
  • floats::from_u32_i32::const_::test_f64: [missing] -> pass (J3)
  • floats::from_u32_i32::test_f128: [missing] -> pass (J3)
  • floats::from_u32_i32::test_f64: [missing] -> pass (J3)

Stage 2

  • floats::from::const_::test_f128: [missing] -> pass (J0)
  • floats::from::const_::test_f16: [missing] -> pass (J0)
  • floats::from::const_::test_f32: [missing] -> pass (J0)
  • floats::from::const_::test_f64: [missing] -> pass (J0)
  • floats::from::test_f32: [missing] -> pass (J0)
  • floats::from::test_f64: [missing] -> pass (J0)
  • floats::from_u16_i16::const_::test_f128: [missing] -> pass (J0)
  • floats::from_u16_i16::const_::test_f32: [missing] -> pass (J0)
  • floats::from_u16_i16::const_::test_f64: [missing] -> pass (J0)
  • floats::from_u16_i16::test_f32: [missing] -> pass (J0)
  • floats::from_u16_i16::test_f64: [missing] -> pass (J0)
  • floats::from_u32_i32::const_::test_f128: [missing] -> pass (J0)
  • floats::from_u32_i32::const_::test_f64: [missing] -> pass (J0)
  • floats::from_u32_i32::test_f64: [missing] -> pass (J0)
  • [ui] tests/ui/array-slice-vec/closure-in-array-len.rs: [missing] -> pass (J2)
  • [ui] tests/ui/array-slice-vec/return-in-array-len.rs: [missing] -> pass (J2)
  • [ui] tests/ui/array-slice-vec/slice-of-multi-ref.rs: [missing] -> pass (J2)
  • [ui] tests/ui/derives/derive-hygiene-struct-builder.rs: [missing] -> pass (J2)
  • [ui] tests/ui/dst/unsized-str-mutability.rs: [missing] -> pass (J2)
  • [ui] tests/ui/generics/type-args-on-module-in-bound.rs: [missing] -> pass (J2)
  • [ui] tests/ui/issues/issue-16725.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-17361.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-17503.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-22577.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-22706.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-22894.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-24819.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-27008.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-28105.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-28109.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-28433.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-42453.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-43057.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-50600.rs: pass -> [missing] (J2)
  • [ui] tests/ui/issues/issue-51714.rs: pass -> [missing] (J2)
  • [ui] tests/ui/label/undeclared-label-span.rs: [missing] -> pass (J2)
  • [ui] tests/ui/macros/column-macro-collision.rs: [missing] -> pass (J2)
  • [ui] tests/ui/mismatched_types/array-repeat-unit-struct.rs: [missing] -> pass (J2)
  • [ui] tests/ui/mismatched_types/vec-hashset-type-mismatch.rs: [missing] -> pass (J2)
  • [ui] tests/ui/privacy/private-extern-fn-visibility.rs: [missing] -> pass (J2)
  • [ui] tests/ui/static/static-str-deref-ref.rs: [missing] -> pass (J2)
  • [ui] tests/ui/structs/parse-error-with-type-param.rs: [missing] -> pass (J2)
  • floats::f128::test_from: pass -> [missing] (J4)
  • floats::f16::test_from: pass -> [missing] (J4)
  • floats::from::test_f128: [missing] -> pass (J4)
  • floats::from::test_f16: [missing] -> pass (J4)
  • floats::from_u16_i16::test_f128: [missing] -> pass (J4)
  • floats::from_u32_i32::test_f128: [missing] -> pass (J4)
  • [codegen] tests/codegen-llvm/amdgpu-dispatch-ptr.rs: [missing] -> pass (J5)

Additionally, 280 doctest diffs 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 bcf787a7805d6f26586409eb0ed7e4a739c7d687 --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. dist-x86_64-apple: 7598.9s -> 10404.9s (+36.9%)
  2. aarch64-apple: 10606.8s -> 9322.7s (-12.1%)
  3. dist-various-1: 4102.0s -> 4551.9s (+11.0%)
  4. dist-aarch64-llvm-mingw: 5773.8s -> 6348.6s (+10.0%)
  5. x86_64-msvc-ext2: 5549.9s -> 6061.3s (+9.2%)
  6. dist-aarch64-msvc: 6386.7s -> 5842.8s (-8.5%)
  7. dist-arm-linux-gnueabi: 5000.7s -> 5386.9s (+7.7%)
  8. i686-msvc-1: 9798.1s -> 10544.2s (+7.6%)
  9. dist-x86_64-llvm-mingw: 7064.7s -> 6602.2s (-6.5%)
  10. dist-apple-various: 4223.3s -> 3951.3s (-6.4%)
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.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bcf787a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary 2.0%, secondary 2.3%)

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

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
2.3% [2.0%, 3.0%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Cycles

Results (secondary -2.7%)

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

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

Binary size

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

Bootstrap: 471.758s -> 473.462s (0.36%)
Artifact size: 383.58 MiB -> 383.62 MiB (0.01%)

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. 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.

8 participants