diff options
| author | Camille Gillot <gillot.camille@gmail.com> | 2025-08-26 23:22:59 +0000 |
|---|---|---|
| committer | Camille Gillot <gillot.camille@gmail.com> | 2025-09-07 16:45:00 +0000 |
| commit | 99f6bcf38065c78897a80c9fc7f8c49962df0ab7 (patch) | |
| tree | 6e20438efa9e6a0c0e3d4db02e66b551e84f6068 /tests/mir-opt | |
| parent | 4e9dd1b67bf215865b95558ee4528ad43a5fd38c (diff) | |
| download | rust-99f6bcf38065c78897a80c9fc7f8c49962df0ab7.tar.gz rust-99f6bcf38065c78897a80c9fc7f8c49962df0ab7.zip | |
Unify a source with all possible destinations.
Diffstat (limited to 'tests/mir-opt')
7 files changed, 36 insertions, 34 deletions
diff --git a/tests/mir-opt/dest-prop/cycle.main.DestinationPropagation.panic-abort.diff b/tests/mir-opt/dest-prop/cycle.main.DestinationPropagation.panic-abort.diff index f9b8881ae3b..a2f10be31a9 100644 --- a/tests/mir-opt/dest-prop/cycle.main.DestinationPropagation.panic-abort.diff +++ b/tests/mir-opt/dest-prop/cycle.main.DestinationPropagation.panic-abort.diff @@ -8,25 +8,23 @@ let _5: (); let mut _6: i32; scope 1 { -- debug x => _1; -+ debug x => _4; + debug x => _1; let _2: i32; scope 2 { - debug y => _2; -+ debug y => _4; ++ debug y => _1; let _3: i32; scope 3 { - debug z => _3; -+ debug z => _4; ++ debug z => _1; } } } bb0: { - StorageLive(_1); -- _1 = val() -> [return: bb1, unwind unreachable]; + nop; -+ _4 = val() -> [return: bb1, unwind unreachable]; + _1 = val() -> [return: bb1, unwind unreachable]; } bb1: { @@ -47,14 +45,17 @@ + nop; + nop; StorageLive(_5); - StorageLive(_6); +- StorageLive(_6); - _6 = copy _1; -+ _6 = copy _4; - _5 = std::mem::drop::<i32>(move _6) -> [return: bb2, unwind unreachable]; +- _5 = std::mem::drop::<i32>(move _6) -> [return: bb2, unwind unreachable]; ++ nop; ++ nop; ++ _5 = std::mem::drop::<i32>(move _1) -> [return: bb2, unwind unreachable]; } bb2: { - StorageDead(_6); +- StorageDead(_6); ++ nop; StorageDead(_5); _0 = const (); - StorageDead(_3); diff --git a/tests/mir-opt/dest-prop/cycle.main.DestinationPropagation.panic-unwind.diff b/tests/mir-opt/dest-prop/cycle.main.DestinationPropagation.panic-unwind.diff index 013e40ff462..a08488615b1 100644 --- a/tests/mir-opt/dest-prop/cycle.main.DestinationPropagation.panic-unwind.diff +++ b/tests/mir-opt/dest-prop/cycle.main.DestinationPropagation.panic-unwind.diff @@ -8,25 +8,23 @@ let _5: (); let mut _6: i32; scope 1 { -- debug x => _1; -+ debug x => _4; + debug x => _1; let _2: i32; scope 2 { - debug y => _2; -+ debug y => _4; ++ debug y => _1; let _3: i32; scope 3 { - debug z => _3; -+ debug z => _4; ++ debug z => _1; } } } bb0: { - StorageLive(_1); -- _1 = val() -> [return: bb1, unwind continue]; + nop; -+ _4 = val() -> [return: bb1, unwind continue]; + _1 = val() -> [return: bb1, unwind continue]; } bb1: { @@ -47,14 +45,17 @@ + nop; + nop; StorageLive(_5); - StorageLive(_6); +- StorageLive(_6); - _6 = copy _1; -+ _6 = copy _4; - _5 = std::mem::drop::<i32>(move _6) -> [return: bb2, unwind continue]; +- _5 = std::mem::drop::<i32>(move _6) -> [return: bb2, unwind continue]; ++ nop; ++ nop; ++ _5 = std::mem::drop::<i32>(move _1) -> [return: bb2, unwind continue]; } bb2: { - StorageDead(_6); +- StorageDead(_6); ++ nop; StorageDead(_5); _0 = const (); - StorageDead(_3); diff --git a/tests/mir-opt/dest-prop/dead_stores_79191.f.DestinationPropagation.after.panic-abort.mir b/tests/mir-opt/dest-prop/dead_stores_79191.f.DestinationPropagation.after.panic-abort.mir index eb4209731c6..15061da8120 100644 --- a/tests/mir-opt/dest-prop/dead_stores_79191.f.DestinationPropagation.after.panic-abort.mir +++ b/tests/mir-opt/dest-prop/dead_stores_79191.f.DestinationPropagation.after.panic-abort.mir @@ -7,16 +7,16 @@ fn f(_1: usize) -> usize { let mut _3: usize; let mut _4: usize; scope 1 { - debug b => _3; + debug b => _2; } bb0: { nop; - _3 = copy _1; + _2 = copy _1; _1 = const 5_usize; nop; nop; - _1 = move _3; + _1 = move _2; nop; nop; nop; diff --git a/tests/mir-opt/dest-prop/dead_stores_79191.f.DestinationPropagation.after.panic-unwind.mir b/tests/mir-opt/dest-prop/dead_stores_79191.f.DestinationPropagation.after.panic-unwind.mir index fe9a7376a58..ddfe4dc5b3e 100644 --- a/tests/mir-opt/dest-prop/dead_stores_79191.f.DestinationPropagation.after.panic-unwind.mir +++ b/tests/mir-opt/dest-prop/dead_stores_79191.f.DestinationPropagation.after.panic-unwind.mir @@ -7,16 +7,16 @@ fn f(_1: usize) -> usize { let mut _3: usize; let mut _4: usize; scope 1 { - debug b => _3; + debug b => _2; } bb0: { nop; - _3 = copy _1; + _2 = copy _1; _1 = const 5_usize; nop; nop; - _1 = move _3; + _1 = move _2; nop; nop; nop; diff --git a/tests/mir-opt/dest-prop/dead_stores_better.f.DestinationPropagation.after.panic-abort.mir b/tests/mir-opt/dest-prop/dead_stores_better.f.DestinationPropagation.after.panic-abort.mir index eb4209731c6..15061da8120 100644 --- a/tests/mir-opt/dest-prop/dead_stores_better.f.DestinationPropagation.after.panic-abort.mir +++ b/tests/mir-opt/dest-prop/dead_stores_better.f.DestinationPropagation.after.panic-abort.mir @@ -7,16 +7,16 @@ fn f(_1: usize) -> usize { let mut _3: usize; let mut _4: usize; scope 1 { - debug b => _3; + debug b => _2; } bb0: { nop; - _3 = copy _1; + _2 = copy _1; _1 = const 5_usize; nop; nop; - _1 = move _3; + _1 = move _2; nop; nop; nop; diff --git a/tests/mir-opt/dest-prop/dead_stores_better.f.DestinationPropagation.after.panic-unwind.mir b/tests/mir-opt/dest-prop/dead_stores_better.f.DestinationPropagation.after.panic-unwind.mir index fe9a7376a58..ddfe4dc5b3e 100644 --- a/tests/mir-opt/dest-prop/dead_stores_better.f.DestinationPropagation.after.panic-unwind.mir +++ b/tests/mir-opt/dest-prop/dead_stores_better.f.DestinationPropagation.after.panic-unwind.mir @@ -7,16 +7,16 @@ fn f(_1: usize) -> usize { let mut _3: usize; let mut _4: usize; scope 1 { - debug b => _3; + debug b => _2; } bb0: { nop; - _3 = copy _1; + _2 = copy _1; _1 = const 5_usize; nop; nop; - _1 = move _3; + _1 = move _2; nop; nop; nop; diff --git a/tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir index 9f88e1961ec..e67f362ee04 100644 --- a/tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/clone_as_copy.enum_clone_as_copy.PreCodegen.after.mir @@ -6,8 +6,8 @@ fn enum_clone_as_copy(_1: &Enum1) -> Enum1 { scope 1 (inlined <Enum1 as Clone>::clone) { debug self => _1; let mut _2: isize; - let mut _3: &AllCopy; - let mut _4: &NestCopy; + let _3: &AllCopy; + let _4: &NestCopy; scope 2 { debug __self_0 => _3; scope 6 (inlined <AllCopy as Clone>::clone) { |
