diff options
| author | Xavier Denis <xldenis@gmail.com> | 2022-06-10 14:12:58 -0700 |
|---|---|---|
| committer | Xavier Denis <xldenis@gmail.com> | 2022-06-14 18:45:33 -0700 |
| commit | a5e27a113445498b7b435bcd04e26ad1d71defab (patch) | |
| tree | 629b3e110b53a77c72862e23ad5006a05fcb1514 /src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff | |
| parent | e39c92e7aa2cd77659d504b05ad59e38388866f7 (diff) | |
| download | rust-a5e27a113445498b7b435bcd04e26ad1d71defab.tar.gz rust-a5e27a113445498b7b435bcd04e26ad1d71defab.zip | |
Only create scopes for if let
Diffstat (limited to 'src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff')
| -rw-r--r-- | src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff b/src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff index a3d794f94b3..51d5f1acdab 100644 --- a/src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff +++ b/src/test/mir-opt/lower_array_len.array_bound_mut.SimplifyLocals.diff @@ -16,52 +16,50 @@ - let _11: usize; // in scope 0 at $DIR/lower_array_len.rs:21:15: 21:16 - let mut _12: usize; // in scope 0 at $DIR/lower_array_len.rs:21:9: 21:17 - let mut _13: bool; // in scope 0 at $DIR/lower_array_len.rs:21:9: 21:17 +- let mut _14: &[u8; N]; // in scope 0 at $DIR/lower_array_len.rs:18:16: 18:27 + let _6: usize; // in scope 0 at $DIR/lower_array_len.rs:19:15: 19:20 + let mut _7: usize; // in scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 + let mut _8: bool; // in scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 + let _9: usize; // in scope 0 at $DIR/lower_array_len.rs:21:15: 21:16 + let mut _10: usize; // in scope 0 at $DIR/lower_array_len.rs:21:9: 21:17 + let mut _11: bool; // in scope 0 at $DIR/lower_array_len.rs:21:9: 21:17 - scope 1 { -- let mut _14: &[u8; N]; // in scope 1 at $DIR/lower_array_len.rs:18:16: 18:27 - } bb0: { - StorageLive(_3); // scope 1 at $DIR/lower_array_len.rs:18:8: 18:27 - StorageLive(_4); // scope 1 at $DIR/lower_array_len.rs:18:8: 18:13 - _4 = _1; // scope 1 at $DIR/lower_array_len.rs:18:8: 18:13 - StorageLive(_5); // scope 1 at $DIR/lower_array_len.rs:18:16: 18:27 -- StorageLive(_6); // scope 1 at $DIR/lower_array_len.rs:18:16: 18:27 -- StorageLive(_7); // scope 1 at $DIR/lower_array_len.rs:18:16: 18:27 -- StorageLive(_14); // scope 1 at $DIR/lower_array_len.rs:18:16: 18:27 -- StorageDead(_7); // scope 1 at $DIR/lower_array_len.rs:18:20: 18:21 - _5 = const N; // scope 1 at $DIR/lower_array_len.rs:18:16: 18:27 -- StorageDead(_14); // scope 1 at $DIR/lower_array_len.rs:18:16: 18:27 -- StorageDead(_6); // scope 1 at $DIR/lower_array_len.rs:18:26: 18:27 - _3 = Lt(move _4, move _5); // scope 1 at $DIR/lower_array_len.rs:18:8: 18:27 - StorageDead(_5); // scope 1 at $DIR/lower_array_len.rs:18:26: 18:27 - StorageDead(_4); // scope 1 at $DIR/lower_array_len.rs:18:26: 18:27 - switchInt(move _3) -> [false: bb3, otherwise: bb1]; // scope 1 at $DIR/lower_array_len.rs:18:8: 18:27 + StorageLive(_3); // scope 0 at $DIR/lower_array_len.rs:18:8: 18:27 + StorageLive(_4); // scope 0 at $DIR/lower_array_len.rs:18:8: 18:13 + _4 = _1; // scope 0 at $DIR/lower_array_len.rs:18:8: 18:13 + StorageLive(_5); // scope 0 at $DIR/lower_array_len.rs:18:16: 18:27 +- StorageLive(_6); // scope 0 at $DIR/lower_array_len.rs:18:16: 18:27 +- StorageLive(_7); // scope 0 at $DIR/lower_array_len.rs:18:16: 18:27 +- StorageLive(_14); // scope 0 at $DIR/lower_array_len.rs:18:16: 18:27 +- StorageDead(_7); // scope 0 at $DIR/lower_array_len.rs:18:20: 18:21 + _5 = const N; // scope 0 at $DIR/lower_array_len.rs:18:16: 18:27 +- StorageDead(_14); // scope 0 at $DIR/lower_array_len.rs:18:16: 18:27 +- StorageDead(_6); // scope 0 at $DIR/lower_array_len.rs:18:26: 18:27 + _3 = Lt(move _4, move _5); // scope 0 at $DIR/lower_array_len.rs:18:8: 18:27 + StorageDead(_5); // scope 0 at $DIR/lower_array_len.rs:18:26: 18:27 + StorageDead(_4); // scope 0 at $DIR/lower_array_len.rs:18:26: 18:27 + switchInt(move _3) -> [false: bb3, otherwise: bb1]; // scope 0 at $DIR/lower_array_len.rs:18:8: 18:27 } bb1: { -- StorageLive(_8); // scope 1 at $DIR/lower_array_len.rs:19:15: 19:20 -- _8 = _1; // scope 1 at $DIR/lower_array_len.rs:19:15: 19:20 -- _9 = const N; // scope 1 at $DIR/lower_array_len.rs:19:9: 19:21 -- _10 = Lt(_8, _9); // scope 1 at $DIR/lower_array_len.rs:19:9: 19:21 -- assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, _8) -> bb2; // scope 1 at $DIR/lower_array_len.rs:19:9: 19:21 -+ StorageLive(_6); // scope 1 at $DIR/lower_array_len.rs:19:15: 19:20 -+ _6 = _1; // scope 1 at $DIR/lower_array_len.rs:19:15: 19:20 -+ _7 = const N; // scope 1 at $DIR/lower_array_len.rs:19:9: 19:21 -+ _8 = Lt(_6, _7); // scope 1 at $DIR/lower_array_len.rs:19:9: 19:21 -+ assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb2; // scope 1 at $DIR/lower_array_len.rs:19:9: 19:21 +- StorageLive(_8); // scope 0 at $DIR/lower_array_len.rs:19:15: 19:20 +- _8 = _1; // scope 0 at $DIR/lower_array_len.rs:19:15: 19:20 +- _9 = const N; // scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 +- _10 = Lt(_8, _9); // scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 +- assert(move _10, "index out of bounds: the length is {} but the index is {}", move _9, _8) -> bb2; // scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 ++ StorageLive(_6); // scope 0 at $DIR/lower_array_len.rs:19:15: 19:20 ++ _6 = _1; // scope 0 at $DIR/lower_array_len.rs:19:15: 19:20 ++ _7 = const N; // scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 ++ _8 = Lt(_6, _7); // scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 ++ assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb2; // scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 } bb2: { -- _0 = (*_2)[_8]; // scope 1 at $DIR/lower_array_len.rs:19:9: 19:21 -- StorageDead(_8); // scope 1 at $DIR/lower_array_len.rs:20:5: 20:6 -+ _0 = (*_2)[_6]; // scope 1 at $DIR/lower_array_len.rs:19:9: 19:21 -+ StorageDead(_6); // scope 1 at $DIR/lower_array_len.rs:20:5: 20:6 +- _0 = (*_2)[_8]; // scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 +- StorageDead(_8); // scope 0 at $DIR/lower_array_len.rs:20:5: 20:6 ++ _0 = (*_2)[_6]; // scope 0 at $DIR/lower_array_len.rs:19:9: 19:21 ++ StorageDead(_6); // scope 0 at $DIR/lower_array_len.rs:20:5: 20:6 goto -> bb5; // scope 0 at $DIR/lower_array_len.rs:18:5: 24:6 } |
