Skip to content

Conversation

pitaj
Copy link
Contributor

@pitaj pitaj commented Sep 7, 2025

Based on #128666

This PR exists to test the perf effects of adding a new intrinsic, like ub_checks, for overflow checks. Tests are expected to fail.

@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2025

r? @jhpratt

rustbot has assigned @jhpratt.
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 rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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 Sep 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 7, 2025

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to constck

cc @fee1-dead

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @vakaras

@rust-log-analyzer

This comment has been minimized.

@jhpratt jhpratt 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-review Status: Awaiting review from the assignee but also interested parties. labels Sep 7, 2025
tests will fail, but this is meant for checking how it affects compile times, which shouldn't be impacted by the broken logic
@pitaj pitaj force-pushed the intrinsic-overflow_checks-trial branch from 3448d96 to 0cae867 Compare September 13, 2025 19:21
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling datafrog v2.0.1
[RUSTC-TIMING] datafrog test:false 0.586
   Compiling polonius-engine v0.13.0
[RUSTC-TIMING] polonius_engine test:false 0.893
error[E0560]: struct `NestedNormalizationGoals<I>` has no field named `1`
   --> compiler/rustc_type_ir/src/solve/mod.rs:251:1
    |
251 | #[derive_where(Clone, Hash, PartialEq, Debug, Default; I: Interner)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | field does not exist
    | in this derive macro expansion
...
254 | pub struct NestedNormalizationGoals<I: Interner>(pub Vec<(GoalSource, Goal<I, I::Predicate>)>);
    |            ------------------------ `NestedNormalizationGoals<_>` defined here
    |
   ::: /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/derive-where-1.6.0/src/lib.rs:567:1
    |
567 | pub fn derive_where_actual(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    | ------------------------------------------------------------------------------------- in this expansion of `#[derive(::derive_where::DeriveWhere)]`

error[E0308]: mismatched types
   --> compiler/rustc_type_ir/src/predicate.rs:18:1
    |
 18 | #[derive_where(Clone, Hash, PartialEq, Debug; I: Interner, A)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | expected `&<I as Interner>::Region`, found `&A`
    | arguments to this function are incorrect
    | in this derive macro expansion
...
 25 | pub struct OutlivesPredicate<I: Interner, A>(pub A, pub I::Region);
    |                                           - found this type parameter
    |
   ::: /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/derive-where-1.6.0/src/lib.rs:567:1
    |
567 | pub fn derive_where_actual(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    | ------------------------------------------------------------------------------------- in this expansion of `#[derive(::derive_where::DeriveWhere)]`
    |
    = note: expected reference `&<I as interner::Interner>::Region`
               found reference `&A`
note: method defined here
   --> /checkout/library/core/src/clone.rs:236:8
    |
236 |     fn clone(&self) -> Self;
    |        ^^^^^
help: consider further restricting this bound
    |
 25 | pub struct OutlivesPredicate<I: Interner<Region = A>, A>(pub A, pub I::Region);
    |                                         ++++++++++++

error[E0560]: struct `predicate::OutlivesPredicate<I, A>` has no field named `2`
   --> compiler/rustc_type_ir/src/predicate.rs:18:1
    |
 18 | #[derive_where(Clone, Hash, PartialEq, Debug; I: Interner, A)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    | |
    | field does not exist
    | in this derive macro expansion
...
 25 | pub struct OutlivesPredicate<I: Interner, A>(pub A, pub I::Region);
    |            ----------------- `predicate::OutlivesPredicate<_, _>` defined here
    |
   ::: /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/derive-where-1.6.0/src/lib.rs:567:1
    |
567 | pub fn derive_where_actual(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
    | ------------------------------------------------------------------------------------- in this expansion of `#[derive(::derive_where::DeriveWhere)]`

[RUSTC-TIMING] rustc_apfloat test:false 1.175
   Compiling rustc_hir v0.0.0 (/checkout/compiler/rustc_hir)
Some errors have detailed explanations: E0308, E0560.
For more information about an error, try `rustc --explain E0308`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. 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.

4 participants