diff options
Diffstat (limited to 'src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff')
| -rw-r--r-- | src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff b/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff index 3d7047b71d3..887c7b01f43 100644 --- a/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff +++ b/src/test/mir-opt/lower_array_len.array_bound.SimplifyLocals.diff @@ -13,49 +13,47 @@ - let _8: usize; // in scope 0 at $DIR/lower_array_len.rs:8:15: 8:20 - let mut _9: usize; // in scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 - let mut _10: bool; // in scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 +- let mut _11: &[u8; N]; // in scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 + let _6: usize; // in scope 0 at $DIR/lower_array_len.rs:8:15: 8:20 + let mut _7: usize; // in scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 + let mut _8: bool; // in scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 - scope 1 { -- let mut _11: &[u8; N]; // in scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 - } bb0: { - StorageLive(_3); // scope 1 at $DIR/lower_array_len.rs:7:8: 7:27 - StorageLive(_4); // scope 1 at $DIR/lower_array_len.rs:7:8: 7:13 - _4 = _1; // scope 1 at $DIR/lower_array_len.rs:7:8: 7:13 - StorageLive(_5); // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 -- StorageLive(_6); // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 -- StorageLive(_7); // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 -- StorageLive(_11); // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 -- StorageDead(_7); // scope 1 at $DIR/lower_array_len.rs:7:20: 7:21 - _5 = const N; // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 -- StorageDead(_11); // scope 1 at $DIR/lower_array_len.rs:7:16: 7:27 -- StorageDead(_6); // scope 1 at $DIR/lower_array_len.rs:7:26: 7:27 - _3 = Lt(move _4, move _5); // scope 1 at $DIR/lower_array_len.rs:7:8: 7:27 - StorageDead(_5); // scope 1 at $DIR/lower_array_len.rs:7:26: 7:27 - StorageDead(_4); // scope 1 at $DIR/lower_array_len.rs:7:26: 7:27 - switchInt(move _3) -> [false: bb3, otherwise: bb1]; // scope 1 at $DIR/lower_array_len.rs:7:8: 7:27 + StorageLive(_3); // scope 0 at $DIR/lower_array_len.rs:7:8: 7:27 + StorageLive(_4); // scope 0 at $DIR/lower_array_len.rs:7:8: 7:13 + _4 = _1; // scope 0 at $DIR/lower_array_len.rs:7:8: 7:13 + StorageLive(_5); // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 +- StorageLive(_6); // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 +- StorageLive(_7); // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 +- StorageLive(_11); // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 +- StorageDead(_7); // scope 0 at $DIR/lower_array_len.rs:7:20: 7:21 + _5 = const N; // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 +- StorageDead(_11); // scope 0 at $DIR/lower_array_len.rs:7:16: 7:27 +- StorageDead(_6); // scope 0 at $DIR/lower_array_len.rs:7:26: 7:27 + _3 = Lt(move _4, move _5); // scope 0 at $DIR/lower_array_len.rs:7:8: 7:27 + StorageDead(_5); // scope 0 at $DIR/lower_array_len.rs:7:26: 7:27 + StorageDead(_4); // scope 0 at $DIR/lower_array_len.rs:7:26: 7:27 + switchInt(move _3) -> [false: bb3, otherwise: bb1]; // scope 0 at $DIR/lower_array_len.rs:7:8: 7:27 } bb1: { -- StorageLive(_8); // scope 1 at $DIR/lower_array_len.rs:8:15: 8:20 -- _8 = _1; // scope 1 at $DIR/lower_array_len.rs:8:15: 8:20 -- _9 = const N; // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21 -- _10 = Lt(_8, _9); // scope 1 at $DIR/lower_array_len.rs:8:9: 8: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:8:9: 8:21 -+ StorageLive(_6); // scope 1 at $DIR/lower_array_len.rs:8:15: 8:20 -+ _6 = _1; // scope 1 at $DIR/lower_array_len.rs:8:15: 8:20 -+ _7 = const N; // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21 -+ _8 = Lt(_6, _7); // scope 1 at $DIR/lower_array_len.rs:8:9: 8: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:8:9: 8:21 +- StorageLive(_8); // scope 0 at $DIR/lower_array_len.rs:8:15: 8:20 +- _8 = _1; // scope 0 at $DIR/lower_array_len.rs:8:15: 8:20 +- _9 = const N; // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 +- _10 = Lt(_8, _9); // scope 0 at $DIR/lower_array_len.rs:8:9: 8: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:8:9: 8:21 ++ StorageLive(_6); // scope 0 at $DIR/lower_array_len.rs:8:15: 8:20 ++ _6 = _1; // scope 0 at $DIR/lower_array_len.rs:8:15: 8:20 ++ _7 = const N; // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 ++ _8 = Lt(_6, _7); // scope 0 at $DIR/lower_array_len.rs:8:9: 8: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:8:9: 8:21 } bb2: { -- _0 = (*_2)[_8]; // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21 -- StorageDead(_8); // scope 1 at $DIR/lower_array_len.rs:9:5: 9:6 -+ _0 = (*_2)[_6]; // scope 1 at $DIR/lower_array_len.rs:8:9: 8:21 -+ StorageDead(_6); // scope 1 at $DIR/lower_array_len.rs:9:5: 9:6 +- _0 = (*_2)[_8]; // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 +- StorageDead(_8); // scope 0 at $DIR/lower_array_len.rs:9:5: 9:6 ++ _0 = (*_2)[_6]; // scope 0 at $DIR/lower_array_len.rs:8:9: 8:21 ++ StorageDead(_6); // scope 0 at $DIR/lower_array_len.rs:9:5: 9:6 goto -> bb4; // scope 0 at $DIR/lower_array_len.rs:7:5: 11:6 } |
