Skip to content

[WIP] MIR move elimination pass#156046

Draft
Amanieu wants to merge 13 commits intorust-lang:mainfrom
Amanieu:move-elimination
Draft

[WIP] MIR move elimination pass#156046
Amanieu wants to merge 13 commits intorust-lang:mainfrom
Amanieu:move-elimination

Conversation

@Amanieu
Copy link
Copy Markdown
Member

@Amanieu Amanieu commented May 1, 2026

View all comments

This is very much a work in progress, and will sometimes generate broken/unsound MIR.

@rustbot rustbot added 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. labels May 1, 2026
@Amanieu
Copy link
Copy Markdown
Member Author

Amanieu commented May 1, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2026
rust-bors Bot pushed a commit that referenced this pull request May 1, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 1, 2026

💔 Test for 884fdb2 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@Amanieu Amanieu force-pushed the move-elimination branch from 8a0479a to d431a34 Compare May 1, 2026 17:02
@Amanieu
Copy link
Copy Markdown
Member Author

Amanieu commented May 1, 2026

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 1, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 1, 2026

💔 Test for b42852b failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

Amanieu added 3 commits May 3, 2026 14:18
- Changed `iter_intervals` to return `RangeInclusive` instead of `Range`
- Added `clear_row`, `disjoint_rows` and `append_range` methods
@Amanieu Amanieu force-pushed the move-elimination branch from d431a34 to a226132 Compare May 3, 2026 13:33
@rust-log-analyzer

This comment has been minimized.

@Amanieu
Copy link
Copy Markdown
Member Author

Amanieu commented May 3, 2026

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 3, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 3, 2026

💔 Test for 8165e10 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@Amanieu Amanieu force-pushed the move-elimination branch from a226132 to 54b60b7 Compare May 3, 2026 22:38
@Amanieu
Copy link
Copy Markdown
Member Author

Amanieu commented May 3, 2026

@bors try

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 4, 2026
@Amanieu
Copy link
Copy Markdown
Member Author

Amanieu commented May 4, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 4, 2026
rust-bors Bot pushed a commit that referenced this pull request May 4, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 4, 2026

☀️ Try build successful (CI)
Build commit: bc25cfa (bc25cfa7e76a09aca94729dec92a782544a9cec4, parent: cb40c25f6aebb637163d26bf76a680ed6e5d1eda)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (bc25cfa): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +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)
7.5% [0.1%, 99.2%] 74
Regressions ❌
(secondary)
120.8% [0.0%, 4875.6%] 87
Improvements ✅
(primary)
-1.0% [-7.0%, -0.2%] 143
Improvements ✅
(secondary)
-1.1% [-10.6%, -0.0%] 152
All ❌✅ (primary) 1.9% [-7.0%, 99.2%] 217

Max RSS (memory usage)

Results (primary 6.8%, secondary 25.1%)

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

mean range count
Regressions ❌
(primary)
7.8% [1.5%, 30.9%] 37
Regressions ❌
(secondary)
33.4% [1.6%, 175.8%] 13
Improvements ✅
(primary)
-2.5% [-3.7%, -1.4%] 4
Improvements ✅
(secondary)
-2.0% [-2.7%, -0.8%] 4
All ❌✅ (primary) 6.8% [-3.7%, 30.9%] 41

Cycles

Results (primary 24.4%, secondary 1817.2%)

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

mean range count
Regressions ❌
(primary)
59.4% [1.6%, 642.5%] 26
Regressions ❌
(secondary)
6962.3% [0.9%, 61558.9%] 17
Improvements ✅
(primary)
-3.2% [-6.1%, -1.9%] 33
Improvements ✅
(secondary)
-5.1% [-22.6%, -1.0%] 48
All ❌✅ (primary) 24.4% [-6.1%, 642.5%] 59

Binary size

Results (primary 4.8%, secondary 2.8%)

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

mean range count
Regressions ❌
(primary)
5.9% [0.1%, 95.1%] 109
Regressions ❌
(secondary)
3.3% [0.1%, 71.4%] 135
Improvements ✅
(primary)
-0.9% [-2.7%, -0.2%] 22
Improvements ✅
(secondary)
-1.0% [-4.9%, -0.2%] 20
All ❌✅ (primary) 4.8% [-2.7%, 95.1%] 131

Bootstrap: 497.794s -> 533.437s (7.16%)
Artifact size: 396.40 MiB -> 393.34 MiB (-0.77%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 5, 2026
@Amanieu
Copy link
Copy Markdown
Member Author

Amanieu commented May 5, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 5, 2026
rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
@rust-bors

This comment has been minimized.

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
##[endgroup]
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
PR_CI_JOB set; skipping tidy
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
---
test [mir-opt] tests/mir-opt/unusual_item_types.rs ... ok

failures:

---- [mir-opt] tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs stdout ----
9           debug a => _1;
10       }
11       scope 2 (inlined <Box<[bool]> as Default>::default) {
-           let _3: std::ptr::Unique<[bool]>;
-           let mut _4: std::ptr::Unique<[bool; 0]>;
+           let mut _3: std::ptr::Unique<[bool; 0]>;
14           scope 3 {
15           }
16           scope 4 (inlined std::ptr::Unique::<[bool; 0]>::dangling) {

-               let mut _5: std::ptr::NonNull<[bool; 0]>;
18               scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
19                   scope 6 {
20                       scope 8 (inlined std::mem::Alignment::as_nonzero_usize) {

32           StorageLive(_1);
33           StorageLive(_2);
34           StorageLive(_3);
-           StorageLive(_4);
-           StorageLive(_5);
- -         _5 = const <[bool; 0] as std::mem::SizedTypeProperties>::ALIGNMENT as std::ptr::NonNull<[bool; 0]> (Transmute);
- -         _4 = std::ptr::Unique::<[bool; 0]> { pointer: move _5, _marker: const PhantomData::<[bool; 0]> };
- +         _5 = const NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} is !null }};
- +         _4 = const std::ptr::Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} is !null }}, _marker: PhantomData::<[bool; 0]> }};
-           StorageDead(_5);
- -         _3 = move _4 as std::ptr::Unique<[bool]> (PointerCoercion(Unsize, Implicit));
- +         _3 = const std::ptr::Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: (*const [bool]) is !null }}, _marker: PhantomData::<[bool]> }};
-           StorageDead(_4);
- -         _2 = Box::<[bool]>(copy _3, const std::alloc::Global);
- +         _2 = const Box::<[bool]>(std::ptr::Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: (*const [bool]) is !null }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
+ -         (_3.0: std::ptr::NonNull<[bool; 0]>) = const <[bool; 0] as std::mem::SizedTypeProperties>::ALIGNMENT as std::ptr::NonNull<[bool; 0]> (Transmute);
+ +         (_3.0: std::ptr::NonNull<[bool; 0]>) = const NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} is !null }};
+           (_2.0: std::ptr::Unique<[bool]>) = move _3 as std::ptr::Unique<[bool]> (PointerCoercion(Unsize, Implicit));
47           StorageDead(_3);
- -         _1 = A { foo: move _2 };
- +         _1 = const A {{ foo: Box::<[bool]>(std::ptr::Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: (*const [bool]) is !null }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) }};
+ -         (_2.1: std::alloc::Global) = no_retag const std::alloc::Global;
+ +         (_2.1: std::alloc::Global) = const std::alloc::Global;
+           _1 = A { foo: move _2 };
50           StorageDead(_2);
51           _0 = const ();
52           drop(_1) -> [return: bb1, unwind: bb2];

61           resume;
62       }
63   }
- + 
- + ALLOC2 (size: 16, align: 8) { .. }
- + 
- + ALLOC1 (size: 16, align: 8) { .. }
- + 
- + ALLOC0 (size: 16, align: 8) { .. }
70   
71 


thread '[mir-opt] tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.GVN.64bit.panic-unwind.diff
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
---
153       bb11: {
154           StorageDead(_22);
155           StorageLive(_24);
-           StorageLive(_25);
-           _25 = copy (((*_1).0: std::fmt::FormattingOptions).2: u16);
-           _24 = move _25 as usize (IntToInt);
-           StorageDead(_25);
-           _6 = Option::<usize>::Some(move _24);
+           _24 = copy (((*_1).0: std::fmt::FormattingOptions).2: u16);
+           ((_6 as variant#1).0: usize) = move _24 as usize (IntToInt);
161           StorageDead(_24);
+           discriminant(_6) = 1;
162           goto -> bb9;
163       }
164   


thread '[mir-opt] tests/mir-opt/funky_arms.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/funky_arms.float_to_exponential_common.GVN.64bit.panic-unwind.diff
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
  10: <compiletest::runtest::TestCx>::run_revision
  11: compiletest::runtest::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- [mir-opt] tests/mir-opt/funky_arms.rs stdout end ----
---- [mir-opt] tests/mir-opt/gvn_copy_constant_projection.rs stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/mir-opt/gvn_copy_constant_projection.rs:7:12: error: CHECK: expected string not found in input
 // CHECK: [[lhs:_.*]] = copy _1[0 of 1];
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/gvn_copy_constant_projection/gvn_copy_constant_projection.mir:4:27: note: scanning from here
fn compare_constant_index(_1: [i32; 1], _2: [i32; 1]) -> std::cmp::Ordering {
                          ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/gvn_copy_constant_projection/gvn_copy_constant_projection.mir:12:21: note: possible intended match here
 _0 = Cmp(move _1[0 of 1], move _2[0 of 1]);
                    ^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/gvn_copy_constant_projection/gvn_copy_constant_projection.mir
Check file: /checkout/tests/mir-opt/gvn_copy_constant_projection.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: // WARNING: This output format is intended for human consumers only 
           2: // and is subject to change without notice. Knock yourself out. 
           3: // HINT: See also -Z dump-mir for MIR at specific points during compilation. 
           4: fn compare_constant_index(_1: [i32; 1], _2: [i32; 1]) -> std::cmp::Ordering { 
check:7'0                               X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           5:  debug x => _1; 
check:7'0     ~~~~~~~~~~~~~~~~
           6:  debug y => _2; 
check:7'0     ~~~~~~~~~~~~~~~~
           7:  let mut _0: std::cmp::Ordering; 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           8:  scope 1 (inlined std::cmp::impls::<impl Ord for i32>::cmp) { 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           9:  } 
check:7'0     ~~~
          10:  
check:7'0     ~
          11:  bb0: { 
check:7'0     ~~~~~~~~
          12:  _0 = Cmp(move _1[0 of 1], move _2[0 of 1]); 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:7'1                         ?                         possible intended match
          13:  return; 
check:7'0     ~~~~~~~~~
          14:  } 
check:7'0     ~~~
          15: } 
check:7'0     ~~
          16:  
check:7'0     ~
          17: const compare_constant_index::{constant#0}: usize = const 1_usize; 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          18:  
check:7'0     ~
          19: const compare_constant_index::{constant#1}: usize = const 1_usize; 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          20:  
check:7'0     ~
          21: fn main() -> () { 
check:7'0     ~~~~~~~~~~~~~~~~~~
          22:  let mut _0: (); 
check:7'0     ~~~~~~~~~~~~~~~~~
          23:  scope 1 (inlined compare_constant_index) { 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          24:  scope 2 (inlined std::cmp::impls::<impl Ord for i32>::cmp) { 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  } 
check:7'0     ~~~
          26:  } 
check:7'0     ~~~
          27:  
check:7'0     ~
          28:  bb0: { 
check:7'0     ~~~~~~~~
          29:  return; 
---
------------------------------------------

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-21/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/gvn_copy_constant_projection/gvn_copy_constant_projection.mir" "/checkout/tests/mir-opt/gvn_copy_constant_projection.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/mir-opt/gvn_copy_constant_projection.rs:7:12: error: CHECK: expected string not found in input
 // CHECK: [[lhs:_.*]] = copy _1[0 of 1];
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/gvn_copy_constant_projection/gvn_copy_constant_projection.mir:4:27: note: scanning from here
fn compare_constant_index(_1: [i32; 1], _2: [i32; 1]) -> std::cmp::Ordering {
                          ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/gvn_copy_constant_projection/gvn_copy_constant_projection.mir:12:21: note: possible intended match here
 _0 = Cmp(move _1[0 of 1], move _2[0 of 1]);
                    ^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/gvn_copy_constant_projection/gvn_copy_constant_projection.mir
Check file: /checkout/tests/mir-opt/gvn_copy_constant_projection.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           1: // WARNING: This output format is intended for human consumers only 
           2: // and is subject to change without notice. Knock yourself out. 
           3: // HINT: See also -Z dump-mir for MIR at specific points during compilation. 
           4: fn compare_constant_index(_1: [i32; 1], _2: [i32; 1]) -> std::cmp::Ordering { 
check:7'0                               X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           5:  debug x => _1; 
check:7'0     ~~~~~~~~~~~~~~~~
           6:  debug y => _2; 
check:7'0     ~~~~~~~~~~~~~~~~
           7:  let mut _0: std::cmp::Ordering; 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           8:  scope 1 (inlined std::cmp::impls::<impl Ord for i32>::cmp) { 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           9:  } 
check:7'0     ~~~
          10:  
check:7'0     ~
          11:  bb0: { 
check:7'0     ~~~~~~~~
          12:  _0 = Cmp(move _1[0 of 1], move _2[0 of 1]); 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:7'1                         ?                         possible intended match
          13:  return; 
check:7'0     ~~~~~~~~~
          14:  } 
check:7'0     ~~~
          15: } 
check:7'0     ~~
          16:  
check:7'0     ~
          17: const compare_constant_index::{constant#0}: usize = const 1_usize; 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          18:  
check:7'0     ~
          19: const compare_constant_index::{constant#1}: usize = const 1_usize; 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          20:  
check:7'0     ~
          21: fn main() -> () { 
check:7'0     ~~~~~~~~~~~~~~~~~~
          22:  let mut _0: (); 
check:7'0     ~~~~~~~~~~~~~~~~~
          23:  scope 1 (inlined compare_constant_index) { 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          24:  scope 2 (inlined std::cmp::impls::<impl Ord for i32>::cmp) { 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          25:  } 
check:7'0     ~~~
          26:  } 
check:7'0     ~~~
          27:  
check:7'0     ~
          28:  bb0: { 
check:7'0     ~~~~~~~~
          29:  return; 
---
check:7'0     ~~
>>>>>>
------------------------------------------

---- [mir-opt] tests/mir-opt/gvn_copy_constant_projection.rs stdout end ----
---- [mir-opt] tests/mir-opt/inline/inline_closure_captures.rs stdout ----
15         debug x => _3;
16         scope 2 (inlined foo::<T>::{closure#0}) {
17             let mut _10: &i32;
-             let mut _11: i32;
-             let mut _12: &T;
-             let mut _13: T;
+             let mut _11: &T;
21         }
22     }
23 

39         StorageLive(_9);
40         _9 = move (_7.0: i32);
41         StorageLive(_10);
-         StorageLive(_12);
43         StorageLive(_11);
44         _10 = no_retag copy ((*_6).0: &i32);
-         _11 = copy (*_10);
-         StorageLive(_13);
-         _12 = no_retag copy ((*_6).1: &T);
-         _13 = copy (*_12);
-         _0 = (move _11, move _13);
-         StorageDead(_13);
+         (_0.0: i32) = copy (*_10);
+         _11 = no_retag copy ((*_6).1: &T);
+         (_0.1: T) = copy (*_11);
51         StorageDead(_11);
-         StorageDead(_12);
53         StorageDead(_10);
54         StorageDead(_9);
55         StorageDead(_8);


thread '[mir-opt] tests/mir-opt/inline/inline_closure_captures.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
  10: <compiletest::runtest::TestCx>::run_revision
  11: compiletest::runtest::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- [mir-opt] tests/mir-opt/inline/inline_closure_captures.rs stdout end ----
---- [mir-opt] tests/mir-opt/inline/inline_coroutine.rs stdout ----
22 +         debug a => _5;
23 +         let mut _6: &mut {coroutine@$DIR/inline_coroutine.rs:20:5: 20:8};
24 +         let mut _7: u32;
- +         let mut _8: i32;
26 +     }
27   
28       bb0: {

82 -     bb5 (cleanup): {
83 -         drop(_4) -> [return: bb6, unwind terminate(cleanup)];
84 +     bb5: {
- +         StorageLive(_8);
86 +         switchInt(copy _5) -> [0: bb6, otherwise: bb7];
87       }
88   

89 -     bb6 (cleanup): {
90 -         resume;
91 +     bb6: {
- +         _8 = const 13_i32;
+ +         ((_1 as variant#0).0: i32) = const 13_i32;
93 +         goto -> bb8;
94 +     }
95 + 

96 +     bb7: {
- +         _8 = const 7_i32;
+ +         ((_1 as variant#0).0: i32) = const 7_i32;
98 +         goto -> bb8;
99 +     }
100 + 

101 +     bb8: {
- +         _1 = CoroutineState::<i32, bool>::Yielded(move _8);
- +         StorageDead(_8);
+ +         discriminant(_1) = 0;
104 +         discriminant((*_6)) = 3;
105 +         goto -> bb4;
106 +     }

110 +     }
111 + 
112 +     bb10: {
- +         StorageLive(_8);
- +         StorageDead(_8);
115 +         _1 = CoroutineState::<i32, bool>::Complete(copy _5);
116 +         discriminant((*_6)) = 1;
117 +         goto -> bb4;


thread '[mir-opt] tests/mir-opt/inline/inline_coroutine.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
  10: <compiletest::runtest::TestCx>::run_revision
  11: compiletest::runtest::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- [mir-opt] tests/mir-opt/inline/inline_coroutine.rs stdout end ----
---- [mir-opt] tests/mir-opt/inline/inline_diverging.rs stdout ----
5       let mut _0: ();
6       let _1: (!, !);
7 +     let mut _2: fn() -> ! {sleep};
+ +     let mut _5: !;
+ +     let mut _6: ();
+ +     let mut _7: !;
8 +     let mut _8: ();
- +     let mut _9: ();
10 +     scope 1 (inlined call_twice::<!, fn() -> ! {sleep}>) {
11 +         debug f => _2;
12 +         let mut _3: &fn() -> ! {sleep};

- +         let _4: !;
- +         let mut _5: &fn() -> ! {sleep};
- +         let mut _7: !;
+ +         let mut _4: &fn() -> ! {sleep};
16 +         scope 2 {
- +             debug a => _4;
- +             let _6: !;
+ +             debug a => (_1.0: !);
19 +             scope 3 {
- +                 debug b => _6;
+ +                 debug b => (_1.1: !);
21 +             }
22 +             scope 6 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) {
23 +                 scope 7 (inlined sleep) {

35 -         _1 = call_twice::<!, fn() -> ! {sleep}>(sleep) -> unwind continue;
36 +         StorageLive(_2);
37 +         _2 = sleep;
- +         StorageLive(_4);
39 +         StorageLive(_3);
40 +         _3 = &_2;
---
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
  10: <compiletest::runtest::TestCx>::run_revision
  11: compiletest::runtest::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- [mir-opt] tests/mir-opt/inline/inline_diverging.rs stdout end ----
---- [mir-opt] tests/mir-opt/inline_coroutine_body.rs stdout ----
50 +                         scope 12 (inlined Pin::<&mut std::future::Ready<()>>::new_unchecked) {
51 +                         }
52 +                         scope 13 (inlined <std::future::Ready<()> as Future>::poll) {
- +                             let mut _34: ();
- +                             let mut _35: std::option::Option<()>;
- +                             let mut _36: &mut std::option::Option<()>;
- +                             let mut _37: &mut std::future::Ready<()>;
- +                             let mut _38: &mut std::pin::Pin<&mut std::future::Ready<()>>;
+ +                             let mut _33: std::option::Option<()>;
+ +                             let mut _34: &mut std::option::Option<()>;
+ +                             let mut _35: &mut std::future::Ready<()>;
+ +                             let mut _36: &mut std::pin::Pin<&mut std::future::Ready<()>>;
58 +                             scope 14 (inlined <Pin<&mut std::future::Ready<()>> as DerefMut>::deref_mut) {
- +                                 let mut _39: *mut std::pin::helper::PinHelper<&mut std::future::Ready<()>>;
- +                                 let mut _40: *mut std::pin::Pin<&mut std::future::Ready<()>>;
+ +                                 let mut _37: *mut std::pin::helper::PinHelper<&mut std::future::Ready<()>>;
+ +                                 let mut _38: *mut std::pin::Pin<&mut std::future::Ready<()>>;
61 +                                 scope 15 (inlined <pin::helper::PinHelper<&mut std::future::Ready<()>> as pin::helper::PinDerefMutHelper>::deref_mut) {
- +                                     let mut _41: &mut &mut std::future::Ready<()>;
+ +                                     let mut _39: &mut &mut std::future::Ready<()>;
63 +                                     scope 16 (inlined <&mut std::future::Ready<()> as DerefMut>::deref_mut) {
64 +                                     }
65 +                                 }

66 +                             }
67 +                             scope 17 (inlined Option::<()>::take) {
- +                                 let mut _42: std::option::Option<()>;
+ +                                 let mut _40: std::option::Option<()>;
69 +                                 scope 18 (inlined std::mem::replace::<Option<()>>) {
70 +                                     scope 19 {
71 +                                     }

72 +                                 }
73 +                             }
74 +                             scope 20 (inlined #[track_caller] Option::<()>::expect) {
- +                                 let mut _43: isize;
- +                                 let mut _44: !;
+ +                                 let mut _41: isize;
+ +                                 let mut _42: !;
77 +                                 scope 21 {
78 +                                 }
79 +                             }

80 +                         }
81 +                     }
82 +                     scope 10 (inlined ready::<()>) {
- +                         let mut _33: std::option::Option<()>;
84 +                     }
85 +                     scope 11 (inlined <std::future::Ready<()> as IntoFuture>::into_future) {
86 +                     }

170 +         StorageLive(_13);
171 +         StorageLive(_14);
172 +         _14 = ();
- +         StorageLive(_33);
- +         _33 = Option::<()>::Some(copy _14);
- +         _13 = std::future::Ready::<()>(move _33);
- +         StorageDead(_33);
+ +         (_13.0: std::option::Option<()>) = Option::<()>::Some(copy _14);
177 +         StorageDead(_14);
178 +         _12 = move _13;
179 +         StorageDead(_13);

200 +         _23 = move _24;
201 +         _22 = &mut (*_23);
202 +         StorageDead(_24);
- +         StorageLive(_37);
- +         StorageLive(_39);
- +         StorageLive(_44);
- +         StorageLive(_34);
207 +         StorageLive(_35);
+ +         StorageLive(_37);
+ +         StorageLive(_42);
+ +         StorageLive(_38);
+ +         _38 = &raw mut _19;
+ +         _37 = copy _38 as *mut std::pin::helper::PinHelper<&mut std::future::Ready<()>> (PtrToPtr);
+ +         StorageDead(_38);
+ +         _35 = no_retag copy ((*_37).0: &mut std::future::Ready<()>);
208 +         StorageLive(_40);
- +         _40 = &raw mut _19;
- +         _39 = copy _40 as *mut std::pin::helper::PinHelper<&mut std::future::Ready<()>> (PtrToPtr);
+ +         _40 = Option::<()>::None;
+ +         StorageLive(_33);
+ +         _33 = copy ((*_35).0: std::option::Option<()>);
+ +         ((*_35).0: std::option::Option<()>) = move _40;
211 +         StorageDead(_40);
- +         _37 = no_retag copy ((*_39).0: &mut std::future::Ready<()>);
- +         StorageLive(_42);
- +         _42 = Option::<()>::None;
- +         _35 = copy ((*_37).0: std::option::Option<()>);
- +         ((*_37).0: std::option::Option<()>) = move _42;
- +         StorageDead(_42);
- +         StorageLive(_43);
- +         _43 = discriminant(_35);
- +         switchInt(move _43) -> [0: bb16, 1: bb17, otherwise: bb7];
+ +         StorageLive(_41);
+ +         _41 = discriminant(_33);
+ +         switchInt(move _41) -> [0: bb17, 1: bb18, otherwise: bb16];
221       }
222   
223 -     bb6 (cleanup): {

299 +     }
300 + 
301 +     bb16: {
- +         _44 = option::expect_failed(const "`Ready` polled after completion") -> bb11;
+ +         StorageDead(_33);
+ +         unreachable;
303 +     }
304 + 
305 +     bb17: {

- +         _34 = move ((_35 as Some).0: ());
- +         StorageDead(_43);
- +         StorageDead(_35);
- +         _18 = Poll::<()>::Ready(move _34);
- +         StorageDead(_34);
- +         StorageDead(_44);
- +         StorageDead(_39);
+ +         StorageDead(_33);
+ +         _42 = option::expect_failed(const "`Ready` polled after completion") -> bb11;
+ +     }
+ + 
+ +     bb18: {
+ +         StorageDead(_41);
+ +         _18 = Poll::<()>::Ready(move ((_33 as Some).0: ()));
+ +         StorageDead(_33);
+ +         StorageDead(_42);
313 +         StorageDead(_37);
+ +         StorageDead(_35);
314 +         StorageDead(_22);
315 +         StorageDead(_19);
316 +         _25 = discriminant(_18);


thread '[mir-opt] tests/mir-opt/inline_coroutine_body.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/inline_coroutine_body.run2-{closure#0}.Inline.panic-unwind.diff
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
---
15       scope 1 {
16           debug residual => _6;
17           scope 2 {

18               scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) {
-                   let mut _14: isize;
-                   let _15: i32;
-                   let mut _16: i32;
-                   let mut _17: bool;
+                   let mut _11: isize;
+                   let mut _12: bool;
23                   scope 9 {
24                       scope 10 (inlined <i32 as From<i32>>::from) {
25                       }

34       }
35       scope 5 (inlined <Result<i32, i32> as Try>::branch) {
36           let mut _10: isize;
-           let _11: i32;
-           let _12: i32;
-           let mut _13: std::result::Result<std::convert::Infallible, i32>;
40           scope 6 {
41           }
42           scope 7 {

73           _6 = copy ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>);
74           StorageLive(_8);
75           _8 = copy _6;
+           StorageLive(_11);
+           StorageLive(_12);
+           _11 = discriminant(_8);
+           _12 = Eq(copy _11, const 1_isize);
+           assume(move _12);
+           StorageLive(_13);
76           StorageLive(_14);
-           StorageLive(_17);
-           _14 = discriminant(_8);
-           _17 = Eq(copy _14, const 1_isize);
-           assume(move _17);
-           StorageLive(_15);
-           _15 = move ((_8 as Err).0: i32);
-           StorageLive(_16);
-           _16 = move _15;
-           _0 = Result::<i32, i32>::Err(move _16);
-           StorageDead(_16);
-           StorageDead(_15);
-           StorageDead(_17);
+           _14 = move ((_8 as Err).0: i32);
+           _13 = move _14;
+           ((_0 as variant#1).0: i32) = move _13;
89           StorageDead(_14);
+           StorageDead(_13);
+           discriminant(_0) = 1;
+           StorageDead(_12);
+           StorageDead(_11);
---
106       }
107   
108       bb6: {
-           StorageLive(_12);
-           _12 = move ((_4 as Err).0: i32);
-           StorageLive(_13);
-           _13 = Result::<Infallible, i32>::Err(copy _12);
-           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _13);
-           StorageDead(_13);
-           StorageDead(_12);
+           ((_3 as variant#1).0: std::result::Result<std::convert::Infallible, i32>) = Result::<Infallible, i32>::Err(copy ((_4 as Err).0: i32));
+           discriminant(_3) = 1;
116 -         goto -> bb5;
117 +         goto -> bb8;
118       }

119   
120       bb7: {
-           StorageLive(_11);
-           _11 = move ((_4 as Ok).0: i32);
-           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(copy _11);
-           StorageDead(_11);
+           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(copy ((_4 as Ok).0: i32));
125 -         goto -> bb5;
126 +         goto -> bb9;
127 +     }


thread '[mir-opt] tests/mir-opt/jump_threading.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
  10: <compiletest::runtest::TestCx>::run_revision
  11: compiletest::runtest::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- [mir-opt] tests/mir-opt/jump_threading.rs stdout end ----
---- [mir-opt] tests/mir-opt/pre-codegen/checked_ops.rs stdout ----
5     debug n => _2;
6     let mut _0: u16;
7     scope 1 (inlined <u16 as Step>::forward) {
-         let mut _8: u16;
+         let mut _7: u16;
9         scope 2 {
10         }
11         scope 3 (inlined <u16 as Step>::forward_checked) {

+             let mut _4: std::result::Result<u16, std::num::TryFromIntError>;
12             scope 4 {
13                 scope 6 (inlined core::num::<impl u16>::checked_add) {
14                     let mut _5: (u16, bool);

-                     let mut _6: bool;
16                     scope 7 (inlined std::intrinsics::unlikely) {
-                         let _7: ();
+                         let _6: ();
18                     }
19                 }
20             }

21             scope 5 (inlined convert::num::ptr_try_from_impls::<impl TryFrom<usize> for u16>::try_from) {
22                 let mut _3: bool;
-                 let mut _4: u16;
24             }
25         }
26         scope 8 (inlined Option::<u16>::is_none) {

34     }
35 
36     bb0: {
-         StorageLive(_4);
38         StorageLive(_3);
39         _3 = Gt(copy _2, const 65535_usize);
-         switchInt(move _3) -> [0: bb1, otherwise: bb5];
+         switchInt(move _3) -> [0: bb1, otherwise: bb4];
41     }
42 
43     bb1: {

-         _4 = copy _2 as u16 (IntToInt);
+         StorageLive(_4);
+         ((_4 as variant#0).0: u16) = copy _2 as u16 (IntToInt);
+         discriminant(_4) = 0;
45         StorageDead(_3);
-         StorageLive(_6);
47         StorageLive(_5);
-         _5 = AddWithOverflow(copy _1, copy _4);
-         _6 = copy (_5.1: bool);
-         switchInt(copy _6) -> [0: bb2, otherwise: bb3];
+         _5 = AddWithOverflow(copy _1, copy ((_4 as Ok).0: u16));
+         switchInt(copy (_5.1: bool)) -> [0: bb2, otherwise: bb3];
51     }
52 
53     bb2: {

54         StorageDead(_5);
---
57     }
58 
59     bb3: {

-         _7 = std::intrinsics::cold_path() -> [return: bb4, unwind unreachable];
+         StorageDead(_4);
+         StorageDead(_5);
+         _6 = std::intrinsics::cold_path() -> [return: bb5, unwind unreachable];
61     }
62 
63     bb4: {

-         StorageDead(_5);
---
68 
69     bb5: {

-         StorageDead(_3);
-         goto -> bb6;
+         assert(!const true, "attempt to compute `{} + {}`, which would overflow", const u16::MAX, const 1_u16) -> [success: bb6, unwind continue];
72     }
73 
74     bb6: {

-         assert(!const true, "attempt to compute `{} + {}`, which would overflow", const u16::MAX, const 1_u16) -> [success: bb7, unwind continue];
-     }
- 
-     bb7: {
-         StorageLive(_8);
-         _8 = copy _2 as u16 (IntToInt);
---
85     }
86 }


thread '[mir-opt] tests/mir-opt/pre-codegen/checked_ops.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.panic-unwind.mir
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
---
22     bb0: {

24         _3 = copy ((*_1).0: char);
25         StorageLive(_4);
26         _4 = copy ((*_2).0: char);
-         _5 = Cmp(move _3, move _4);
+         ((_0 as variant#1).0: std::cmp::Ordering) = Cmp(move _3, move _4);
28         StorageDead(_4);
29         StorageDead(_3);
-         _0 = Option::<std::cmp::Ordering>::Some(copy _5);
-         _6 = discriminant(_5);
-         switchInt(move _6) -> [0: bb1, otherwise: bb2];
+         discriminant(_0) = 1;
+         _5 = discriminant(((_0 as Some).0: std::cmp::Ordering));
+         switchInt(move _5) -> [0: bb1, otherwise: bb2];
33     }
34 
35     bb1: {

-         StorageLive(_9);
+         StorageLive(_6);
+         _6 = copy ((*_1).1: i16);
37         StorageLive(_7);
-         _7 = copy ((*_1).1: i16);
-         StorageLive(_8);
-         _8 = copy ((*_2).1: i16);
-         _9 = Cmp(move _7, move _8);
-         StorageDead(_8);
+         _7 = copy ((*_2).1: i16);
+         ((_0 as variant#1).0: std::cmp::Ordering) = Cmp(move _6, move _7);
43         StorageDead(_7);
-         _0 = Option::<std::cmp::Ordering>::Some(move _9);
-         StorageDead(_9);
+         StorageDead(_6);
+         discriminant(_0) = 1;
46         goto -> bb3;
47     }
48 


thread '[mir-opt] tests/mir-opt/pre-codegen/derived_ord.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/derived_ord.{impl#0}-partial_cmp.PreCodegen.after.mir
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
  10: <compiletest::runtest::TestCx>::run_revision
  11: compiletest::runtest::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- [mir-opt] tests/mir-opt/pre-codegen/derived_ord.rs stdout end ----
---- [mir-opt] tests/mir-opt/pre-codegen/drop_box_of_sized.rs stdout ----
6     scope 1 (inlined drop_in_place::<Box<T>> - shim(Some(Box<T>))) {
7         scope 2 (inlined <Box<T> as Drop>::drop) {
8             let _2: std::ptr::NonNull<T>;
+             let mut _3: std::mem::Alignment;
+             let mut _4: std::ptr::NonNull<u8>;
9             let _5: ();
10             scope 3 {
11                 scope 4 {

12                     scope 17 (inlined Layout::size) {
13                     }
14                     scope 18 (inlined std::ptr::Unique::<T>::cast::<u8>) {
-                         let mut _4: std::ptr::NonNull<u8>;
16                         scope 19 (inlined NonNull::<T>::cast::<u8>) {
17                             scope 20 (inlined NonNull::<T>::as_ptr) {
18                             }

42                     }
43                 }
44                 scope 7 (inlined Layout::for_value_raw::<T>) {
-                     let mut _3: std::mem::Alignment;
46                     scope 8 {
47                         scope 16 (inlined #[track_caller] Layout::from_size_alignment_unchecked) {
48                         }

70         StorageLive(_4);
71         StorageLive(_2);
72         _2 = copy (((*_1).0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>);
+         StorageLive(_3);
73         _3 = const <T as std::mem::SizedTypeProperties>::ALIGN as std::mem::Alignment (Transmute);
-         switchInt(const <T as std::mem::SizedTypeProperties>::SIZE) -> [0: bb3, otherwise: bb1];
+         switchInt(const <T as std::mem::SizedTypeProperties>::SIZE) -> [0: bb1, otherwise: bb2];
75     }
76 
77     bb1: {

-         _4 = copy _2 as std::ptr::NonNull<u8> (Transmute);
-         switchInt(const <T as std::mem::SizedTypeProperties>::SIZE) -> [0: bb3, otherwise: bb2];
+         StorageDead(_3);
+         goto -> bb5;
80     }
81 
82     bb2: {

-         _5 = alloc::alloc::__rust_dealloc(move _4, const <T as std::mem::SizedTypeProperties>::SIZE, move _3) -> [return: bb3, unwind unreachable];
+         _4 = copy _2 as std::ptr::NonNull<u8> (Transmute);
+         switchInt(const <T as std::mem::SizedTypeProperties>::SIZE) -> [0: bb4, otherwise: bb3];
84     }
85 
86     bb3: {

+         _5 = alloc::alloc::__rust_dealloc(move _4, const <T as std::mem::SizedTypeProperties>::SIZE, move _3) -> [return: bb4, unwind unreachable];
+     }
+ 
+     bb4: {
+         StorageDead(_3);
+         goto -> bb5;
---
88         StorageDead(_4);
89         return;


thread '[mir-opt] tests/mir-opt/pre-codegen/drop_box_of_sized.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/drop_box_of_sized.drop_generic.PreCodegen.after.panic-unwind.mir
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
---
20                             scope 20 (inlined NonNull::<[T]>::as_ptr) {

45                     }
46                 }
47                 scope 7 (inlined Layout::for_value_raw::<[T]>) {
-                     let mut _5: usize;
-                     let mut _6: std::mem::Alignment;
50                     scope 8 {
51                         scope 16 (inlined #[track_caller] Layout::from_size_alignment_unchecked) {
52                         }

72 
73     bb0: {
74         StorageLive(_3);
-         StorageLive(_5);
76         StorageLive(_8);
77         StorageLive(_2);
78         _2 = copy (((*_1).0: std::ptr::Unique<[T]>).0: std::ptr::NonNull<[T]>);

79         StorageLive(_4);
80         _3 = copy _2 as *mut [T] (Transmute);
81         _4 = copy _2 as *const [T] (Transmute);
+         StorageLive(_5);
+         StorageLive(_6);
82         _5 = std::intrinsics::size_of_val::<[T]>(move _4) -> [return: bb1, unwind unreachable];
83     }
84 

85     bb1: {
86         _6 = const <T as std::mem::SizedTypeProperties>::ALIGN as std::mem::Alignment (Transmute);
87         StorageDead(_4);
-         switchInt(copy _5) -> [0: bb3, otherwise: bb2];
+         switchInt(copy _5) -> [0: bb2, otherwise: bb3];
89     }
90 
91     bb2: {

+         StorageDead(_5);
+         StorageDead(_6);
+         goto -> bb5;
+     }
+ 
+     bb3: {
92         StorageLive(_7);
93         _7 = copy _3 as *mut u8 (PtrToPtr);
94         _8 = copy _7 as std::ptr::NonNull<u8> (Transmute);

95         StorageDead(_7);
-         _9 = alloc::alloc::__rust_dealloc(move _8, move _5, move _6) -> [return: bb3, unwind unreachable];
+         _9 = alloc::alloc::__rust_dealloc(move _8, move _5, move _6) -> [return: bb4, unwind unreachable];
97     }
98 
-     bb3: {
+     bb4: {
+         StorageDead(_5);
---
104         return;
105     }


thread '[mir-opt] tests/mir-opt/pre-codegen/drop_boxed_slice.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/drop_boxed_slice.generic_in_place.PreCodegen.after.64bit.panic-unwind.mir
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
  10: <compiletest::runtest::TestCx>::run_revision
  11: compiletest::runtest::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
---- [mir-opt] tests/mir-opt/pre-codegen/drop_boxed_slice.rs stdout end ----
---- [mir-opt] tests/mir-opt/pre-codegen/copy_and_clone.rs#CLONE stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs:10:12: error: CHECK: expected string not found in input
 // CHECK: _0 = Av1BlockIntraInter::Intra(move [[C]]);
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:13:52: note: scanning from here
 ((_0 as variant#0).0: Av1BlockIntra) = copy (*_1);
                                                   ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:13:52: note: with "C" equal to "_0 as variant#0).0: Av1BlockIntra)"
 ((_0 as variant#0).0: Av1BlockIntra) = copy (*_1);
                                                   ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:19:1: note: possible intended match here
fn inter_clone(_1: &Av1BlockInter) -> Av1BlockIntraInter {
^
/checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs:17:12: error: CHECK: expected string not found in input
 // CHECK: [[C:_.*]] = copy (*_1);
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:19:16: note: scanning from here
fn inter_clone(_1: &Av1BlockInter) -> Av1BlockIntraInter {
               ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:81:107: note: possible intended match here
 (((((_0 as variant#1).0: Av1BlockInter).1: std::option::Option<CompInterType>) as variant#1).0: CompInterType) = copy ((((*_1).1: std::option::Option<CompInterType>) as Some).0: CompInterType);
                                                                                                          ^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir
Check file: /checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: // WARNING: This output format is intended for human consumers only 
            2: // and is subject to change without notice. Knock yourself out. 
            3: // HINT: See also -Z dump-mir for MIR at specific points during compilation. 
            4: fn intra_clone(_1: &Av1BlockIntra) -> Av1BlockIntraInter { 
            5:  debug intra => _1; 
            6:  let mut _0: Av1BlockIntraInter; 
            7:  scope 1 (inlined <Av1BlockIntra as Clone>::clone) { 
            8:  scope 2 (inlined <TxfmSize as Clone>::clone) { 
            9:  } 
           10:  } 
           11:  
           12:  bb0: { 
           13:  ((_0 as variant#0).0: Av1BlockIntra) = copy (*_1); 
check:10'0                                                        X error: no match found
check:10'1                                                          with "C" equal to "_0 as variant#0).0: Av1BlockIntra)"
           14:  discriminant(_0) = 0; 
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~
           15:  return; 
check:10'0     ~~~~~~~~~
           16:  } 
check:10'0     ~~~
           17: } 
check:10'0     ~~
           18:  
check:10'0     ~
           19: fn inter_clone(_1: &Av1BlockInter) -> Av1BlockIntraInter { 
check:10'0     ~~~~~~~~~~~~~~~
check:10'2     ?                                                           possible intended match
check:17'0                    X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           20:  debug inter => _1; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           21:  let mut _0: Av1BlockIntraInter; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           22:  scope 1 (inlined <Av1BlockInter as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           23:  let mut _4: InterIntraType; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           24:  scope 2 (inlined <Av1BlockInterNd as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           25:  scope 3 (inlined <Av1BlockInter1d as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           26:  scope 4 (inlined array::<impl Clone for [mv; 2]>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           27:  scope 5 (inlined <mv as array::SpecArrayClone>::clone::<2>) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           28:  scope 6 (inlined #[track_caller] std::ptr::read::<[mv; 2]>) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           29:  scope 7 (inlined core::ub_checks::check_language_ub) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30:  scope 8 (inlined core::ub_checks::check_language_ub::runtime) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           31:  } 
check:17'0     ~~~
           32:  } 
check:17'0     ~~~
           33:  scope 9 (inlined std::mem::align_of::<[mv; 2]>) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           34:  } 
check:17'0     ~~~
           35:  } 
check:17'0     ~~~
           36:  } 
check:17'0     ~~~
           37:  } 
check:17'0     ~~~
           38:  scope 10 (inlined <MaskedInterIntraPredMode as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           39:  scope 11 { 
check:17'0     ~~~~~~~~~~~~
           40:  } 
check:17'0     ~~~
           41:  } 
check:17'0     ~~~
           42:  } 
check:17'0     ~~~
           43:  } 
check:17'0     ~~~
           44:  scope 12 (inlined <Option<CompInterType> as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           45:  let mut _2: isize; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           46:  scope 13 { 
check:17'0     ~~~~~~~~~~~~
           47:  scope 14 (inlined <CompInterType as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           48:  } 
check:17'0     ~~~
           49:  } 
check:17'0     ~~~
           50:  } 
check:17'0     ~~~
           51:  scope 15 (inlined <MotionMode as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           52:  } 
check:17'0     ~~~
           53:  scope 16 (inlined <DrlProximity as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           54:  } 
check:17'0     ~~~
           55:  scope 17 (inlined <TxfmSize as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           56:  } 
check:17'0     ~~~
           57:  scope 18 (inlined <Filter2d as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           58:  } 
check:17'0     ~~~
           59:  scope 19 (inlined <Option<InterIntraType> as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           60:  let mut _3: isize; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           61:  scope 20 { 
check:17'0     ~~~~~~~~~~~~
           62:  scope 21 (inlined <InterIntraType as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           63:  } 
check:17'0     ~~~
           64:  } 
check:17'0     ~~~
           65:  } 
check:17'0     ~~~
           66:  } 
check:17'0     ~~~
           67:  
check:17'0     ~
           68:  bb0: { 
check:17'0     ~~~~~~~~
           69:  (((_0 as variant#1).0: Av1BlockInter).0: Av1BlockInterNd) = copy ((*_1).0: Av1BlockInterNd); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           70:  StorageLive(_2); 
check:17'0     ~~~~~~~~~~~~~~~~~~
           71:  _2 = discriminant(((*_1).1: std::option::Option<CompInterType>)); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           72:  switchInt(move _2) -> [0: bb1, 1: bb2, otherwise: bb7]; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           73:  } 
check:17'0     ~~~
           74:  
check:17'0     ~
           75:  bb1: { 
check:17'0     ~~~~~~~~
           76:  (((_0 as variant#1).0: Av1BlockInter).1: std::option::Option<CompInterType>) = const Option::<CompInterType>::None; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           77:  goto -> bb3; 
check:17'0     ~~~~~~~~~~~~~~
           78:  } 
check:17'0     ~~~
           79:  
check:17'0     ~
           80:  bb2: { 
check:17'0     ~~~~~~~~
           81:  (((((_0 as variant#1).0: Av1BlockInter).1: std::option::Option<CompInterType>) as variant#1).0: CompInterType) = copy ((((*_1).1: std::option::Option<CompInterType>) as Some).0: CompInterType); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:17'1                                                                                                               ?                                                                                         possible intended match
           82:  discriminant((((_0 as variant#1).0: Av1BlockInter).1: std::option::Option<CompInterType>)) = 1; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           83:  goto -> bb3; 
check:17'0     ~~~~~~~~~~~~~~
           84:  } 
check:17'0     ~~~
           85:  
check:17'0     ~
           86:  bb3: { 
check:17'0     ~~~~~~~~
           87:  StorageDead(_2); 
check:17'0     ~~~~~~~~~~~~~~~~~~
           88:  (((_0 as variant#1).0: Av1BlockInter).2: u8) = copy ((*_1).2: u8); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           89:  (((_0 as variant#1).0: Av1BlockInter).3: MotionMode) = copy ((*_1).3: MotionMode); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           90:  (((_0 as variant#1).0: Av1BlockInter).4: DrlProximity) = copy ((*_1).4: DrlProximity); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           91:  (((_0 as variant#1).0: Av1BlockInter).5: [i8; 2]) = copy ((*_1).5: [i8; 2]); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           92:  (((_0 as variant#1).0: Av1BlockInter).6: TxfmSize) = copy ((*_1).6: TxfmSize); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           93:  (((_0 as variant#1).0: Av1BlockInter).7: Filter2d) = copy ((*_1).7: Filter2d); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           94:  StorageLive(_3); 
check:17'0     ~~~~~~~~~~~~~~~~~~
           95:  _3 = discriminant(((*_1).8: std::option::Option<InterIntraType>)); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           96:  switchInt(move _3) -> [0: bb4, 1: bb5, otherwise: bb7]; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           97:  } 
check:17'0     ~~~
           98:  
check:17'0     ~
           99:  bb4: { 
check:17'0     ~~~~~~~~
          100:  (((_0 as variant#1).0: Av1BlockInter).8: std::option::Option<InterIntraType>) = const Option::<InterIntraType>::None; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          101:  goto -> bb6; 
check:17'0     ~~~~~~~~~~~~~~
          102:  } 
check:17'0     ~~~
          103:  
check:17'0     ~
          104:  bb5: { 
check:17'0     ~~~~~~~~
          105:  StorageLive(_4); 
check:17'0     ~~~~~~~~~~~~~~~~~~
          106:  _4 = copy ((((*_1).8: std::option::Option<InterIntraType>) as Some).0: InterIntraType); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          107:  (((((_0 as variant#1).0: Av1BlockInter).8: std::option::Option<InterIntraType>) as variant#1).0: InterIntraType) = move _4; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          108:  StorageDead(_4); 
check:17'0     ~~~~~~~~~~~~~~~~~~
          109:  discriminant((((_0 as variant#1).0: Av1BlockInter).8: std::option::Option<InterIntraType>)) = 1; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          110:  goto -> bb6; 
check:17'0     ~~~~~~~~~~~~~~
          111:  } 
check:17'0     ~~~
          112:  
check:17'0     ~
          113:  bb6: { 
check:17'0     ~~~~~~~~
          114:  StorageDead(_3); 
check:17'0     ~~~~~~~~~~~~~~~~~~
          115:  (((_0 as variant#1).0: Av1BlockInter).9: u8) = copy ((*_1).9: u8); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          116:  (((_0 as variant#1).0: Av1BlockInter).10: u16) = copy ((*_1).10: u16); 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          117:  discriminant(_0) = 1; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~
          118:  return; 
check:17'0     ~~~~~~~~~
          119:  } 
check:17'0     ~~~
          120:  
check:17'0     ~
          121:  bb7: { 
check:17'0     ~~~~~~~~
          122:  unreachable; 
check:17'0     ~~~~~~~~~~~~~~
          123:  } 
check:17'0     ~~~
          124: } 
check:17'0     ~~
          125:  
check:17'0     ~
          126: fn dav1dsequenceheader_copy(_1: &Dav1dSequenceHeader) -> Dav1dSequenceHeader { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          127:  debug v => _1; 
          128:  let mut _0: Dav1dSequenceHeader; 
          129:  scope 1 (inlined <Dav1dSequenceHeader as Clone>::clone) { 
          130:  scope 2 (inlined array::<impl Clone for [Dav1dSequenceHeaderOperatingPoint; 32]>::clone) { 
          131:  scope 3 (inlined <Dav1dSequenceHeaderOperatingPoint as array::SpecArrayClone>::clone::<32>) { 
          132:  scope 4 (inlined #[track_caller] std::ptr::read::<[Dav1dSequenceHeaderOperatingPoint; 32]>) { 
          133:  scope 5 (inlined core::ub_checks::check_language_ub) { 
          134:  scope 6 (inlined core::ub_checks::check_language_ub::runtime) { 
          135:  } 
          136:  } 
          137:  scope 7 (inlined std::mem::align_of::<[Dav1dSequenceHeaderOperatingPoint; 32]>) { 
          138:  } 
          139:  } 
          140:  } 
          141:  } 
          142:  scope 8 (inlined array::<impl Clone for [Dav1dSequenceHeaderOperatingParameterInfo; 32]>::clone) { 
          143:  scope 9 (inlined <Dav1dSequenceHeaderOperatingParameterInfo as array::SpecArrayClone>::clone::<32>) { 
          144:  scope 10 (inlined #[track_caller] std::ptr::read::<[Dav1dSequenceHeaderOperatingParameterInfo; 32]>) { 
          145:  scope 11 (inlined core::ub_checks::check_language_ub) { 
          146:  scope 12 (inlined core::ub_checks::check_language_ub::runtime) { 
          147:  } 
          148:  } 
          149:  scope 13 (inlined std::mem::align_of::<[Dav1dSequenceHeaderOperatingParameterInfo; 32]>) { 
          150:  } 
          151:  } 
          152:  } 
          153:  } 
          154:  } 
          155:  
          156:  bb0: { 
          157:  _0 = copy (*_1); 
          158:  return; 
          159:  } 
          160: } 
          161:  
          162: fn <impl at /checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs:29:10: 29:15>::clone(_1: &mv) -> mv { 
          163:  debug self => _1; 
          164:  let mut _0: mv; 
          165:  scope 1 { 
          166:  } 
          167:  
          168:  bb0: { 
          169:  _0 = copy (*_1); 
          170:  return; 
          171:  } 
          172: } 
          173:  
          174: fn <impl at /checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs:36:10: 36:15>::clone(_1: &MaskedInterIntraPredMode) -> MaskedInterIntraPredMode { 
          175:  debug self => _1; 
          176:  let mut _0: MaskedInterIntraPredMode; 
          177:  scope 1 { 
          178:  } 
          179:  
          180:  bb0: { 
          181:  _0 = copy (*_1); 
            .
            .
            .
>>>>>>

------------------------------------------

error in revision `CLONE`: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-21/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir" "/checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs" "--check-prefix=CHECK" "--check-prefix" "CLONE" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs:10:12: error: CHECK: expected string not found in input
 // CHECK: _0 = Av1BlockIntraInter::Intra(move [[C]]);
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:13:52: note: scanning from here
 ((_0 as variant#0).0: Av1BlockIntra) = copy (*_1);
                                                   ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:13:52: note: with "C" equal to "_0 as variant#0).0: Av1BlockIntra)"
 ((_0 as variant#0).0: Av1BlockIntra) = copy (*_1);
                                                   ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:19:1: note: possible intended match here
fn inter_clone(_1: &Av1BlockInter) -> Av1BlockIntraInter {
^
/checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs:17:12: error: CHECK: expected string not found in input
 // CHECK: [[C:_.*]] = copy (*_1);
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:19:16: note: scanning from here
fn inter_clone(_1: &Av1BlockInter) -> Av1BlockIntraInter {
               ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir:81:107: note: possible intended match here
 (((((_0 as variant#1).0: Av1BlockInter).1: std::option::Option<CompInterType>) as variant#1).0: CompInterType) = copy ((((*_1).1: std::option::Option<CompInterType>) as Some).0: CompInterType);
                                                                                                          ^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/mir-opt/pre-codegen/copy_and_clone.CLONE/copy_and_clone.mir
Check file: /checkout/tests/mir-opt/pre-codegen/copy_and_clone.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: // WARNING: This output format is intended for human consumers only 
            2: // and is subject to change without notice. Knock yourself out. 
            3: // HINT: See also -Z dump-mir for MIR at specific points during compilation. 
            4: fn intra_clone(_1: &Av1BlockIntra) -> Av1BlockIntraInter { 
            5:  debug intra => _1; 
            6:  let mut _0: Av1BlockIntraInter; 
            7:  scope 1 (inlined <Av1BlockIntra as Clone>::clone) { 
            8:  scope 2 (inlined <TxfmSize as Clone>::clone) { 
            9:  } 
           10:  } 
           11:  
           12:  bb0: { 
           13:  ((_0 as variant#0).0: Av1BlockIntra) = copy (*_1); 
check:10'0                                                        X error: no match found
check:10'1                                                          with "C" equal to "_0 as variant#0).0: Av1BlockIntra)"
           14:  discriminant(_0) = 0; 
check:10'0     ~~~~~~~~~~~~~~~~~~~~~~~
           15:  return; 
check:10'0     ~~~~~~~~~
           16:  } 
check:10'0     ~~~
           17: } 
check:10'0     ~~
           18:  
check:10'0     ~
           19: fn inter_clone(_1: &Av1BlockInter) -> Av1BlockIntraInter { 
check:10'0     ~~~~~~~~~~~~~~~
check:10'2     ?                                                           possible intended match
check:17'0                    X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
           20:  debug inter => _1; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           21:  let mut _0: Av1BlockIntraInter; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           22:  scope 1 (inlined <Av1BlockInter as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           23:  let mut _4: InterIntraType; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           24:  scope 2 (inlined <Av1BlockInterNd as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           25:  scope 3 (inlined <Av1BlockInter1d as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           26:  scope 4 (inlined array::<impl Clone for [mv; 2]>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           27:  scope 5 (inlined <mv as array::SpecArrayClone>::clone::<2>) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           28:  scope 6 (inlined #[track_caller] std::ptr::read::<[mv; 2]>) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           29:  scope 7 (inlined core::ub_checks::check_language_ub) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30:  scope 8 (inlined core::ub_checks::check_language_ub::runtime) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           31:  } 
check:17'0     ~~~
           32:  } 
check:17'0     ~~~
           33:  scope 9 (inlined std::mem::align_of::<[mv; 2]>) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           34:  } 
check:17'0     ~~~
           35:  } 
check:17'0     ~~~
           36:  } 
check:17'0     ~~~
           37:  } 
check:17'0     ~~~
           38:  scope 10 (inlined <MaskedInterIntraPredMode as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           39:  scope 11 { 
check:17'0     ~~~~~~~~~~~~
           40:  } 
check:17'0     ~~~
           41:  } 
check:17'0     ~~~
           42:  } 
check:17'0     ~~~
           43:  } 
check:17'0     ~~~
           44:  scope 12 (inlined <Option<CompInterType> as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           45:  let mut _2: isize; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           46:  scope 13 { 
check:17'0     ~~~~~~~~~~~~
           47:  scope 14 (inlined <CompInterType as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           48:  } 
check:17'0     ~~~
           49:  } 
check:17'0     ~~~
           50:  } 
check:17'0     ~~~
           51:  scope 15 (inlined <MotionMode as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           52:  } 
check:17'0     ~~~
           53:  scope 16 (inlined <DrlProximity as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           54:  } 
check:17'0     ~~~
           55:  scope 17 (inlined <TxfmSize as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           56:  } 
check:17'0     ~~~
           57:  scope 18 (inlined <Filter2d as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           58:  } 
check:17'0     ~~~
           59:  scope 19 (inlined <Option<InterIntraType> as Clone>::clone) { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           60:  let mut _3: isize; 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           61:  scope 20 { 
---
36     }
37 
38     bb1: {
-         StorageLive(_6);
-         _6 = Le(copy _3, copy _4);
-         _7 = ControlFlow::<bool>::Break(move _6);
-         StorageDead(_6);
+         ((_6 as variant#1).0: bool) = Le(copy _3, copy _4);
+         discriminant(_6) = 1;
43         StorageDead(_5);
44         StorageDead(_4);
45         StorageDead(_3);

-         _0 = copy ((_7 as Break).0: bool);
+         _0 = copy ((_6 as Break).0: bool);
+         StorageDead(_6);
47         goto -> bb3;
48     }
49 

---
+         _7 = copy ((*_1).1: i16);
54         StorageLive(_8);
-         _8 = copy ((*_1).1: i16);
-         StorageLive(_9);
-         _9 = copy ((*_2).1: i16);
-         _0 = Le(move _8, move _9);
-         StorageDead(_9);
+         _8 = copy ((*_2).1: i16);
+         _0 = Le(move _7, move _8);
60         StorageDead(_8);
+         StorageDead(_7);
61         goto -> bb3;
62     }
63 
---
67     }
68 }


thread '[mir-opt] tests/mir-opt/pre-codegen/tuple_ord.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/tuple_ord.demo_le_total.PreCodegen.after.mir
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
---
---- [mir-opt] tests/mir-opt/pre-codegen/two_unwrap_unchecked.rs stdout ----
5     let mut _0: i32;
6     let mut _2: std::option::Option<i32>;
7     let mut _4: bool;
-     let _5: i32;
9     scope 1 {
-         debug v1 => _5;
+         debug v1 => ((_2 as Some).0: i32);
11         scope 2 {
-             debug v2 => _5;
+             debug v2 => ((_2 as Some).0: i32);
13         }
14         scope 8 (inlined #[track_caller] Option::<i32>::unwrap_unchecked) {
15             scope 9 {

35     }
36 
37     bb0: {
-         StorageLive(_5);
+         StorageLive(_2);
39         _2 = copy (*_1);
40         _3 = discriminant(_2);
41         _4 = Eq(copy _3, const 1_isize);

42         assume(move _4);
-         _5 = copy ((_2 as Some).0: i32);
-         _0 = Add(copy _5, copy _5);
-         StorageDead(_5);
+         _0 = Add(copy ((_2 as Some).0: i32), copy ((_2 as Some).0: i32));
+         StorageDead(_2);
46         return;
47     }
48 }


thread '[mir-opt] tests/mir-opt/pre-codegen/two_unwrap_unchecked.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/pre-codegen/two_unwrap_unchecked.two_unwrap_unchecked.PreCodegen.after.mir
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14
---
11       scope 1 {
12           debug residual => _4;
13           scope 2 {

14               scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) {
-                   let mut _10: isize;
-                   let _11: i32;
-                   let mut _12: bool;
+                   let mut _7: isize;
+                   let mut _8: bool;
18                   scope 9 {
19                       scope 10 (inlined <i32 as From<i32>>::from) {
20                       }

29       }
30       scope 5 (inlined <Result<i32, i32> as Try>::branch) {
31           let mut _6: isize;
-           let _7: i32;
-           let _8: i32;
-           let mut _9: std::result::Result<std::convert::Infallible, i32>;
35           scope 6 {
36           }
37           scope 7 {

59       bb3: {
60           StorageLive(_4);
61           _4 = copy ((_2 as Break).0: std::result::Result<std::convert::Infallible, i32>);
-           StorageLive(_10);
-           StorageLive(_12);
-           _10 = discriminant(_4);
-           _12 = Eq(copy _10, const 1_isize);
-           assume(move _12);
-           StorageLive(_11);
-           _11 = copy ((_4 as Err).0: i32);
-           _0 = Result::<i32, i32>::Err(copy _11);
-           StorageDead(_11);
-           StorageDead(_12);
-           StorageDead(_10);
+           StorageLive(_7);
+           StorageLive(_8);
+           _7 = discriminant(_4);
+           _8 = Eq(copy _7, const 1_isize);
+           assume(move _8);
+           StorageLive(_9);
+           _9 = copy ((_4 as Err).0: i32);
+           ((_0 as variant#1).0: i32) = copy _9;
+           StorageDead(_9);
+           discriminant(_0) = 1;
+           StorageDead(_8);
+           StorageDead(_7);
73           StorageDead(_4);
74           StorageDead(_2);
75           return;

82       }
83   
84       bb5: {
-           StorageLive(_8);
-           _8 = copy ((_1 as Err).0: i32);
-           StorageLive(_9);
-           _9 = Result::<Infallible, i32>::Err(copy _8);
-           _2 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _9);
-           StorageDead(_9);
-           StorageDead(_8);
+           ((_2 as variant#1).0: std::result::Result<std::convert::Infallible, i32>) = Result::<Infallible, i32>::Err(copy ((_1 as Err).0: i32));
+           discriminant(_2) = 1;
92 -         goto -> bb4;
93 +         goto -> bb7;
94       }

95   
96       bb6: {
-           StorageLive(_7);
-           _7 = copy ((_1 as Ok).0: i32);
-           _2 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(copy _7);
-           StorageDead(_7);
+           _2 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(copy ((_1 as Ok).0: i32));
101 -         goto -> bb4;
102 +         goto -> bb8;
103 +     }


thread '[mir-opt] tests/mir-opt/separate_const_switch.rs' panicked at src/tools/compiletest/src/runtest/mir_opt.rs:73:21:
Actual MIR output differs from expected MIR output /checkout/tests/mir-opt/separate_const_switch.identity.JumpThreading.diff
stack backtrace:
   8: __rustc::rust_begin_unwind
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/std/src/panicking.rs:689:5
   9: core::panicking::panic_fmt
             at /rustc/ef0fb8a2563200e322fa4419f09f65a63742038c/library/core/src/panicking.rs:80:14

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 5, 2026

☀️ Try build successful (CI)
Build commit: 995f4a4 (995f4a47e156613c9fe05379fcda5d85d80a4916, parent: 4feb7221f4d445120a5061b16ce7222adbfdf6f6)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (995f4a4): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +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)
2.7% [0.2%, 29.0%] 41
Regressions ❌
(secondary)
12.0% [0.0%, 769.2%] 74
Improvements ✅
(primary)
-1.2% [-6.7%, -0.2%] 119
Improvements ✅
(secondary)
-1.3% [-11.7%, -0.2%] 127
All ❌✅ (primary) -0.2% [-6.7%, 29.0%] 160

Max RSS (memory usage)

Results (primary 1.7%, secondary -0.7%)

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

mean range count
Regressions ❌
(primary)
4.2% [1.1%, 10.1%] 10
Regressions ❌
(secondary)
0.8% [0.7%, 0.9%] 2
Improvements ✅
(primary)
-3.3% [-5.9%, -0.5%] 5
Improvements ✅
(secondary)
-1.3% [-2.5%, -0.5%] 5
All ❌✅ (primary) 1.7% [-5.9%, 10.1%] 15

Cycles

Results (primary 0.9%, 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)
50.5% [2.1%, 102.6%] 4
Regressions ❌
(secondary)
29.2% [0.8%, 291.5%] 12
Improvements ✅
(primary)
-3.0% [-5.8%, -1.6%] 51
Improvements ✅
(secondary)
-5.0% [-18.2%, -0.8%] 44
All ❌✅ (primary) 0.9% [-5.8%, 102.6%] 55

Binary size

Results (primary 0.6%, secondary 1.5%)

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

mean range count
Regressions ❌
(primary)
1.7% [0.1%, 8.2%] 78
Regressions ❌
(secondary)
2.4% [0.1%, 8.2%] 82
Improvements ✅
(primary)
-0.9% [-2.8%, -0.1%] 61
Improvements ✅
(secondary)
-1.3% [-7.2%, -0.1%] 27
All ❌✅ (primary) 0.6% [-2.8%, 8.2%] 139

Bootstrap: 495.518s -> 485.421s (-2.04%)
Artifact size: 394.42 MiB -> 392.60 MiB (-0.46%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants